[FieldTrip] How to import *.cnt datafile from NeuroScan?
Stephen Politzer-Ahles
politzerahless at gmail.com
Sun Jul 8 12:32:02 CEST 2012
Hello Lin,
In your code you need to specify an event type. To find out what the event
type is, you can run ft_definetrial() with cfg.trialdef.eventtype='?', and
it will tell you what event types are present in the file (see my sample
below):
addpath 'C:\Program Files\MATLAB\R2010a\toolbox\fieldtrip-20120512';
cd 'C:\Users\SJPA\Documents\MATLAB';
cfg = [];
cfg.dataset = 'myneuroscanfile.cnt';
cfg.trialdef.eventtype = '?'
cfg = ft_definetrial(cfg);
After that, you can use that event type, along with cfg.dataset and
cfg.trialdef.eventvalue, to define trials and import the data; see my
example below (this code will take a continuous file but it will epoch it
while importing, so you will end up with epoched data; also note, as far as
I know, you don't need to specify cfg.headerfile)
addpath 'C:\Program Files\MATLAB\R2010a\toolbox\fieldtrip-20120512';
cd 'C:\Users\SJPA\Documents\MATLAB';
cfg = [];
cfg.dataset = 'myneuroscanfile.cnt';
cfg.trialdef.eventtype = 'trial';
cfg.trialdef.eventvalue = [4 5 6 7];
cfg = ft_definetrial(cfg);
cfg.channel = [];
cfg.continuous = 'yes';
data = ft_preprocessing(cfg);
I noticed your e-mail signature says you are at Peking University; I am
actually also at the psychology department in PKU and will be here until
July 17th, if you need assistance feel free to contact me!
Best,
Steve Politzer-Ahles
>
> Message: 2
> Date: Sun, 8 Jul 2012 15:50:20 +0800 (CST)
> From: ?? <bertram0611 at pku.edu.cn>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] How to import *.cnt datafile from NeuroScan?
> Message-ID:
> <283648358.226.1341733820039.JavaMail.root at bj-mail07.pku.edu.cn>
> Content-Type: text/plain; charset=utf-8
>
> Dear FieldTrip list members,
>
> I wanna analyse the *.cnt datafile from NeuroScan. But I don't know how to
> do that. Because there are not detailed scripts. In my exp, the trigger
> code is 14. I don't what is eventvalue that equals trigger code? My EEG was
> recorded from 62 Ag/AgCl electrodes mounted in an elastic cap (Quick-Cap,
> NeuroScan Inc.,Herndon, Virginia, USA). Recordings were referenced to the
> left mastoid, but rereferenced to linked mastoids offline. The horizontal
> and vertical electrooculogram was also monitored. Electrode impedances were
> kept below 5 kO. The EEG and electrooculogram were amplified with a
> band-pass from DC to 70Hz and the sample rate was 500 Hz.The epoch interval
> was 1200ms, ranging from 200ms before the onset of the critical word to
> 1000 ms after it.I used a 100-ms poststimulus baseline for the critical
> words.
> can you give an example that analysing *.cnt data.
> my script and problems as follows:
> cfg = []
> cfg.datafile = 's01.cnt'
> cfg.headerfile = 's01.cnt'
> cfg.channel = 'all'
> cfg.eventvalue = '14'
> raw = ft_definetrial(cfg);
> Warning: no trialfun was specified, using trialfun_general
> > In ft_definetrial at 123
> evaluating trialfunction 'trialfun_general'
> ??? Reference to non-existent field 'trialdef'.
>
> Error in ==> trialfun_general at 29
> if isfield(cfg.trialdef, 'eventvalue') && isempty(cfg.trialdef.eventvalue
> ),
> cfg.trialdef = rmfield(cfg.trialdef, 'eventvalue' ); end
>
> Error in ==> ft_definetrial at 175
> [trl, event] = feval(cfg.trialfun, cfg);
> best regards
>
> --
> Lin Cai
> Department of Psychology, Peking University, Beijing 100871, P.R.China
>
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 20, Issue 12
> *****************************************
>
--
Stephen Politzer-Ahles
University of Kansas
Linguistics Department
http://www.linguistics.ku.edu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120708/1ac6336d/attachment-0002.html>
More information about the fieldtrip
mailing list