Importing .acq dataformat

Jan Mathijs Schoffelen jan.schoffelen at FCDONDERS.RU.NL
Thu Dec 27 14:32:12 CET 2007


Dear Kenton,

It seems to me as if you're almost there. Good work. I can imagine that fieldtrip crashes when it finds a cfg-field missing in the data-structure. You can bypass this by specifying data.cfg = [ ];
This should do the trick. The cfg of the previous fieldtrip-step is stored in the output of many of the high-level fieldtrip-functions (such as preprocessing, freqanalysis, sourceanalysis) in order to keep track of the entire pipeline of analysis (provided you stay within fieldtrip for your entire analysis). However, it is not an essential field in the data-structure for subsequent steps (despite the fact that it apparently causes some unwanted crashes).


Yours,

Jan-Mathijs

----- Original Message -----
From: Kenton Hokanson <kenton.hokanson at POMONA.EDU>
Date: Tuesday, December 25, 2007 9:06 pm
Subject: [FIELDTRIP] Importing .acq dataformat

> Hi everyone,
>
> Sorry, this is a rather basic yet lengthy question, but I've been
> working on
> my own for some time and am totally stumped.  If there exists a more
> appropriate way to get an answer to this question than to email the
> entirelist, please let me know; otherwise, please forgive my
> inexperience!I'm trying to use FieldTrip to analyze EEG data
> recorded using BioPac's
> "AcqKnowledge" data acquisition program (data files are saved with
> extension.acq).  This is not a FieldTrip-compatible format, but
> using the FT FAQ (
> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:dataformat) I
> found the following information for importing my dataformat.
>
> "Alternatively, if you already are able to read the data into
> Matlab, you
> can reformat that data within Matlab into a datastructure that is
> compatiblewith FieldTrip. Raw data that is comparable with the
> output of preprocessing
> should consist of a structure with the fields
>
> data.label   % cell-array containing strings, Nchan X 1
> data.fsample % sampling frequency in Hz, single number
> data.trial   % cell-array containing a data matrix for each trial
> (1 X
> Ntrial), each data matrix is Nchan X Nsamples
> data.time    % cell-array containing a time axis for each trial (1 X
> Ntrial), each time axis is a 1 X Nsamples vector"
>
> I'm able to save my data file as a single MATLAB matrix of dimensions
> NSamples x NChannels (20073x10).  Using my knowledge of the
> timestamps of
> events within the data file, I divided it up into two trials.  Each
> trial is
> 4001 samples long, and there are six channels that I want to
> analyze, so
> I've pasted that data into smaller matrices (Trial1 and Trial2)
> each with
> dimensions 6 x 4001.  Having done this, I input the following:
>
> data.label = {'EEG_CZ' 'EEG_C3' 'EEG_F3' 'EEG_FZ' 'EEG_F4' 'EEG_C4'}
> data.fsample = 1000
> data.trial = {Trial1 Trial2}
> data.time = {1:4001 1:4001}
>
> Here's the output those commands generate:
>
> data =
>
>      label: {'EEG_CZ'  'EEG_C3'  'EEG_F3'  'EEG_FZ'  'EEG_F4'
> 'EEG_C4'}    fsample: 1000
>      trial: {[6x4001 double]  [6x4001 double]}
>       time: {[1x4001 double]  [1x4001 double]}
>
> It would seem to me that I have created the datastructure defined
> on the FAQ
> site.  However, the structure doesn't appear to be usable for
> anything (my
> guess is that a cfg structure is also necessary, but I haven't
> found how to
> create one that is functionally identical to the output of
> preprocessing,define_trials, any of the read_xxx programs from
> fileio)...I don't know
> where to begin!  I'd very much appreciate any help I could get.
> Thanks,very happy holidays.
>
> Best,
> Kenton Hokanson
>
> ----------------------------------
> 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/fcdonders/fieldtrip.

----------------------------------
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/fcdonders/fieldtrip.



More information about the fieldtrip mailing list