[Mne_analysis] fiff_write_evoked.m - Writes only the first condition from the original file

Eric Larson larson.eric.d at gmail.com
Fri Mar 22 18:25:24 EDT 2013
Search archives:

Hey Candidia,

Yes, I ran into the same issue. If I recall correctly, the way the MATLAB
code is structured, the evoked object that is returned by fiff_read_evoked
only contains a single dataset. We hit a similar stumbling block in
mne-python a few months ago, and amended the behavior of the Evoked
instance such that saving and loading multiple evoked datasets to / from a
single .fif file is possible. While you can't save them to a single file in
MATLAB (to my knowledge), you should at least be able to load each one and
loop through them, using different "setno" parameters to select the
appropriate datasets in turn. Alternatively, you can work with mne-python,
which supports both reading and writing multiple conditions from FIF files,
as well as accessing the datasets based on the name (and type, average or
standard error) as opposed to the index in the FIF file. But this, of
course, requires more overhead in terms of installation and learning its
use.

Cheers,
Eric



On Fri, Mar 22, 2013 at 3:14 PM, Candida Jane Maria Ustine <
candida at nmr.mgh.harvard.edu> wrote:

> Hello,
>
> I am trying to overwrite an evoked file after deleting a couple of
> projectors from the original evoked file in Matlab. After creating the new
> evoked file, only the first condition from the original evoked data
> structure is written. I looked through the fiff_write_evoked.m script and
> it seems like my subject fails in the section where the epochs get written
> for each set(condition) in a loop.
>
> Here are the commands I ran:
> >>ev1 = fiff_read_evoked('ac1_BaleenHP_All-ave.fif')
> >>ev1.info.projs(3)=[]
> >>ev1.info.projs(6)=[]
> >>fiff_write_evoked('ac1_BaleenHP_All-ave.fif', ev1)
>
> (I have checked every field in the old and new evoked data structures and
> everything is the same expect for the number of projectors. I wanted to
> know where the conditions are stored in the evoked data structure?)
>
>  >>length(ev1.evoked) returns 1, but the original evoked data has 10
> conditions (when I view it in mne_browse_raw). Has anyone encountered this
> before or am I missing any step in-between?
>
> Thanks much!
>
> Best,
> Candida
>
>
>    --
> Candida Jane Maria Ustine M.Eng.
> NeuroCognition Lab
> Department of Psychiatry - Neurosciences
> Athinoula A. Martinos Center of Biomedical Imaging
> Massachusetts General Hospital
> candida at nmr.mgh.harvard.edu
>
>
> 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.
>
>
> _______________________________________________
> 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/20130322/dd46cabe/attachment.html 


More information about the Mne_analysis mailing list