Closed mscheltienne closed 2 years ago
Look at epochs.drop_log, it should say why. NO_DATA means it couldn't get data for the entire range (tmin or tmax extends outside the raw range)
Ok, so indeed I get (('NO_DATA',), ('NO_DATA',), ('NO_DATA',), ('NO_DATA',))
, but epochs with tmin=0
, tmax=3.99
on a raw of 16 seconds should work no?
raw.crop(10, 25.98) # shape (59, 2400)
Your data now start at whatever raw.first_time
was before the crop, plus another 10 seconds. If you change your event creation to this it should work:
events[k, 0] = math.floor(raw.info['sfreq'] * 4 * k) + raw.first_samp
Or even better, use mne.make_fixed_length_events
Ok, thanks a lot @larsoner I'm getting easily confused with this system of first_time
.. I get now that I am not supposed to create this event array manually..
I proposed a quick PR to improve a bit the docstring for events across the MNE functions.
A bit of an odd case here, I don't know if it's a bug or intended and badly explained, but when working on a dataset and creating 4 equal epochs manually (should have used make_fix_length_epochs), 3 epochs out of 4 were dropped. When replicating with the sample dataset, all 4 are dropped, and I don't get why.
I'm getting this logging output:
Any idea on what I overlooked before I start digging?