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

g.part5.addfirstwake fails if there are no SIBs in the first hours of recording #1198

Closed
jhmigueles opened this issue Sep 12, 2024 · 0 comments · Fixed by #1199
Closed

g.part5.addfirstwake fails if there are no SIBs in the first hours of recording #1198

jhmigueles opened this issue Sep 12, 2024 · 0 comments · Fixed by #1199
Assignees

Comments

@jhmigueles
Copy link
Collaborator

if there aren't any SIBs detected within the start of the recording until the first noon, then GGIR triggers an error here that could be easily addressed. Usually this is not a concern because we expect SIBs there. In this dataset it was because recording started at 9am and they still wanted to include those recordings as they may run some analyses only using school window time (with this first window being of interest.

In lines 74-80 of the function, if there are no SIBs, then newWakeIndex is -Inf (line 76), and then in line 80 "ts$diur[1:newWakeIndex] = 1" triggers the error because it can not do 1:-Inf.

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

Successfully merging a pull request may close this issue.

1 participant