Repository navigation
DOC: EEG eye-tracking alignment tutorial - #11770
Conversation
- The function lives in mne.preprocessing.eyetracking_pupillometry - added a test - updated the tutorial
- Interpolate over both eyegaze and pupil channels - add match parameter with default "BAD_blink" - expect that each blink annot has ch_name info - remove 'BAD_' from any interpolated annotations - updated test, marked xfail until PR 11746 is merged
…nterpolate_blinks Merged main and resolved conflict stemming from my previous PR, in preprocessing/eyetracking/__init__
- added a test to catch the code block that should raise an error when a blink annotaiton doesnt have ch_name info
- added tests for cases where input to function is incorrect - new tests make sure that warnings and exceptions are raised
Britta's docstring revisions Co-authored-by: Britta Westner <[email protected]>
- and minor refactor - and added myself to author list of module
- interpolation of gaze channels defaults to false - moved interpolate_blinks function to pupillometry module - added test for new flag - updated API documentation
- scipy interp1d is now a legacy class and is not advised - if indices at start or end of array need to be interpolated, numpy interp will apply ZOH interpolation by default
- updated it to pull new eeg-et recording from OSF
-This updates the eye-tracking tutorial to including integration with EEG -This required an update to the eyelink sample datat -Updated the description of the eyelink data in datasets overview
No this won't be an issue because we squash+merge nowadays Let me know when you're happy and things are green so I should look again! |
All green, whenever you're ready. Also cc @britta-wstnr ! |
|
LGTM, example: @britta-wstnr feel free to merge if you're happy (or if you won't have time to look for a bit I'll merge)! |
britta-wstnr
left a comment
There was a problem hiding this comment.
Looks great @scott-huberty ! Just one typo and one comment from my side - good to go after that!
typo fix from britta Co-authored-by: Britta Westner <[email protected]>
|
Alright @britta-wstnr just made the changes: Assuming the CIs pass, should be good to go! |
expand on the note regarding interpolation in eyegaze channels
|
Note: incorporated @britta-wstnr 's suggestion in 0067585 |
|
heads-up that I'm reviewing the tutorial, please don't merge just yet. |
drammock
left a comment
There was a problem hiding this comment.
Aside from the specific in-line comments, here are a couple more general ideas:
- the Ocular Annotations section might benefit from a plot of the data showing a few annotation spans? (if you do that it will change the thumbnail image, so if you want to keep the calibration image you should use the
gallery_thumbnail_numbertrick ---git grepit to see examples if you're not familiar) - (not changed in this PR) in the calibration section, you're printing 3 keys that are already shown in the REPL output of the Calibration object, before moving on to the 3 keys that are not part of the REPL output. Don't bother; you can demo the dict-like access and introduce the additional attributes at the same time, like: "Calibrations have dict-like attribute access; in addition to the attributes shown in the output above, addtional attributes are
positions(meaning),offsets(meaning), andgaze(meaning)".
Dan's suggestions Co-authored-by: Daniel McCloy <[email protected]>
|
Thanks @drammock for the edits, I implemented everything except for adding another plot in the ocular annotations section (I agree that it could be nice, but we do have a plot of the data in one of the following sections, so hopefully that will suffice?). |
Sounds good I'll look first thing tomorrow and then merge |
drammock
left a comment
There was a problem hiding this comment.
This is a really nice tutorial, good work @scott-huberty. Just a couple minor tweaks suggested, then let's merge.
some more suggestions by Dan Co-authored-by: Daniel McCloy <[email protected]>
|
Thanks! The failed tests look unrelated, but feel free to re-trigger those CI's if you'd like to |
|
I'll fix them in #11781, thanks @scott-huberty ! |
|
Nice work @scott-huberty ! |
* upstream/main: (26 commits) MAINT: Better fix for deprecation (mne-tools#11789) udpate doc for 11786 (mne-tools#11787) MAINT: Ignore warning in example (mne-tools#11781) Keeping event names when combining channel on epochs objects (mne-tools#11786) DOC: Fix incorrect docs for annotate_movement [ci skip] (mne-tools#11779) Refresh eegbci code and docstrings (mne-tools#11783) DOC: EEG eye-tracking alignment tutorial (mne-tools#11770) [MRG] By-pass set_annotations when plotting ICA sources (mne-tools#11766) add missing changelog from 11773 (mne-tools#11777) Fix eeglab.py, an error for read annotations in `RawEEGLab` (mne-tools#11773) [MRG] Use FIFF.FIFF_UNITM_NONE instead of 0 when adding a reference channel (mne-tools#11774) MAINT: Update for linkcheck [circle linkcheck] (mne-tools#11771) ENH: Interpolate blinks in eyetrack channels (mne-tools#11740) MAINT: Work around joblib bug (mne-tools#11765) Update manual install docs (mne-tools#11764) add logging message about which EOG channel used for blink detection (mne-tools#11757) DOC: Fix docs (mne-tools#11756) BUG: Fix bug with SNR calculation (mne-tools#11755) BUG: Fix bug with cHPI off (mne-tools#11754) Change color from annotation to red if name changes to "bad_" or "edge_" (mne-tools#11753) ...
Closes #11759
I updated the current eye-tracking tutorial to include a section on aligning and combining simultaneously collected EEG and eye-tracking data
This required updating the eyelink sample dataset, including a companion EEG file ( ~ 100mb).
UPDATE: here is the tutorial
EDIT: Hmmm... I can see that all my commits from PR #11725 are showing up below.. This branch was branched off from my
interpolate_blinksbranch before #11725 was merged to main. These prior commits aren't actually reflected in the "files changed" of this PR, but If this is an issue, I can re-implement my documentation updates in a new fresh branch..For clarification- only e86c335 and thereafter are unique to this branch and not on main..