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

Extracting additional variables from EDF files #13

Open
mckenziephagen opened this issue Dec 3, 2024 · 1 comment
Open

Extracting additional variables from EDF files #13

mckenziephagen opened this issue Dec 3, 2024 · 1 comment

Comments

@mckenziephagen
Copy link

Hey! Thanks for making this - it's very helpful.

I'm trying to use this package to read in EDF data and create quality control visualizations, but I need the TRIAL_INDEX and TIMESTAMP. If I use the Eyelink Data Viewer, I can get these variables as a column in the output csv, but I'd like to have something that doesn't rely on that GUI. I was wondering if that's possible with this package, or if there's reasonable changes to the source code to be able to get those.

Happy to make any changes and submit a PR for them if there's a reasonable way to do that, and if that'd be of interest to other users!

Tagging my collaborators: @baharsener, @lydiazhanguw, @BrendaQiu.

@scott-huberty
Copy link
Owner

scott-huberty commented Dec 4, 2024

Hey!

I agree that having information about trial start/stops is important and has been on the back of my mind as a TODO..

Per the Eyelink EDFAPI C libary manual, I think the most basic way to support this is to add START and END events, similar to what you see in an ASCII (.asc) version of an EDF file. Then one could access this with my_edf_obj["discrete"]["start"] to get a list of trial start times, which you could easily index yourself.

Does this sound like it is what you are looking for?

A class was already created to extract this info from theRECORDINGS Structure created by the EDFAPI C library, but I don't think we currently use it at all:

class RECORDINGS(Structure):

I think that RECORDINS.state == 1 means recording block (trial) start, and RECORDINGS.state == 0 means trial end.

If you beat me to it, PR's always welcome! Otherwise I'll hopefully get to it Over the holidays or after the new year.

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

2 participants