<div dir="ltr">Thank you Diego!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 3:56 AM, Lozano Soldevilla, D. (Diego) <span dir="ltr"><<a href="mailto:d.lozanosoldevilla@fcdonders.ru.nl" target="_blank">d.lozanosoldevilla@fcdonders.ru.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:#000000">Hi Ana,<br><br>During our last fieldtrip meeting, we discussed about the triggering issues with the *RAW file format and here some thoughts:<br>
<br>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.<br>
<br>2) Make your own trialfun to solve the conversion problem. I created a <a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_transform_trigger_values_from_bits_to_decimal_representation_with_a_trialfun" target="_blank">FAQ</a> 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.<br>
<br>I hope this helps<br><br>Diego<br><br><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><b>From: </b>"Ana Laura Diez Martini" <<a href="mailto:diezmartini@gmail.com" target="_blank">diezmartini@gmail.com</a>><br>
<b>To: </b>"Diego Lozano" <<a href="mailto:d.lozanosoldevilla@fcdonders.ru.nl" target="_blank">d.lozanosoldevilla@fcdonders.ru.nl</a>>, "FieldTrip discussion list" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
<b>Sent: </b>Tuesday, 27 May, 2014 12:25:39 AM<div><div class="h5"><br><b>Subject: </b>Re: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW<br><br><div dir="ltr">Thank you Arjen, Diego and Chungki Lee!<br>
<div><br></div><div>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 <a href="http://sccn.ucsd.edu/pipermail/eeglablist/2010/003611.html" target="_blank">this</a> 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.</div>

<div><br></div><div>Any ideas? Thanks!! </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 26, 2014 at 9:44 PM, Lozano Soldevilla, D. (Diego) <span dir="ltr"><<a href="mailto:d.lozanosoldevilla@fcdonders.ru.nl" target="_blank">d.lozanosoldevilla@fcdonders.ru.nl</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Times New Roman;font-size:12pt;color:#000000"><div>Dear Ana,</div><div><br></div><div>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</div>

<div><br></div>Dear Chungki,<div><br></div><div>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.</div><div><br></div><div>

best,</div><div><br></div><div>Diego<br><br><hr><blockquote style="border-left:2px solid rgb(16,16,255);margin-left:5px;padding-left:5px"><b>From: </b>"Chungki Lee" <<a href="mailto:dr.chungki.lee@gmail.com" target="_blank">dr.chungki.lee@gmail.com</a>><br>

<b>To: </b>"FieldTrip discussion list" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br><b>Sent: </b>Monday, 26 May, 2014 11:18:34 AM<br><b>Subject: </b>Re: [FieldTrip] Cannot read the events of a .BDF file exported from an EGI .RAW<div>

<div><br><br><div dir="ltr">Dear all<div><br><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">Fieldtrip can read events in BDF format !</span><br></div></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px"><br>


</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">Hear simple examples</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px"><br>


</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">example #1</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">%%</span></div>


<div><div><font color="#000000" face="Times New Roman" size="3">cfg                            = [];</font></div><div><font color="#000000" face="Times New Roman" size="3">cfg.dataset                =  '~~~ '; % your filename with file extension;</font></div>


<div><font color="#000000" face="Times New Roman" size="3">cfg.trialdef.eventtype  = 'STATUS'; % Status notation maybe Biosemi's tigger name</font></div><div><font color="#000000" face="Times New Roman" size="3">cfg.trialdef.eventvalue = 1; % your event value</font></div>


<div><font color="#000000" face="Times New Roman" size="3">cfg.trialdef.prestim    = 4;  % before stimulation (sec), only use positive value</font></div><div><font color="#000000" face="Times New Roman" size="3">cfg.trialdef.poststim   = 8; % after stimulation (sec) </font><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">, only use positive value</span></div>


<div><font color="#000000" face="Times New Roman" size="3">cfg                            = ft_definetrial(cfg); </font></div><div><font color="#000000" face="Times New Roman" size="3">cfg.method                = 'trial';   </font></div>


<div><font color="#000000" face="Times New Roman" size="3">data                          = ft_preprocessing(cfg);</font></div></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">%%</span><br>


</div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px"><br></span></div><div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">example #2</span></div>


<div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">%%</span></div><div><font color="#000000" face="Times New Roman" size="3">% if you executed these command lines</font></div><div><div>


<font color="#000000" face="Times New Roman" size="3">cfg                            = [];</font></div><div><font color="#000000" face="Times New Roman" size="3">cfg.dataset                = </font><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"> '~~~ '; % your filename with file extension;</span></div>


<div><font color="#000000" face="Times New Roman" size="3">cfg.trialdef.eventtype  = '?';       % Status notation maybe Biosemi's tigger name</font></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">cfg                            = ft_definetrial(cfg); </span><br>


</div><div><br></div></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">% result example #2</span></div></div><div><div><font color="#000000" face="Times New Roman" size="3">the following events were found in the datafile</font></div>


<div><font color="#000000" face="Times New Roman" size="3">event type: 'CM_in_range' with event values: </font></div><div><font color="#000000" face="Times New Roman" size="3">event type: 'Epoch' with event values: </font></div>


