-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: parse eyelink events #945
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #945 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 78 78
Lines 3560 3596 +36
Branches 629 639 +10
=========================================
+ Hits 3560 3596 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far!
I would like to realize #973 before merging this, so we would avoid the breaking change.
I'm indifferent to removing the blink related things from the metadata dictionary.
I would probably leave it there for backwards compatibility and remove it when removing utils.parsing
as planned in #973
I created #968 for this, so you can ignore this issue for this PR. |
@dkrako Does this mean that we should keep the blink-related metadata only in the dictionary returned by |
You convinced me in the meeting two weeks ago, that this wasn't really documented and so probably nobody has even used this. I think it's ok to treat this metadata dict as a very experimental feature which is expected to break in the future, as long as we provide an improved functionality (just as you did in this PR). |
regarding your comment in our minutes:
I'll just write down some of my thoughts: Unfortunately we didn't really documented well how we define the offset of an event. We have to improve the documentation there. Judging from the event detection methods, the offset of an event is defined as the first sample that is not in the event any more. So the offset is exclusive (similar to how python range() works). If I understand correctly, then EyeLink defines the offset differently: it's the last sample of the event. That's why they increase the duration by one sample-length. Example event: onset=10, offset=11 in pymovements this would lead to a duration of 1. In contrast EyeLink assumes the offset to be the last event sample (e.g. inclusive), so the same event would be encoded as onset=10, offset=10 This is related to this comment by @behinger
In conclusion I would say, that we should add a single sample-length to the offset value to counteract the rounding down. But I'm not fully sure if you'd also expect that, so I'm very open to different points of view @SiQube @prassepaul |
I agree, this is probably the cleanest way to resolve this. But in that case, I would suggest finishing #887 first, since the sample rate might change within the ASC file, and we need the sampling rate to calculate a sample length. |
Description
Parse fixation, saccade, and blink events detected by EyeLink into an
EventDataFrame
and add them to theGazeDataFrame
returned byfrom_asc()
.Partial fix for #893, alternative implementation to #942.
Implemented changes
EventDataFrame
(with namesfixation_eyelink
etc.)Type of change
How Has This Been Tested?
test_parse_eyelink
Checklist: