Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildToaListGross() fails when synch tag is only detected on one other receiver #43

Open
kphillips10 opened this issue Feb 14, 2023 · 0 comments

Comments

@kphillips10
Copy link

The issue came up when getInpSync() failed for my dataset. Debugging found the issue to be in buildToaListGross().

The failure is coming as a generic "subscript out of bounds" error on line:
toa_i_mat[, as.numeric(colnames(toa_i))] <- toa_i

The problem is being created a few steps back:
toa_i <- t(plyr::daply(.data = other_detections, .variables = "hydro_idx", .fun = function(k){
k <- data.table::data.table(k)
return(as.numeric(k[self_detections, roll = "nearest", on = .(epo_roll)]$epofrac))
}))

If the receiver's synch tag has been detected on >1 other receiver, this produces a matrix with nrow = nrow(self_detections) and ncol = number of other hydros it's heard on. However, if it's only heard on one other hydro, it produces a one-row matrix with ncol = number of rows of self_detections. When it then tries to put toa_i into toa_i_mat, the dimensional mismatch hits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant