[Mne_analysis] Concatenating Epochs objects in Python?

Stephen Politzer-Ahles politzerahless at gmail.com
Thu Apr 3 10:20:29 EDT 2014
Search archives:

Thanks for the input! I do indeed need to do some filtering as well, so I
guess in this case saving extra raw [filtered] files will be unavoidable.

Thanks,
Steve



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


On Thu, Apr 3, 2014 at 6:12 PM, Martin Luessi
<mluessi at nmr.mgh.harvard.edu>wrote:

> Hi Steve,
>
> Yes, you are right, concatenating Epochs is currently not supported.
> Unless you use "preload=True", it won't actually load the data of the
> raw file when creating a Raw object. So you should be able to just use a
> list of file names when creating Raw and it should work.
>
> The only time you need "preload=True" is when you want to modify the raw
> data, e.g., using filtering. In this case, you could load each raw file,
> filter it, save it, and then create a new Raw instance that combines all
> the files. Like that, you will only need enough RAM to have a single raw
> file fully loaded.
>
> HTH,
>
> Martin
>
> On 04/03/14 09:42, Stephen Politzer-Ahles wrote:
> > Hi,
> >
> > Is it possible to concatenate multiple Epochs objects in Python? For
> > example, if I load one raw fif file and create an object (let's call it
> > epochs1) with three epochs A, B, and C, and then I load another raw fif
> > file and create epochs2 with three epochs D, E, and F, what I would like
> > to do is combine them into a single object with six epochs A, B, C, D,
> E, F.
> >
> > I can't find a method for this in the reference and all I see online is
> > this github discussion
> > https://github.com/mne-tools/mne-python/issues/120 where it seems like
> > this was ultimately not done. Loading multiple raw fif files is not a
> > good option for me because my files are very large and I don't have the
> > memory to handle it. I suppose another thing I could do is load one raw
> > fif file at a time and save its epochs to a new fif file, and then load
> > the separate epoched .fif files together (if mne.read_epochs allows
> > this) but I am hoping to avoid saving a bunch of files, I'd rather just
> > create and concatenate the epochs on the fly if that is possible.
> >
> > Thank you,
> > Steve
> >
> > Stephen Politzer-Ahles
> > New York University, Abu Dhabi
> > Neuroscience of Language Lab
> > http://www.nyu.edu/projects/politzer-ahles/
> >
> >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
> >
>
>
> --
> Martin Luessi, Ph.D.
>
> Research Fellow
>
> Department of Radiology
> Athinoula A. Martinos Center for Biomedical Imaging
> Massachusetts General Hospital
> Harvard Medical School
> 149 13th Street
> Charlestown, MA 02129
>
> Fax: +1 617 726-7422
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140403/56718d36/attachment.html 


More information about the Mne_analysis mailing list