[Mne_analysis] Problem exporting data from Matlab (Fieldtrip/SPM) for mne-python

Matti Hamalainen msh at nmr.mgh.harvard.edu
Mon Dec 16 10:23:01 EST 2013
Search archives:

Nick, can you put a copy of the file somewhere so that I can have a look at the actual contents with mne_show_fiff

- Matti


On Dec 16, 2013, at 9:50 AM, Nick Ward <ward.nickjames at gmail.com> wrote:

> OK, with the help of Gio Piantoni I've got the data to import into mne-python with:
> mne.fiff.Evoked('data.fif', setno=trialnumber)
> 
> The data is single-trial (rather than evoked), but now it's in Python I should be able to convert to a more appropriate format.
> 
> > out of curiosity what processing are you doing with SPM?
> 
> That's the format I was given the data :)
> I think pre-processing, artefact removal, epoching etc was performed in SPM, and I had been using the SPM beamforming toolbox for source reconstruction, but planning to use MNE for that now.
> 
> Nick
> 
> 
> On Mon, Dec 16, 2013 at 1:18 PM, Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr> wrote:
> hi nick,
> 
> well I guess you should report the problem on the fieldtrip mailing list,
> as it's on a bug on their side if the fif file written is not
> recognized as a raw file.
> 
> did you try to load the same files with the MNE C commands? with neuromag tools?
> 
> out of curiosity what processing are you doing with SPM?
> 
> Best,
> Alex
> 
> 
> 
> On Mon, Dec 16, 2013 at 2:11 PM, Nick Ward <ward.nickjames at gmail.com> wrote:
> > Hi.
> >
> > I'm having trouble getting set of MEG data to load in Python (both 2 and 3).
> > I'm exporting the data from SPM by converting to Fieldtrip raw format
> > (spm2fieldtrip), and then calling fieldtrip2fiff.
> > I get a few warnings here, but the file is saved nonetheless:
> >
> >> the input is raw data with 340 channels and 120 trials
> >> Warning: the data does not contain a trial definition
> >>   In utilities/private/warning_once at 158
> >>   In utilities/private/fixsampleinfo at 66
> >>   In ft_datatype_raw at 154
> >>  In ft_checkdata at 224
> >>   In fieldtrip2fiff at 57
> >>   In export at 8
> >> Warning: reconstructing sampleinfo by assuming that the trials are
> >> consecutive > segments of a continuous recording
> >>  In utilities/private/warning_once at 158
> >>  In utilities/private/fixsampleinfo at 79
> >>  In ft_datatype_raw at 154
> >>  In ft_checkdata at 224
> >>  In fieldtrip2fiff at 57
> >>  In export at 8
> >> Reconstructing channel locations, it might be inaccurate
> >> Unknown channel type refmag, assigned to meggrad....
> >
> > In Python I then try and load the data with mne.fiff.Raw('data.fif'), but
> > get an exception:
> >
> >> /usr/lib/python2.7/site-packages/mne/fiff/raw.pyc in _read_raw_file(self,
> >> fname, allow_maxshield, preload, compensation, verbose)
> >>     191             else:
> >>     192                 if len(raw_node) == 0:
> >> --> 193                     raise ValueError('No raw data in %s' % fname)
> >>     194
> >>     195         if len(raw_node) == 1:
> >> ValueError: No raw data in data.fif
> >
> > I've inspected what is loaded in the debugger, and it appears as if the file
> > is being read. An exception is thrown however when there are no nodes found
> > in the meas structure containing FIFFB_RAW_DATA or FIFFB_CONTINUOUS_DATA.
> >
> > I'm not familiar with the FIFF file format, so am wondering if anyone knows
> > whether it is likely the failure to load the data is due to the warnings
> > given at the Matlab end, or I should be looking elsewhere?
> >
> > Cheers,
> > Nick
> >
> >
> > _______________________________________________
> > 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.
> >
> 
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20131216/5ad4a600/attachment.html 


More information about the Mne_analysis mailing list