tmalsburg / saccades

Detection of fixations and saccades in eyetracking data
GNU General Public License v2.0
76 stars 14 forks source link

Error in detect.fixations #13

Closed jgeller112 closed 4 years ago

jgeller112 commented 4 years ago

I am not sure if it is my computer, but running your example data

data(samples)
head(samples)
fixations <- detect.fixations(samples)

returns this warning message: In max(x, na.rm = TRUE) : no non-missing arguments to max; returning -Inf

jgeller112 commented 4 years ago

It also does it with other data I process through the function.

tmalsburg commented 4 years ago

It’s a warning, not an error. I think it is harmless but I will have a closer look.

jgeller112 commented 4 years ago

It doesn’t seem to have any impact on the df that is created, but figured I would let you know. I use it as part of a preprocessing pipeline and it generates a lot of warning messages.

tmalsburg commented 4 years ago

Okay, I checked: This is happening in the calculation of the time at which events end. If the trial ends during a blink, the blink's end time cannot be determined. As a result you get -Inf as the end time. Perhaps not the most elegant solution, and the warning is certainly annoying. But, as you say, the results are otherwise correct. I will see how this can be improved. Thanks for reporting.

tmalsburg commented 4 years ago

The warning message should no longer appear in the latest version. Could you please confirm with your data set? Thanks.

jgeller112 commented 4 years ago

No more warning messages!

Thanks!

On Sep 16, 2019, at 9:32 AM, Titus von der Malsburg notifications@github.com<mailto:notifications@github.com> wrote:

The warning message should no longer appear in the latest version. Could you please confirm with your data set? Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/tmalsburg/saccades/issues/13?email_source=notifications&email_token=AEMTQEC6OW5WOETHCX35QWLQJ6KGFA5CNFSM4IW4KWUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZLAVQ#issuecomment-531804246, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEMTQEFMOEYM5N7JWCT7RI3QJ6KGFANCNFSM4IW4KWUA.