ClassFile information for selecting trials
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Mon Feb 16 13:33:04 CET 2009
On 13 Feb 2009, at 21:40, Nicola Neumann wrote:
> Dear all,
>
> For trial selection I am trying to figure out how I can enter
> information of the ClassFile.cls of the CTF dataset. I have CLASSIDs
> for different kind of trials, but it seems to me that the examples
> in the tutorial only refer to different triggers that are stored in
> another part of the dataset (?). Has anyone ever used ClassFile
> information and maybe has a skript for that?
Hi Nicola
At the Donders Centre we used the CTF class (*.cls) files for epoched
data. That was about 5 years ago, since after some experience with the
ClassFile and MarkerFile, we standardized on continuous MEG recordings
in combination with triggers, and not to use the CTF DataEditor and
other utilities at all. However, FieldTrip still should support class
files. E.g. the Subject01 example tutorial file from the fcdonders ftp
server is an old one and was recorded trial-based and it contains some
ClassFile and MarkerFile entries. You can see that in matlab/Fieldtrip
by the following:
>> event = read_event('Subject01.ds')
event =
1343x1 struct array with fields:
type
sample
value
offset
duration
>> unique({event.type})
ans =
'FC' 'FIC' 'IC' 'STIM' 'Tr15' 'Tr21' 'Trial'
'backpanel trigger' 'classification' 'frontpanel trigger'
'trial'
The "FIC" event is one that is derived from the class file (*). It
happens 87 times.
>> find(strcmp({event.type}, 'FIC'))
ans =
Columns 1 through 17
24 44 55 65 96
101 106 116
...
Columns 86 through 87
1313 1333
In the tutorial documentation we are using the trigger code to find
the segments corresponding with the FIC (fully incongruent) stimulus.
(*) Actually, when I was just looking at the ClassFile and MarkerFile
in an editor, the "FIC" turned out to be in the MarkerFile and not in
the ClassFile. The ClassFile contains the class "BAD", i.e. manually
detected artifacts. The BAD events can be found like this
>> find(strcmp({event.type}, 'classification'))
ans =
46 92 422 536 611
632 763 804 939 1070 1280
1309
>> event(46)
ans =
type: 'classification'
sample: 8101
value: 'BAD'
offset: -300
duration: 900
So if you use read_event on your dataset, you should be able to get
all the info that you need. Subsequently you can make your own trial
function. See http://neuroimaging.ruhosting.nl/fieldtrip/doku.php?id=fieldtrip:documentation:examples:making_your_own_trialfun_for_conditional_trial_definition
for more details on that.
Hope this helps,
Robert
----------------------------------
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