Bug in make.capthist for multi detectors

86 views
Skip to first unread message

Richard Glennie

unread,
Jan 29, 2021, 7:15:48 PM1/29/21
to secr
Hello all, 

Just wanted to query whether this is a possible bug in secr 4.3.3 or I am misunderstanding something. 

I found some unusual behaviour when using make.capthist with multi detectors. It reported a warning that it was "dropping repeat detections within occasions at exclusive detectors (traps)" when I was sure I had removed all such repeat detections. 

Find attached a script that reproduces the problem for a minimal example and proposes where I think the problem is in make.capthist. 

Best, 

Richard 
scr_multi_repeated.R

Murray Efford

unread,
Jan 30, 2021, 11:33:07 AM1/30/21
to secr
Hi Richard
It's a bug, of course. Thanks for your detailed report. I have fixed it in the pre-release version available here secr_4.3.4.zip (Windows binary) or here secr_4.3.4.tar.gz (source).
As a workaround, you can also read data as if from a "proximity" detector and then convert to "multi":
traps<- make.grid(detector = "proximity")
chp <- make.capthist(captures, traps)
chm <- reduce(chp, outputdetector = "multi", dropunused = FALSE)

The result is not identical but the differences are subtle and I think ignorable.
Murray

Richard Glennie

unread,
Feb 1, 2021, 5:54:57 AM2/1/21
to secr
Hi Murray: 

Thanks for the rapid reply and quick code turnaround. I ended up appending a letter to the end of the ID's and that seemed to work. 

Best, 

Richard 

Reply all
Reply to author
Forward
0 new messages