[FieldTrip] Trigger channel for edf

David Iglesias López davidig at hotmail.es
Mon Nov 7 02:29:15 CET 2011


I'm trying to read and process some data in edf+ format. The data is recorded using emotiv EPOC neuroheadset, and as you say here, the data is written in blocks with the size of the buffer (1 second or 128 points in this case). These blocks do not represent real trials for my data and so I have written my own trialfun function which defines a correct trl.

The problem is that I'm not able to use ft_preprocessing the way i want because it doesn't matter what I do, it will read again the blocks from the dataset and do not create any trialinfo.

I would like like to simply make all my data as continuous and then apply my trl matrix, which is indeed correct. How could I proceed? Should I change hdr info after it is read, updating nTrials and nSamples?
I don't know how to chop my data correctly.



From: r.oostenveld at donders.ru.nl
Date: Sun, 20 Mar 2011 14:41:41 +0100
To: fieldtrip at donders.ru.nl
Subject: Re: [FieldTrip] Trigger channel for edf

Hi Ivano
Good that it works.
The EDF format is written in blocks. Depending on the software that wrote the EDF file, those blocks might represent experimental trials or might represent subsequent segments from a continuous data stream (which usually contains triggers to indicate the timing of stimuli and responses). 
FieldTrip by default represents each EDF datablock as a trial, and that is reflected in the events (from ft_read_event). With the option cfg.continuous=yes you can tell fieldtrip that it is a continuous recording and that it should not care about the blocks. And you can indeed safely ignore the events of type 'trial' in the event structure.
On 20 Mar 2011, at 13:24, Ivano Triggiani wrote:Hi,

just wanna tell you that changing MATLAB version now everything works!!! Actually I'm using a 2010 version (own by a friend of mine) and everything seems to work.
However it coul be useful for other users to know that reading edf files, fieldtrip uses a particular field of the edf header called "number of data records" ( http://www.edfplus.info/specs/edf.html ) and another called " duration of data records" that not correspond (at least for my files...) at real number of events occurred. So in my trigger function I have to ignore those informations (or change header of my file!)
Thanks to all.


"No man can wear one face to himself 
and another to the multitude,
without finally getting bewildered 
as to which one is true."
Nathaniel Hawthorne

fieldtrip mailing list
fieldtrip at donders.ru.nl

fieldtrip mailing list
fieldtrip at donders.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111107/6b1ffb8b/attachment-0001.html>

More information about the fieldtrip mailing list