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

Incorporate Christian revisions & fix a bug with creating events from annotations #8

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

scott-huberty
Copy link
Member

@scott-huberty scott-huberty commented Dec 21, 2023

This branch was pulled from Christian's forks, and added a couple fixes on top.

Regarding the issue where the Evoked responses appeared to not be time-locked to the flash stimulus, Our initial suspect of annotations was true. In the initial commit of this PR, in eoglearn/datasets/mne.py, we set the EEG annotations to the ET raw object. The fix is to set the ET annotations to the ET object (which also contains EEG channels, bc we did raw_et.add_channels([raw_eeg]).

christian-oreilly and others added 4 commits December 19, 2023 10:52
This was the source of the bug where we were epoching to data that werent synced
to the flash times. While both of the EEG and ET raws are the same length after mne realign_raw and thus you should be able to epoch the ET objet to the EEG events, the original EEG raw and ET raw had different orig_times and so setting EEG annots to ET raw will put them in the wrong place. This is a documented limiation of annotations. if t0 is not 0, annotations can behave weird.
Mostly just black formatting, adding docstring, and sorting imports
@scott-huberty scott-huberty merged commit d212505 into main Dec 22, 2023
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants