[FieldTrip] Working with own data format - events

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Wed Mar 16 12:26:16 CET 2011


Dear Marco,


> 1) How would I go about if I want to perform an action on one trial- 
> type only?
>

Most FieldTrip functions support the option cfg.trials = X, with X  
being a vector containing indices to the trials on which the  
computations need to be done. You can then specify, cfg.trials =  
find(data.trialinfo(:,1)==a), a being the condition number you are  
interested in.

> 2) And now say that within these condition-specific trials, I want  
> to define smaller events. Would I need to proceed the same way as I  
> did with ft_redefinetrials in the first steps? (That is, does FT  
> consider events and trials to be the same thing?)

Hmm, you could of course call ft_redefinetrial again, but in that case  
you need to manually update your trialinfo field again. If your  
question pertains to whether you can use information in the trialinfo  
field to redefine your trials, the answer would be that this is  
tricky, but possible. A prerequisite of course is that the information  
needs to be present in trialinfo to begin with. What I sometimes do is  
create additional columns coding (expressed in samples from the  
beginning of the respective trials) for potentially relevant other  
events. You could subsequently use this column of the trialinfo matrix  
to redefine your trials with ft_redefinetrial, using cfg.begsample and  
cfg.endsample.

Hope this helps,

Jan-Mathijs


> Thank you again,
> Marco
>
> PS : it would be nice indeed to have a tutorial on how to work with  
> one's own dataformat (or to slightly expand the How can I import my  
> own dataformat section in the FAQ)
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110316/4711313a/attachment-0002.html>


More information about the fieldtrip mailing list