Trimming epochs in mne-python

Hello,

I have an Epochs object with pretty large epochs (tmin==-2 and tmax==3),
and I'd like to pull out shorter epochs (just a subset of the times in the
epoch). I tried using mne.Epochs to do so:

epochs2 = mne.Epochs( epochs, epochs.events, event_id, tmin=-.1, tmax=1,
baseline=(0,.1) )

but this caused problems later on; when I tried averaging with
epochs2.average(), I got an error (traceback below) that I do not get if I
average my original epochs.

Does this error have something to do with the way I created those epochs?
And is there a better way to trim epochs?

Thanks,
Steve

Hi Steve,

Epochs isn't designed to be created from epochs. You have to give it
continuous raw data (an instance of mne.fiff.Raw). If you just want to
change the time interval of the epochs, does Epochs.crop fit your need?

Best,

Martin

Thanks Denis and Martin, epochs.crop is indeed it!

Best,
Steve

Stephen Politzer-Ahles
New York University, Abu Dhabi
Neuroscience of Language Lab
http://www.nyu.edu/projects/politzer-ahles/