query on loading CNT files

Muthuraman Muthuraman muthuraman10 at HOTMAIL.COM
Tue Feb 21 11:27:21 CET 2006


I have tried what you have suggested me in the previous mail
and i have attached the steps i have performed in matlab and the error also

if i skip the preprocessing step
and go for the calculation of coherence using freqanalysis
how to specify data in that case for the function
please give me suggestion on this

>>hdr = read_fcdc_header(headerfile);
Loading file pd_mof_tr0_o_0307.cnt ...
>>cfg.trl = [];
for i=1:floor(hdr.nSamples/hdr.Fs)
  cfg.trl(i,1) = (i-1)*hdr.Fs + 1;
  cfg.trl(i,2) = (i  )*hdr.Fs;
  cfg.trl(i,3) = 0;

cfg =

    trl: [172x3 double]
>>[cfg] = definetrial(cfg);
retaining exist trial definition
found 0 events
created 172 trials

??? Error using ==> read_fcdc_header
file '' does not exist

Error in ==> C:\muthu\work\fieldtrip-20060131\preprocessing.m
On line 236  ==> hdr = read_fcdc_header(cfg.headerfile);

with regards

>From: Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL>
>Reply-To: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
>Subject: Re: [FIELDTRIP] query on loading CNT files
>Date: Tue, 24 Jan 2006 13:54:16 +0100
>The relevant warning seems to be
>>Warning: no events found in pd_mof_tr0_o_0307.cnt
>That means that the low level code used to read the CNT file does not  find
>any triggers in your datafile. That either means that the low  level
>reading function (private/read_ns_cnt.m) has a bug, or that  your data does
>not contain any triggers.
>If it does not contain triggers (i.e. if there are no trials in the  data),
>you should make your own cfg.trl field prior to calling  PREPROCESSING and
>skip preprocessing. The documentation of  DEFINETRIAL explains what cfg.trl
>means. I suggest that you try  something like
>hdr = read_fcdc_header(headerfile);
>cfg.trl = [];
>for i=1:floor(hdr.nSamples/hdr.Fs)
>   cfg.trl(i,1) = (i-1)*hdr.Fs + 1;  % begin sample of each trial
>   cfg.trl(i,2) = (i  )*hdr.Fs;      % end sample
>   cfg.trl(i,3) = 0;                 % offset, i.e. relative location  of
>the time axis
>data = preprocessing(cfg);
>This segments your continuous data in trials of one second length.
>On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote:
>>I am beginner with field trip
>>as in the previous mail i have asked about the query on loading CNT  files
>>and according to the reply i need to call the function DEFINETRAIL
>>in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to  find the
>>events in the data
>>which gave warnings
>>i have attached in the mail what were exactly the steps carried out  for
>>the EEG analysis
>>'pd_mof_tr0_o_0307.cnt' is the file which contains the data
>> >>headerfile='pd_mof_tr0_o_0307.cnt';
>>>>[hdr] = read_fcdc_header(headerfile);
>>Loading file pd_mof_tr0_o_0307.cnt ...
>>hdr =
>>             Fs: 1000
>>         nChans: 64
>>       nSamples: 172040
>>    nSamplesPre: 0
>>        nTrials: 1
>>          label: {1x64 cell}
>>>>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample,  chanindx,
>>Loading file pd_mof_tr0_o_0307.cnt ...
>>>>[event] = read_fcdc_event(filename)
>>Warning: handling of event structure has not been fully tested for
>>Neuroscan *.cnt files
>>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414
>>Loading file pd_mof_tr0_o_0307.cnt ...
>>Warning: no events found in pd_mof_tr0_o_0307.cnt
>>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620
>>event =
>>     []
>>Thanking you
>>with regards
>>>From: Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL>
>>>Reply-To: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
>>>Subject: Re: [FIELDTRIP] query on loading CNT files
>>>Date: Wed, 18 Jan 2006 21:20:37 +0100
>>>Dear Muthuraman
>>>All analyses start by calling the PREPROCESSING function, which  reads
>>>the data segments of interest into memory. Prior to that,  you should
>>>call DEFINETRIAL to determine the data segments of  interest (usually
>>>based on the triggers present in the datafile).  Please see the help  of
>>>those two functions (type "help  function_name" on the matlab  command
>>>line) or look at http:// www2.ru.nl/fcdonders/fieldtrip/ reference.html
>>>best regards
>>>On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote:
>>>>I would like to use fieldtrip to analyse EEG recordings
>>>>how to load CNT files which contains the data
>>>>how can i load the data and do the analysis
>>>>with regards
>>>Robert Oostenveld, PhD
>>>F.C. Donders Centre for Cognitive Neuroimaging
>>>Radboud University Nijmegen
>>>phone: +31-24-3619695

More information about the fieldtrip mailing list