[Mne_analysis] keeping all epochs and then resampling without preloading

Tijmen Wartenberg Tijmen_Wartenberg at hotmail.com
Wed Apr 7 10:04:24 EDT 2021
Search archives:

        External Email - Use Caution        

Hi All,

I am running into a problem here. I created annotations (starting with "bad") that are stored within a raw object. Then, I use mne.make_fixed_length_epochs to convert the raw data to epochs. So far, so good.

However, when I want to keep all data (including the bad segments) and I therefor set the reject_by_annotation property to False, the bad epochs are still dropped. I was able to find a solution for that by setting preload to "False" when creating the epochs object, but this doesn't allow me to resample the epoched data afterwards. My code is like this:

sfreq_res = 100
epochs = mne.make_fixed_length_epochs(raw, duration=3, preload=True, reject_by_annotation='False') ==> doesn't reject the data when preload ==True
epochs.resample(sfreq_res, npad = 'auto') #resample ==> doesn't work when data is not preloaded

How do I solve this problem? I would like to resample all epochs (including bad ones).

Thanks!

Kind regards,
Tijmen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20210407/2b30019c/attachment.html 


More information about the Mne_analysis mailing list