braindecode.preprocessing.Crop#

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 mne.io.Raw.copy() if operation on a copy is desired.

Parameters:
tminfloat

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

tmaxfloat

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

include_tmaxbool

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.

Returns:
rawinstance of Raw

The cropped raw object, modified in-place.

See more details in mne.io.base.crop