-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ENH: Read eyetracking data (Eyelink) (Fork of #10855 ) #11152
ENH: Read eyetracking data (Eyelink) (Fork of #10855 ) #11152
Conversation
@scott-huberty looks like this needs a rebase or a merge-main. If it were me, I'd probably git rebase -i 4a390cc^ and then change |
a0b1090
to
8a3d4bc
Compare
Thanks @drammock - I think I did that correctly.. I had to force push because my local branch was behind remote after rebasing. |
Force-push is expected here (you have now 2 commits where GitHub had 27), and the monster multiline commit message for 5efcf53 suggests that you did it correctly... except that this was only the first step. Now you have to fetch upstream main and then |
8a3d4bc
to
b654cef
Compare
Sorry for the delay - While doing |
b654cef
to
c4fdf49
Compare
…om jun-28-2022 (4a390cc) - jul-01-2022 (91516c) [ci skip][skip azp][skip actions]
78a50af
to
a865640
Compare
hi @scott-huberty i saw you did quite some reorganisation of the eyelink parser code.. generally ok with me, i am not bound to my initial layout what do you think? |
@dominikwelke I think this is a great idea! I should wrap up the code for the parser next week. Then I can start advancing the test-suite that you started. I can also create a new local branch and cherry-pick your recent commits to make sure the parser code remains compatible with the development on channel types etc you are doing right now. I'll follow up with you next week when the parser code is finalized, and maybe we can start to merge our work then. |
c8bb4e8
to
32bffe5
Compare
Hey @dominikwelke , I think the parser is looking good! I haven't really touched your code on setting channel and FIFF types, but I see you did some refactoring of that last week. So I will try to pull your recent commits to a copy of this branch. On that note, this Parser should be robust to reading all the various eyelink channel types that can be present in an eyelink file (Gaze, Pupil, Resolution, Velocity, Head target (remote mode), and DINS). But, I'm not sure what coils/units etc we should give these channels, what do you think? I've started a github repo that contains various eyelink files that I've been using to test code during development, including monocular files and files with resolution/head target/DIN channels. Feel free to check it out. |
One comment on the DIN (digital input port) data in Eyelink files.. Eyelink tracks the pin downs/ups of a DIN port for every sample of the file, so if I'm not mistaken, I think that we could load this data in as a |
…k Welke (4a390cc) . co-authored by Dominik Welke <[email protected]> [ci skip][skip azp][skip actions] refactored code for reading eyelink eyetracker data, initially by Dominik Welke (4a390cc) . co-authored by Dominik Welke <[email protected]> [ci skip][skip azp][skip actions] account for missing timestamps between recording blocks [ci skip][skip azp][skip actions] refactored code and removed get_data_spec function (To be done on another branch) [ci skip][skip azp][skip actions]
32bffe5
to
0c28fa4
Compare
Following up on that, if we read in the DIN data as a for this example file, a photodiode was connected to Eyelinks DIN port. This is a pupillary light reflex task, so a white flash on the screen triggers the photodiode (and thus a change in the pins of the DIN port). This is why, in this file, just after the DIN value changes at around 2-seconds, you see the pupil size constrict (in the pupil channel). |
nice, great progress @scott-huberty ! immediate comments:
how should we proceed? (also @drammock @larsoner ) |
Agreed
|
Ok, let's start with
The code from that project isn't in this branch anymore. The code in this branch I developed along with @christian-oreilly , (who I've listed as a 3rd contributor in the
What do you think about the idea of finishing up this PR (basically wrapping up setting the channel types as discussed, and completing the test-suite and docs), which won't include the preprocessing functions that you've been working on in your branch. Then, assuming the PR is approved, you could merge main from your branch and carry forward the preprocessing functions in a second PR (the one currently open). IMO, this might create a nice "separation of concerns" as far as testing, documenting, and reviewing Alternatively, yes we could merge this into your branch, and continue working on it from there. In that case, there's a small amount of refactoring I wanted to do, but I can do it before or after the merge. just let me know what you're thoughts are! (Others please feel free to weigh in on this too if you don't like my proposed idea). |
I have not read all previous responses, but I will say from a reviewer perspective ideally the I/O and preprocessing could go in separate, sequential PRs. It will make reviewing much easier for us! |
i tested with some of my files and everything seems to work swiftly! thanks for moving this forward! :) also thanks for updating me on the contributions. concerning the choice of branch/PR: my further arguments for merging into my branch were:
but we've discussed this long enough - you have a preference yor your branch and the reviewers dont seem to care so lets take your branch :) i'll integrate the latest status of my FIFF and channel type settings into a copy of it, and then we can merge these branches. |
It's up to you - Either way, I'm just glad we've progressed to the stage that we can start working on a common branch!
Perhaps I made a faulty assumption that no one had fetched this remote branch - of course, we'll keep the history linear from now on!
Awesome! |
I'm not sure why - the minimal 3.8 CI is returning a module import error for: |
this doesnt seem like our fault; all the other CIs are fine but |
Argh I introduced those regressions and will fix them in a separate PR. Don't know why they're only being caught now, though! |
ahh ya thanks for pointing that out -- I'll add the requires_pandas decorator and push. |
🎉🎉🎉 100 commits 🎉🎉🎉 |
mne-tools/fiff-constants#39 is in, feel free to update this PR and ping me when it's green -- I think we can merge it then! |
it's green and LGTM |
do we need to update any whatsnew or contributors log @larsoner |
Yes please add an entry @dominikwelke then I think we can merge! |
@dominikwelke unless you're already on top of this I'll update the changelog now |
argh.. getting another |
Weird that it happens here but not |
Pushed a commit for the |
Thank you!!! Big thanks to everyone for all the work on this!!! |
* upstream/main: (50 commits) BUG: Fix bug with paths (mne-tools#11639) MAINT: Report download time and size (mne-tools#11635) MRG: Allow retrieval of channel names via make_1020_channel_selections() (mne-tools#11632) Fix index name in to_data_frame()'s docstring (mne-tools#11457) MAINT: Use VTK prerelease wheels in pre jobs (mne-tools#11629) ENH: Allow gradient compensated data in maxwell_filter (mne-tools#10554) make test compatible with future pandas (mne-tools#11625) Display SVG figures correctly in Report (mne-tools#11623) API: Port ieeg gui over to mne-gui-addons and add tfr gui example (mne-tools#11616) MAINT: Add token [ci skip] (mne-tools#11622) API: One cycle of backward compat (mne-tools#11621) MAINT: Use git rather than zipball (mne-tools#11620) ENH: Speed up code a bit (mne-tools#11614) [BUG, MRG] Don't modify info in place for transform points (mne-tools#11612) [BUG, MRG] Fix topomap extra plot generated, add util to check a range (mne-tools#11607) ENH: Add mne-bids-pipeline to mne sys_info (mne-tools#11606) MAINT: `coding: utf-8` is implicit in Python 3 (mne-tools#11599) ENH: Read eyetracking data (Eyelink) (Fork of mne-tools#10855 ) (mne-tools#11152) MAINT: In Python 3, do not prefix literals with `u` (mne-tools#11604) MAINT: object is an implicit base for all classes (mne-tools#11601) ...
refactored code initially pushed in PR #10855 by @dominikwelke and reviewed by @larsoner and @drammock. Starting a new PR as suggested by @larsoner
briefly: When plotting the test_eyelink.asc file, The eye channel traces now appear at the beginning of the time series as expected. I also added a
dataframes
attribute to theRawEyelink
class, which returns the pandas dataframes that are created while loading the file.@dominikwelke I'll leave some comments on the code in your PR to explain some of the changes I made in the code refactoring, and you can let me know if you agree, and we can discuss what needs to be worked on next!
@sportnoah14 also cc'ing you here so that you can stay in the loop.