[FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW

Ana Laura Diez Martini diezmartini at gmail.com
Fri Jun 6 00:00:02 CEST 2014


Thank you Diego!


On Fri, Jun 6, 2014 at 3:56 AM, Lozano Soldevilla, D. (Diego) <
d.lozanosoldevilla at fcdonders.ru.nl> wrote:

> Hi Ana,
>
> During our last fieldtrip meeting, we discussed about the triggering
> issues with the *RAW file format and here some thoughts:
>
> 1) What you reported is not a fieldtrip problem per se. The way NETSTATION
> is configured in your lab allow you to record the triggers in bits, not in
> decimal numbers. I don't know how but there should be a way to configure
> your acquisition device in such a way that triggers are not transform from
> decimal to binary representation.
>
> 2) Make your own trialfun to solve the conversion problem. I created a FAQ
> <http://fieldtrip.fcdonders.nl/faq/how_can_i_transform_trigger_values_from_bits_to_decimal_representation_with_a_trialfun>
> titled "How can I transform trigger values from bits to decimal
> representation with a trialfun?" on where you'll find code to make the
> transition from bits to decimals again. This FAQ could also be useful for
> other users having similar problems (binary to decimal conversion) with
> other acquisition systems.
>
> I hope this helps
>
> Diego
>
>
> ------------------------------
>
> *From: *"Ana Laura Diez Martini" <diezmartini at gmail.com>
> *To: *"Diego Lozano" <d.lozanosoldevilla at fcdonders.ru.nl>, "FieldTrip
> discussion list" <fieldtrip at science.ru.nl>
> *Sent: *Tuesday, 27 May, 2014 12:25:39 AM
>
> *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file exported
> from an EGI .RAW
>
> Thank you Arjen, Diego and Chungki Lee!
>
> I tried with the .RAW and it reads the event. The problem is that my
> triggers have the following format "11,12,13,14,15,21,22...." . Netstation
> instead of saving them as they are, returns them in this way: say my
> trigger is 12, I get "DIN4" and "DIN8". or 11 is DIN1 + DIN8 + DIN2. so I
> had to convert them into my original triggers. After that I can either save
> the set (I tried this
> <http://sccn.ucsd.edu/pipermail/eeglablist/2010/003611.html> but it
> didn't work) or export it to bdf. When I open the exported file in EEGlab,
> it reads the events correctly, but fieldtrip doesn't.
>
> Any ideas? Thanks!!
>
>
> On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) <
> d.lozanosoldevilla at fcdonders.ru.nl> wrote:
>
>> Dear Ana,
>>
>> Sorry for my file extension confusion: edf instead of bdf. However, I
>> don't know a way to read events coded in BDF format exported by NETSTATION.
>> I encounter this problem in the past but I had no problems with RAW file
>> format
>>
>> Dear Chungki,
>>
>> Fieldtrip can read events in *.bdf but from BIOSEMI eeg system but Ana
>> was refering to a different eeg system that has the same fileformat
>> extension.
>>
>> best,
>>
>> Diego
>>
>> ------------------------------
>>
>> *From: *"Chungki Lee" <dr.chungki.lee at gmail.com>
>> *To: *"FieldTrip discussion list" <fieldtrip at science.ru.nl>
>> *Sent: *Monday, 26 May, 2014 11:18:34 AM
>> *Subject: *Re: [FieldTrip] Cannot read the events of a .BDF file
>> exported from an EGI .RAW
>>
>>
>> Dear all
>>
>> Fieldtrip can read events in BDF format !
>>
>> Hear simple examples
>>
>> example #1
>> %%
>> cfg                            = [];
>> cfg.dataset                =  '~~~ '; % your filename with file extension;
>> cfg.trialdef.eventtype  = 'STATUS'; % Status notation maybe Biosemi's
>> tigger name
>> cfg.trialdef.eventvalue = 1; % your event value
>> cfg.trialdef.prestim    = 4;  % before stimulation (sec), only use
>> positive value
>> cfg.trialdef.poststim   = 8; % after stimulation (sec) , only use
>> positive value
>> cfg                            = ft_definetrial(cfg);
>> cfg.method                = 'trial';
>> data                          = ft_preprocessing(cfg);
>> %%
>>
>> example #2
>> %%
>> % if you executed these command lines
>> cfg                            = [];
>> cfg.dataset                =  '~~~ '; % your filename with file
>> extension;
>> cfg.trialdef.eventtype  = '?';       % Status notation maybe Biosemi's
>> tigger name
>> cfg                            = ft_definetrial(cfg);
>>
>> % result example #2
>> the following events were found in the datafile
>> event type: 'CM_in_range' with event values:
>> event type: 'Epoch' with event values:
>> event type: 'STATUS' with event values: 1    2    3    4  255          <-----------
>> "this indicate your file configuration for trigger information"
>> no trials have been defined yet, see FT_DEFINETRIAL for further help
>> found 255 events
>> created 0 trials
>> the call to "ft_definetrial" took 8 seconds
>>
>> have fun~!!
>>
>>
>>
>> 2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla <
>> d.lozanosoldevilla at fcdonders.ru.nl>:
>>
>>> Hi Ana,
>>>
>>> Fieldtrip does not read events in BDF format. Take a look to our wiki:
>>>
>>> http://fieldtrip.fcdonders.nl/getting_started/egi
>>>
>>>
>>>    - *EDF+* (.edf) All channels, including PIB channels, are read in
>>>    correctly, including channel labels. However, the events, which are stored
>>>    on the annotation channel, are written in a way by Net Station that is not
>>>    compatible with the edf+ reading implementation in FieldTrip. So, events do
>>>    not come out properly. Also discontinuous epochs are “glued” together as
>>>    one “continuous” data stream.
>>>
>>> As Arjen suggested, with *.RAW you shouldn't have any problem.
>>>
>>> event = ft_read_event('*.RAW')
>>>
>>> If you encounter it, please let us know.
>>>
>>> best,
>>>
>>> Diego
>>>
>>>
>>> On 26 May 2014 08:59, Arjen Stolk <a.stolk8 at gmail.com> wrote:
>>>
>>>> Hi Ana Laura,
>>>>
>>>> Have you tried importing the .RAW file directly? That is, by specifying
>>>> cfg.dataset = 'XXX.raw'?
>>>>
>>>> Best regards,
>>>> Arjen
>>>>
>>>>
>>>> 2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini <diezmartini at gmail.com
>>>> >:
>>>>
>>>>> Hi all!
>>>>>
>>>>> This is the .BDF file
>>>>> <https://www.dropbox.com/s/xu5a9jwefpxnx2v/RAWconTriggers.bdf>of one
>>>>> of my EEG subjects. For my last experiment I used a Biosemi system and now
>>>>> I'm using an EGI system which gives me .RAW files. I exported the .RAW file
>>>>> with EEGlab to .BDF format and I tried using the scripts I use to analise
>>>>> the data of my previous experiment but I realised that it was not reading
>>>>> the events:
>>>>>
>>>>> cfg = [];
>>>>> cfg.dataset = ' (location)';
>>>>> cfg.trialdef.eventtype  = '?';
>>>>> definetrial(cfg);
>>>>> Warning: no trialfun was specified, using trialfun_general
>>>>> > In definetrial at 79
>>>>> evaluating trialfunction 'trialfun_general'
>>>>> no events were found in the datafile
>>>>> no trials have been defined yet, see DEFINETRIAL for further help
>>>>> found 0 events
>>>>> created 0 trials
>>>>>
>>>>> EEGlab does read them. Any idea of what could be wrong?
>>>>>
>>>>> Thank you all!!
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>
>>
>>
>>
>> --
>> ----------------------------------------------------------------
>> Chungki Lee, Ph.D.
>> Post-doc
>> Biomedical Research Institute
>> Korea Institute of Science and Technology
>> E-mail: chungki at kist.re.kr
>> Tel:+82-2-958-5636, C.P: +82-10-5223-7309
>> ----------------------------------------------------------------
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>>
>>
>>
>> --
>> PhD Student
>> Neuronal Oscillations Group
>> Donders Institute for Brain, Cognition and Behaviour
>> Centre for Cognitive Neuroimaging
>> Radboud University Nijmegen
>> NL-6525 EN Nijmegen
>> The Netherlands
>> http://www.ru.nl/people/donders/lozano-soldevilla-d/
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>
>
>
>
>
> --
> PhD Student
> Neuronal Oscillations Group
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognitive Neuroimaging
> Radboud University Nijmegen
> NL-6525 EN Nijmegen
> The Netherlands
> http://www.ru.nl/people/donders/lozano-soldevilla-d/
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140606/889bff16/attachment-0002.html>


More information about the fieldtrip mailing list