how to change time range in epochs data?

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: e.g. 0.24.0
  • operating system: Windows 10

hello everyone,
The time range of my epochs data is [-1. -0.999 -0.998 … 19.997 19.998 19.999], now I want to exlcude the first 2s from analysis because of artifacts, i.e. the time range is 2 to 20 seconds. But I don’t know how to solve this problem. I’d like to ask for your help. Thanks!


You can use the crop method: mne.Epochs — MNE 1.0.2 documentation

epochs = ...
epochs.crop(tmin=2, tmax=None)



It works!
Thanks for your help!