You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty epochs from valid annotation when Raw cropped from beginning #8201
While working with a cropped raw file I came across a case where mne.Epochs did not output what I expected. This happens when the Raw object contains an annotation toward the end of the recording and is cropped from the beginning, such that raw.first_samp is now close to the onset of the annotation. When calling mne.Epochs, the resulting epoch is empty (if I understand correctly, because the event now falls outside of the recording) although it should still be possible to extract this epoch.
I would have expected mne.Epochs to return a valid epoch that starts 1 s after the beginning of the cropped raw and ends 1 s after that.
Actual results
The resulting epochs object is empty.
Additional information
Platform: Linux-5.4.0-45-generic-x86_64-with-glibc2.10
Python: 3.8.5 (default, Aug 3 2020, 16:08:50) [GCC 7.3.0]
Executable: /home/hubert/miniconda3/envs/braindecode/bin/python
CPU: x86_64: 4 cores
Memory: 7.7 GB
mne: 0.20.7
numpy: 1.18.5 {blas=openblas, lapack=openblas}
scipy: 1.4.1
matplotlib: 3.3.0 {backend=module://ipykernel.pylab.backend_inline}
sklearn: 0.23.2
numba: Not found
nibabel: Not found
cupy: Not found
pandas: 1.1.0
dipy: Not found
mayavi: Not found
pyvista: Not found
vtk: Not found
this is a nasty one.
Apparently set_annotations is not doing the right thing when meas_date and
orig_time are None....
@larsoner do you have time to look? otherwise I'll try to find some time to
look into this before the
end of the week
Activity
agramfort commentedon Sep 2, 2020