csb0 / PCDM

pupil common drive model (PCDM) toolbox.
Other
1 stars 2 forks source link

detection of saccades might not be applicable to sampling rates < 500 Hz #6

Closed nicobast closed 1 year ago

nicobast commented 1 year ago

%% Detect small saccades and microsaccades (method of Engbert & Mergenthaler 2006) vel = vecvel([in.xPos{ff} in.yPos{ff}], in.sampleRate{ff}, 3);

the vecvel fucntion requires a TYPE that you set to 3. Looking into that function, this seems only be applicable to 500 and 1000Hz sampling data. I changed it to 2 for our data, but I am not sure how this affects saccade detection. Just from inspection, it seems to be fine.

...sorry, for raising all these issues, but it is so intruiging to apply the PCDM model to other data!

csb0 commented 1 year ago

Your modification is standard and effective - I've added error handling that does this automatically. And I appreciate you for raising these issues and testing the code! It will benefit others too.