[Mne_analysis] keeping all epochs and then resampling without preloading[SOLVED]

Tijmen Wartenberg tijmen_wartenberg at hotmail.com
Wed Apr 7 10:22:48 EDT 2021
Search archives:

        External Email - Use Caution        

This question does not need an answer anymore, as I realized my mistake (string instead of Boolean False).
________________________________
Van: Tijmen Wartenberg
Verzonden: woensdag 7 april 2021 16:04
Aan: mne_analysis at nmr.mgh.harvard.edu <mne_analysis at nmr.mgh.harvard.edu>
Onderwerp: keeping all epochs and then resampling without preloading

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/2ed01846/attachment-0001.html 


More information about the Mne_analysis mailing list