<div dir="ltr">Hi David,<div><br></div><div>The BDF file does have the original stimulus channel. </div><div><br></div><div>Since your trigger values are represented from 0 to 32 (first six bits) and we permit trigger values up to 2**17 (some DIO triggering device can permit up 24bit triggers), you will need to mask the higher bit values of the trigger channel.</div><div><br></div><div>This can be done with the function, <font color="#ffffff" style="background-color:rgb(0,0,0)">mne.find_events(raw=raw, mask=2**17 - 32)</font>. This should provide you with your triggers. </div><div><br></div><div>I just started a <a href="https://github.com/mne-tools/mne-python/issues/3284">discussion</a> on github about this mask argument, and there might be an API change to make it more user-friendly. As for now, this would be the solution to your problem.</div><div><br></div><div>HTH</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>teon</div><div>--</div><div><span style="font-size:12.8px"><a href="http://teonbrooks.github.io" target="_blank">Teon Brooks</a>, PhD Candidate</span></div><div>twitter: <a href="http://www.twitter.com/teon_io" target="_blank">@teon_io</a></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Sun, Jun 5, 2016 at 4:45 AM, David Soto <span dir="ltr">&lt;<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>&gt;</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 class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Hi Teon,</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">thanks for the message. True I uploaded .edf version of the original .bdf </div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">the original pdf can be found here </div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><a href="https://drive.google.com/open?id=0B0PbSnFq24yMZWxoWGNFNGctQmM" target="_blank">https://drive.google.com/open?id=0B0PbSnFq24yMZWxoWGNFNGctQmM</a><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">I think the channel info was &#39;STI 014&#39; as this appears to be the only place where I get events id</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><span>[ 65281  65282 etc</span>]</p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><br></p><div class="gmail_default">definitely I am missing something in how to read the triggers from biosemi<br></div><div><br></div></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Looking at mne.io.read_raw_edf, there appears to be required an annotation file and annotation map to interprete the stim_channel...but am not clear what is to be done here<br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">cheers,</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">david</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2016 at 03:13, Teon Brooks <span dir="ltr">&lt;<a href="mailto:teon.brooks@gmail.com" target="_blank">teon.brooks@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>I just had a look at your edf file that you uploaded, and quick question, is this the correct file or is there a .BDF that you are trying to analyze? </div><div>I had a look at the header of this file, and there isn&#39;t a stim channel listed ($head Anna\ Priming-edf.edf). Here, I see that there are 132 EEG channels, and two reference channels. Is this the same file your colleague looked at, if so, what channel did they see the corresponding trigger channels on?</div><div><br></div><div>Quick explanation for what you saw on the supposed trigger channel: the reader assumes the last channel of the data block is the stimulus channel (i.e. stim_channel=-1), which is the typical setting. The values you saw were the software attempt to decode the stim channel values.</div><div><br></div><div>You can look to see how the test data for edf and bdf list either triggers or annotation for the triggering information (cf. mne-python/mne/io/edf/tests/data/).</div><div><br></div><div>Feel free to follow up and I can try to further debug this problem.</div><div><br></div><div>Hope this helps,</div>







</div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>teon</div><div>--</div><div><span style="font-size:12.8px"><a href="http://teonbrooks.github.io" target="_blank">Teon Brooks</a>, PhD Candidate</span></div><div>twitter: <a href="http://www.twitter.com/teon_io" target="_blank">@teon_io</a></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div>On Sat, Jun 4, 2016 at 5:07 PM, David Soto <span dir="ltr">&lt;<a href="mailto:d.soto.b@gmail.com" target="_blank">d.soto.b@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">Hi, <br><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">I have data from  a study in which  Eprime was used  to send triggers (integer numbers from 0-32) to the eeg system.<br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">When I load the data using &#39;mne.io.read_raw_edf&#39; and I try to load the the trigger info  &#39;mne.find_events(mydata)&#39; I see only 5 digit numbers  such as 65303, and even when I count the number of triggers of each type it does not match what is expected.</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">I also tried to convert these numbers to 2 high and low byte numbers but again the actual numbers and the amount do not match what is expected. I have no idea what the problem is but I am sure the trigger info is well contained in the  .bdf file, as a colleague of mine analysed this data for a different research  purpose using Brain Vision Analyser. I am quite keen on learning mne-python so any advise on how to load this trigger info would be much appreciated.</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">In case it is useful a sample of the data can be downloaded here</div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><a href="https://drive.google.com/open?id=0B0PbSnFq24yMc2tKU29zWHZKRU0" target="_blank">https://drive.google.com/open?id=0B0PbSnFq24yMc2tKU29zWHZKRU0</a><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">thanks!</div><span><font color="#888888"><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:garamond,serif;font-size:large;color:rgb(0,0,0)">david</div><div><br></div></font></span></div>
<br></div></div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>