-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bug? Incorrect saccade offset assigned in detecteyemovements.m #24
Comments
Indeed, thanks for spotting this (major) bug. |
What does this bug mean? This serious bug meant that a wrong offset latency (saccade offset sample) and a wrong saccade end position (gaze position at end of saccade) was assigned to the last saccade event in a given epoch, detected with the Engbert & Kliegl (2003) algorithm (function |
The landing position of the last saccade of each epoch is incorrect. This seems to be due to a bug in function
detecteyemovements.m
in line 360:if endsmp(end) > size(gazexy,2), endsmp(end) = size(gazexy,2); end
The intention here seems to be that if the temporal offset of the last saccade
ensmp(end)
is later than the last sampling point of the epoch, then the offset should simply be the last available sampling point. However, if I understand correctly the code above refers to the wrong dimension of gazexy, which represents sampling points * eye channels (vertical, horizontal). Thus, the offset of the last saccade is almost garanteed to be later thansize(gazexy,2)
= 2.I think the correct code should refer to the first dimension of gazexy:
if endsmp(end) > size(gazexy,1), endsmp(end) = size(gazexy,1); end
The text was updated successfully, but these errors were encountered: