[Mne_analysis] splitting fif files

Alexandre Gramfort gramfort at nmr.mgh.harvard.edu
Wed May 25 08:59:03 EDT 2011
Search archives:

Hi,

if you're willing to give it a try you could easily split your raw fif
file in python.

>From a Linux machine at MGH do in a terminal:

setenv PATH /usr/pubsw/packages/python/epd/bin:${PATH}

then the following python script should help you do what you want:

-------- beginning of script

from mne import fiff
from mne.datasets import sample
data_path = sample.data_path('.')

fname = data_path + '/MEG/sample/sample_audvis_raw.fif'

raw = fiff.Raw(fname)

# save the first 150s of MEG data in FIF file
raw.save('sample_audvis_meg_raw_part1.fif', tmin=0, tmax=150)
# save the rest in a second FIF file
raw.save('sample_audvis_meg_raw_part2.fif', tmin=150)

--- end of script

if you're lost I can help you tomorrow.

you can get more info at  https://martinos.org/mne/mne-python.html
(visible internally only for now)
and if you feel like it the code is public at
https://github.com/mne-tools/mne-python

Alex
--
Alexandre Gramfort, PhD
gramfort at nmr.mgh.harvard.edu
Dept. of Radiology MGH Martinos Center / Harvard Medical School
http://www-sop.inria.fr/members/Alexandre.Gramfort/

On Tue, May 24, 2011 at 8:59 PM, Ji Won Bang <kirstens03 at gmail.com> wrote:
> Dear. all.
> This is Ji Won Bang from Dr. Sasaki's group at MGH.
> I came up with a problem regarding splitting fif files.
> Do you know how I can split them into 2 or 3 as I want?
> I would appreciate that!
> Best regards,
> Ji Won Bang
> _______________________________________________
> 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.
>
>



More information about the Mne_analysis mailing list