[Mne_analysis] mne_raw2mat

Eric Larson larson.eric.d at gmail.com
Fri Mar 29 18:26:36 EDT 2013
Search archives:

Hey Gabriel,

I have had to do this in MATLAB due to a digitization error (where it was
easier for me to swap data than swap sensor information / digitization). I
basically hacked my own M-file based on the mne_ex_read_write_raw.m in the
mne MATLAB toolbox, which should have all the functions you need. I'm not
sure if there's a more principled way of doing it using the MATLAB
functions currently -- it's less trivial to implement than it seems at
first because the raw file contains much more information (sensor types,
digitization info, etc.) than just the raw data samples. But if you stick
to the example file, you should be okay (and can of course check using
mne_browse_raw).

You could also consider using mne-python, where it would be the following:

import mne
raw = mne.fiff.Raw('my_raw.fif', preload=True)
raw._data[my_channel_index] = my_new_data
raw.save('my_fixed_raw.fif')
raw.plot()  # if you wanted to visualize the data after changing it

I can you send the M-file I used if you want, but it's likely less useful
than the example m-file included with MNE.

Cheers,
Eric



On Fri, Mar 29, 2013 at 3:15 PM, <obregon at nmr.mgh.harvard.edu> wrote:

> Hi,
>
> I was wondering if there is any means of writing a FIF file from the data
> structures output by the mne_raw2mat command?
>
> Otherwise, how could I replace the recordings stored in a RAW data file
> (.fif) with those stored within a Matlab variable?
>
> Thanks for your help,
>
> --Gabriel
> _______________________________________________
> 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/20130329/e89678e8/attachment.html 


More information about the Mne_analysis mailing list