query on loading CNT files

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Tue Jan 24 13:54:16 CET 2006


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
end
data = preprocessing(cfg);

This segments your continuous data in trials of one second length.

best,
Robert



On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote:

> hello
>
> 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
>
> hdr =
>
>             Fs: 1000
>         nChans: 64
>       nSamples: 172040
>    nSamplesPre: 0
>        nTrials: 1
>          label: {1x64 cell}
>
>>> datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx=
>>> 64;continuous=1;
>>> [dat] = read_fcdc_data(datafile, hdr, begsample, endsample,
>>> chanindx, continuous);
> Loading file pd_mof_tr0_o_0307.cnt ...
> done
>>> filename='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 ...
> done
> 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
> muthuraman
>
>> From: Robert Oostenveld <r.oostenveld at FCDONDERS.RU.NL>
>> Reply-To: FieldTrip discussion list <FIELDTRIP at NIC.SURFNET.NL>
>> To: 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
>> Robert
>>
>>
>> On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote:
>>
>>> hello
>>>
>>> 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
>>> muthuraman
>>>
>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Robert Oostenveld, PhD
>> F.C. Donders Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>> phone: +31-24-3619695
>> http://www.ru.nl/fcdonders/
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>




More information about the fieldtrip mailing list