What is baseline of tmin, tmax in mne.Epochs ??

  • MNE-Python version: 0.23.0
  • operating system: python 3.7

Hi, I’ve been researching the EEG signal.

I used the mne.Epochs class to parse the raw BrainVision based signals.
But I have a problem with using the input parameters of this class.

I want to parse my signals using my own events_id, but I don’t have fully understand the ‘tmin’, ‘tmax’ parameters.

I think baseline of the tmin and tmax is the own event_id, but I’m not sure about this.

Is this right??

  • example
  • code
events, annot = mne.events_from_annotations(raw)
print(events)
print(annot)
  • result
    Used Annotations descriptions: [‘Comment/actiCAP Active Shield On’, ‘New Segment/’, ‘Stimulus/S 1’, ‘Stimulus/S 10’, ‘Stimulus/S 11’, ‘Stimulus/S 12’, ‘Stimulus/S 13’, ‘Stimulus/S 14’, ‘Stimulus/S 15’, ‘Stimulus/S 16’, ‘Stimulus/S 17’, ‘Stimulus/S 18’, ‘Stimulus/S 19’]
    [[ 0 0 99999]
    [ 0 0 10001]
    [ 14830 0 1]

    [969821 0 16]
    [971830 0 10]
    [972832 0 19]]
    {‘Comment/actiCAP Active Shield On’: 10001, ‘New Segment/’: 99999, ‘Stimulus/S 1’: 1, ‘Stimulus/S 10’: 10, ‘Stimulus/S 11’: 11, ‘Stimulus/S 12’: 12, ‘Stimulus/S 13’: 13, ‘Stimulus/S 14’: 14, ‘Stimulus/S 15’: 15, ‘Stimulus/S 16’: 16, ‘Stimulus/S 17’: 17, ‘Stimulus/S 18’: 18, ‘Stimulus/S 19’: 19}

  • code

picks = mne.pick_types(raw.info,
                       meg=False,
                       eeg=True,
                       eog=False,
                       stim=False,
                       exclude='bads')
picks
  • result
    array([ 5, 6, 7, 10, 11, 21, 22, 23, 24, 27, 28, 38, 39, 40, 42, 52, 53,
    55, 56, 57])

  • code

tmin, tmax = 0., 4. ###
# 12: left, 14: right, 16: both hands, 18: feet
event_id = dict({'Stimulus/S 12': 12,
                 'Stimulus/S 14': 14,
                 'Stimulus/S 16': 16,
                 'Stimulus/S 18': 18})

epochs = mne.Epochs(raw,
                    events,
                    event_id,
                    tmin,
                    tmax,
                    # reject=dict(eeg=150e-6),
                    proj=True,
                    picks=picks,
                    baseline=None,
                    preload=True)
  • result
    Not setting metadata
    Not setting metadata
    200 matching events found
    No baseline correction applied
    0 projection items activated
    Loading data for 200 events and 2001 original time points …
    0 bad epochs dropped

Hello @comojin1994 and welcome to the forum!

I’ll rephrase this to what I think you meant:
When creating epochs, the epochs are time-locked to the specified events, meaning that the respective event will occur at time point t=0 in each epoch.

If that’s actually what you meant, then yes, your assumption is correct! tmin and tmax are relative to the time-locked event.

Best wishes,
Richard

1 Like

Thank you for your fast response!!

1 Like