query on loading CNT files
Jan Mathijs Schoffelen
Jan.Schoffelen at FCDONDERS.RU.NL
Tue Feb 21 12:37:17 CET 2006
Dear Muthuraman,
I guess that you should specify the files which the preprocessing-function
is going to read in. So you should specify a
cfg.headerfile (which causes your crash, since you left it empty)
and a
cfg.datafile
In your case I would try:
cfg.headerfile = headerfile;
cfg.datafile = headerfile; (since as far as I know, these are one and the
same).
Good luck,
Jan-Mathijs
PS: Since you already manually defined your trials, you do not need to call
Definetrial anymore (so the step: [cfg] = definetrial(cfg) can be omitted)
-----Original Message-----
From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
Of Muthuraman Muthuraman
Sent: Tuesday, February 21, 2006 11:27 AM
To: FIELDTRIP at NIC.SURFNET.NL
Subject: Re: [FIELDTRIP] query on loading CNT files
hello
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
(freq=freqanalysis(cfg,data));
please give me suggestion on this
>>headerfile='pd_mof_tr0_o_0307.cnt';
>>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;
end
>>cfg
cfg =
trl: [172x3 double]
>>[cfg] = definetrial(cfg);
retaining exist trial definition
found 0 events
created 172 trials
>>data=preprocessing(cfg);
??? 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
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: 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
>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