[FieldTrip] Trigger values in data matrix

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu Jan 12 18:30:34 CET 2012


Dear Hamza,
For what it's worth: I use Fieldtrip to read GDF data written
bybiosemi2ft (64 channel EEG), in the lab Robert mentioned, in the
followingway (after installing the biosig toolbox):
event  = ft_read_event(cfg.dataset,'headerformat','gdf');value  =
[event(find(strcmp('STATUS', {event.type}))).value]';sample =
[event(find(strcmp('STATUS', {event.type}))).sample]';
All the best,Stephen
On 12 January 2012 18:11, Robert Oostenveld <r.oostenveld at donders.ru.nl> wrote:
> Dear Hamza,
>
> For the GDF format, the low-level reading function underneath ft_read_data uses the Biosig toolbox (which contains the sopen and sread function) as you already had figured out. The problem with biosig is that it does not have a consistent way of representing the events in a dataset for all data formats that it represents, so the general wrapper around it in fieldtrip cannot get the events. So in short: fieldtrip explicitely recognizes header+data+event, whereas biosig only has header+data as a consistent representaiton of the file content.
>
> In your gdf file there is probably a trigger or status channel, which can be used for flank detection. In ft_read_event around line 354 you see the relevant code, where the fieldtrip/fileio/private/read_trigger function is used to read the channel and detect the triggers. I can imagine that the calibration of the trigger/status channel is incorerct, resulting in values that are not integers (as you would expect on a trigger channel).
>
> We recently internally discussed the gdf writer linked to the biosemi2ft realtime application. It would be good to have more example data from another system. We don't have a biosemi system ourselves, but a collaborating group in Nijmegen (Peter Desain's lab) has one. They have not yet reported a problem like yours, but it would be good to check. Therefore I suggest that you report it as a bug on bugzilla.fcdonders.nl and upload a problematic example file (see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers).
>
> best
> Robert
>
>
>
>
> On 5 Jan 2012, at 15:14, Hamza Fawzi Altakroury (Student) wrote:
>
>> Dear Boris
>>
>> I sent that email when I was trying to read from .gdf file (by sread) while it is acquiring the data through biosemi2ft. But it did not work.
>>
>> My question was if I do the following:
>>
>> >> H = sopen('test.gdf');
>> >> data = sread(H,2048);     % I did not here 2048 sample I did not know why.
>> >> data = data';
>> >> trig = data(1,:);               % The status channel
>> >> plot(trig)
>>
>> I am not going to get the trigger values that I desired.
>>
>> Best.
>>
>> On Thu, Jan 5, 2012 at 1:19 PM, Boris Reuderink <b.reuderink at donders.ru.nl> wrote:
>> Dear Hamza,
>>
>> Could you elaborate on what you mean here? Could you perhaps provide some context, and a minimal working example?
>>
>> Best,
>>
>> Boris
>>
>> On Sunday, December 25, 2011, Hamza Fawzi Altakroury (Student) wrote:
>> Hello,
>>
>> I can't get the real trigger values if use sopen function (or ft_read_data), even after adding the min value -1.7281e+009 to get a positive values.
>>
>> Note: I plotted the triggers and their proportion is right but I can't get their exact values, what should I do.
>>
>> Best,
>>
>> --
>> Hamza Fawzi Altakroury
>> Graduate student - MA
>> Faculty of Engineering and Natural Sciences
>> Sabancı University
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>> --
>> Hamza Fawzi Altakroury
>> Graduate student - MA
>> Faculty of Engineering and Natural Sciences
>> Sabancı University
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list