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

Events are missing #16

Open
GELIKABE opened this issue Mar 4, 2020 · 8 comments
Open

Events are missing #16

GELIKABE opened this issue Mar 4, 2020 · 8 comments

Comments

@GELIKABE
Copy link

GELIKABE commented Mar 4, 2020

Hi, first of all thank you for providing saccades! I have set up my dataset like the samples dataset, but unfortunately, in the detect.fixations output, the event column is missing. Do you have any idea why this is happening?
I have another question: thank you for providing the aggregate.saccades function. Do you maybe have a workaround for regression detection?
Thank you,
Angelika

@tmalsburg
Copy link
Owner

tmalsburg commented Mar 5, 2020

Hi Angelika. Note that the CRAN version of the package is outdated. Make sure you're using the version from GitHub. Install instructions are here. With the GitHub version you should get the event column.

Regarding your second question, could you please elaborate on what problem you're trying to solve? I'm not sure what you mean by "workaraound for regression detection".

@GELIKABE
Copy link
Author

GELIKABE commented May 6, 2020

Hi Titus. I hope you are doing well! Thank you so much for your answer, that works! However, I seem to not be able to get saccades out of the events nor using the aggregate.saccades function.
Best, Angelika

@tmalsburg
Copy link
Owner

The function for saccades is detect.saccades. See its documentation for details.

@tmalsburg
Copy link
Owner

Oh, sorry, scratch that. There is currently no function for saccades. I intended to offer it at some point and had a prototype but apparently never included it in the package. Having said that, anything between two events that you get from detect.fixations is a saccade. So by comparing adjacent events, you can calculate saccade properties, like amplitude, duration, and so on. You might be surprised that there is no function that does that for you, given that the package is called "saccades". Perhaps 'saccades' wasn't the best choice for a name ;)

@dralicecade
Copy link

Hi there, I have followed your instructions above (regarding missing events) but now I get the error message of "Error in detect.fixations(n, lambda = 6, smooth.coordinates = T, smooth.saccades = F) : Samples need to be in chronological order within trial."
As far as I can see my data is in chronological order (although it doesn't start at 0 as the first timepoint) - any suggestions?
Thanks, Al

@tmalsburg
Copy link
Owner

The test for chronological order is this

  if (! all(with(samples, tapply(time, trial, function(x) all(diff(x) > 0)))))
    stop("Samples need to be in chronological order within trial.")

I don't see any room for false positives here. Could you please check again?

@GELIKABE
Copy link
Author

Oh, sorry, scratch that. There is currently no function for saccades. I intended to offer it at some point and had a prototype but apparently never included it in the package. Having said that, anything between two events that you get from detect.fixations is a saccade. So by comparing adjacent events, you can calculate saccade properties, like amplitude, duration, and so on. You might be surprised that there is no function that does that for you, given that the package is called "saccades". Perhaps 'saccades' wasn't the best choice for a name ;)

Thanks anyway and thank you for your answer :)
Do you or anyone have tipps for gaining information about saccade direction (regressions vs. forward saccades)
Thanks,
Angelika

@tmalsburg
Copy link
Owner

If you need the directions, you'd have to calculate the difference vectors between the x,y-coordinates of two consecutive fixations within trial. There's probably a clever way to do this with Tidyverse, but I don't know it from the top of my head and would have to google it myself.

One day I will add that function for saccade info.

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

3 participants