class braindecode.preprocessing.Crop(tmin=0.0, tmax=None, include_tmax=True, *, verbose=None)[source]#

Crop raw data file.

Limit the data from the raw file to go between specific times. Note that the new tmin is assumed to be t=0 for all subsequently called functions (e.g., time_as_index(), or Epochs). New first_samp and last_samp are set accordingly.

Thus function operates in-place on the instance. Use if operation on a copy is desired.


Start time of the raw data to use in seconds (must be >= 0).


End time of the raw data to use in seconds (cannot exceed data duration).


If True (default), include tmax. If False, exclude tmax (similar to how Python indexing typically works).

New in version 0.19.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

rawinstance of Raw

The cropped raw object, modified in-place.

See more details in