Export EEG Data
jan-mathijs schoffelen
jan.schoffelen at DONDERS.RU.NL
Wed Jun 30 17:10:46 CEST 2010
Hi Mattias,
> I am quite new to Fieldtrip and hope that someone has solved my
> problem before.
High expectations ;).
> I recorded EEG data inside an MR Scanner with the BrainVision
> software and now I want to use Fieldtrip to run some error
> correction scripts - so far so god.
> But after that I need to write the corrected data back to the
> original EEG - data format.
> I use the ft_write_data function to do this. After some problems I
> manage to run the function, but the result is a double size
> datafile, a messed up header and a empty marker file.
> Probably the data is written in double precision. Giving the data to
> the function with "single(data_org.trial{1})" in the argument does
> not help.
> The command line I use to call the function is:
> ft_write_data('ScannerCor', data_org.trial{1}, 'dataformat',
> 'brainvision_eeg','header', data_org.hdr);
>
> (I copied the corrected data back to the read in matrix)
>
> I heard already, that I can tell Matlab to use only single
> precision, but it would be nice to tell that the function directly -
> Is there a way to do so?
> What do I need to do, to export the header and marker file correctly?
I have not encountered this issue before, and I don't know whether
anybody else has. This may mean that you need to do some digging
yourself to get it solved. I never tried to export data to a different
fileformat. The easy way out here would be to also do your subsequent
analysis steps in matlab/fieldtrip.
Did you already have a detailed look at ft_write_data, and in
particular the part which deals with 'brainvision_eeg'. My suspicion
is that there is a discrepancy between the information in
data_org.hdr, and the exact data you try to export
(data_org.trial{1}). Manually converting to single precision may not
work if in data_org.hdr you need to specify the precision. (once again
I don't know about the specifics of this function, or of the functions
it relies on). Using the matlab debugger may help you to access the
variables in the function's workspace and to see what's preventing it
to work properly.
Good luck,
Jan-Mathijs
Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3668063
----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100630/f99ba5b7/attachment-0002.html>
More information about the fieldtrip
mailing list