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

Preserve annotations from Eyetracking, EEG files. #1

Open
scott-huberty opened this issue Apr 17, 2023 · 0 comments
Open

Preserve annotations from Eyetracking, EEG files. #1

scott-huberty opened this issue Apr 17, 2023 · 0 comments

Comments

@scott-huberty
Copy link
Member

scott-huberty commented Apr 17, 2023

I haven't actually run the notebook but It would seem that when we call get_data() on our raw objects to get the numpy arrays, and then combine the arrays and create a new raw object, we are losing any annotation info:

eeg_et_array = np.vstack((eeg_raw_array, et_raw_array, eeg_stim_raw_array))
info = mne.create_info(ch_names = eeg_names + et_names + eeg_stim_names,
sfreq = 1000,
ch_types=eeg_types + et_types + eeg_stim_types)
eeg_et_raw = mne.io.RawArray(eeg_et_array, info)

For example, to preserve the Eyetracking Raw object annotations we would need to do something like et_annots = et_raw.annotations and then after creating our new combined object, do something like combined_raw.set_annotations(et_annots)

However, this may not work as expected out of the box... If the times of the new raw object diverged from the original eye-tracking raw, the annotations might be offset to some degree..

But I think it is important that we preserve annotations (because for example they provide info on blinks etc) - especially since our eye-tracking raw object has periods of NaN values and I want to make sure this isn't tripping up our routine.

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

1 participant