-
Notifications
You must be signed in to change notification settings - Fork 2
Description
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:
q1k_eeget_init/q1k_sync_tools.py
Lines 373 to 379 in ddd2f75
| 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.