Skip to content

Preserve annotations from Eyetracking, EEG files. #1

@scott-huberty

Description

@scott-huberty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions