What is tmin and tmax in Epochs?

  • MNE-Python version: 0.22.0
  • operating system: macOS 11.2.3 (20D91)

I was looking at how to Compute and visualize ERDS maps and couldn’t understand tmin, tmax and the concept of Epochs.

tmin, tmax = -1, 4 # define epochs around events (in s)
epochs = me.Epochs(raw, events, event_ids, time - 0.5, tmax + 0.5, 
                   picks=picks, baseline=None, preload=None
(...)
tfr.crop(tmin, tmax)
  1. What does it mean tmin(-1) and tmax(4)?
  2. What does it mean the tmin - 0.5 and tmax + 0.5 passed to Epochs? Is it slicing/filtering the “full data”(represented by raw and events)?
  3. Why there’s the need to crop?

I’d appreciate if someone could help me figure out what I’m missing here.

Thank you very much.

“Epochs” are equal-duration chunks of the continuous raw signal. Epochs are created relative to a series of “events” (an event is a sample number plus an event ID integer encoding what kind of event it was). “tmin” and “tmax” define the start and end times of the epochs, relative to the times of the events. So in the example you quoted, for each event, an epoch is created around it that starts 1.5 seconds before the event and ends 4.5 seconds after the event. Later, the extra 0.5 seconds are cropped off the beginning and end after computing the time-frequency representation of the epochs. The extra 0.5 seconds was originally included so that when computing the time-frequency representation, edge effects would not occur during the times of interest.