Annotations after downsampling

Hi everyone,

I’m working with concatenated EEG data using mne.concatenate_raws and have created annotations marking the start and end of each segment. After downsampling the data due to high sampling frequency (which was affecting the ICA analysis performance), I noticed that my annotations were lost/incorrect.

Is there a way to preserve the annotations when downsampling the data? Any suggestions or best practices for handling this would be greatly appreciated!

Thanks

The resample method allows you to do both at the same time. You could do something similar to this:

events, event_id = mne.events_from_annotations(raw, use_rounding=False)
data_ds, events_ds = raw.copy().resample(sfreq=ds_freq, events=events)
1 Like

Thanks for the answer. This worked perfectly.
I tried many things but transforming the annotations to events and then downsample. Thanks :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.