<div><font color="#000000" face="Times New Roman" size="3">event type: 'STATUS' with event values: 1    2    3    4  255         </font><font color="#ff0000" face="Times New Roman" size="3"> <----------- "this indicate your file configuration for trigger information"</font></div>


<div><font color="#000000" face="Times New Roman" size="3">no trials have been defined yet, see FT_DEFINETRIAL for further help</font></div><div><font color="#000000" face="Times New Roman" size="3">found 255 events</font></div>


<div><font color="#000000" face="Times New Roman" size="3">created 0 trials</font></div><div><font color="#000000" face="Times New Roman" size="3">the call to "ft_definetrial" took 8 seconds</font></div>
<div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px"><br></div></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px">have fun~!!</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:16px"><br>


</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-26 17:58 GMT+09:00 Diego Lozano Soldevilla <span dir="ltr"><<a href="mailto:d.lozanosoldevilla@fcdonders.ru.nl" target="_blank">d.lozanosoldevilla@fcdonders.ru.nl</a>></span>:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><font style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium" size="3">Hi Ana,</font><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt">


<br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt">
Fieldtrip does not read events in BDF format. Take a look to our wiki:</div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:12pt"><br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">



<a href="http://fieldtrip.fcdonders.nl/getting_started/egi" target="_blank">http://fieldtrip.fcdonders.nl/getting_started/egi</a></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">


<br></div><ul style="font-size:15.555556297302246px;padding:0px;margin:0px 0px 1em 3.5em;line-height:1.5em;list-style-type:square;color:rgb(99,140,156);font-family:Calibri,Geneva,Arial,Verdana,sans-serif;text-align:justify">



<li style="padding:0px;margin:0px"><div style="padding:0px;margin:0px;color:rgb(0,0,0)"><strong style="padding:0px;margin:0px">EDF+</strong> (.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.</div>



</li></ul><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">As Arjen suggested, with *.RAW you shouldn't have any problem. </div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">



<br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">event = ft_read_event('*.RAW')</div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">



<br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">If you encounter it, please let us know.</div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">



<br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">best,</div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium"><br></div><div style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium">



Diego</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 May 2014 08:59, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Ana Laura,<br><br></div>Have you tried importing the .RAW file directly? That is, by specifying cfg.dataset = 'XXX.raw'?<br>



<br></div><div>Best regards,<br></div><div>Arjen<br></div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-26 2:30 GMT+02:00 Ana Laura Diez Martini <span dir="ltr"><<a href="mailto:diezmartini@gmail.com" target="_blank">diezmartini@gmail.com</a>></span>:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all!<br><br><a href="https://www.dropbox.com/s/xu5a9jwefpxnx2v/RAWconTriggers.bdf" target="_blank">This is the .BDF file </a>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:<br>





<br>cfg = [];<br>cfg.dataset = ' (location)';<br>cfg.trialdef.eventtype  = '?';<br>definetrial(cfg);<br>Warning: no trialfun was specified, using trialfun_general<br>> In definetrial at 79<br>evaluating trialfunction 'trialfun_general'<br>





no events were found in the datafile<br>no trials have been defined yet, see DEFINETRIAL for further help<br>found 0 events<br>created 0 trials<div><br></div><div>EEGlab does read them. Any idea of what could be wrong?</div>





<div><br></div><div>Thank you all!!</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>----------------------------------------------------------------<br>


Chungki Lee, Ph.D.<br>Post-doc <br>Biomedical Research Institute <br>Korea Institute of Science and Technology <br>E-mail: <a href="mailto:chungki@kist.re.kr" target="_blank">chungki@kist.re.kr</a></div>
<div>Tel:<a href="tel:%2B82-2-958-5636" target="_blank">+82-2-958-5636</a>, C.P: <a href="tel:%2B82-10-5223-7309" target="_blank">+82-10-5223-7309</a></div>
<div>----------------------------------------------------------------<br></div>
</div>
<br>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>

</div></blockquote><span><font color="#888888"><br><br><br>-- <br><div><span></span>PhD Student<br>Neuronal Oscillations Group<br>Donders Institute for Brain, Cognition and Behaviour <br>Centre for Cognitive Neuroimaging<br>

Radboud University Nijmegen <br>NL-6525 EN Nijmegen<br>The Netherlands<br><a href="http://www.ru.nl/people/donders/lozano-soldevilla-d/" target="_blank">http://www.ru.nl/people/donders/lozano-soldevilla-d/</a><span></span><br>

</div></font></span></div></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>
</div></div></blockquote><div><div class="h5"><br><br><br>-- <br><div><span name="x"></span>PhD Student<br>Neuronal Oscillations Group<br>Donders Institute for Brain, Cognition and Behaviour <br>Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen <br>NL-6525 EN Nijmegen<br>The Netherlands<br><a href="http://www.ru.nl/people/donders/lozano-soldevilla-d/" target="_blank">http://www.ru.nl/people/donders/lozano-soldevilla-d/</a><span name="x"></span><br>
</div></div></div></div></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>