<div dir="ltr">Great -- pull request welcome. I don&#39;t know too much about those files, but would be happy to review any proposed changes. If you can&#39;t get it to work, if you can supply a (preferably short) failing file via dropbox we can work it out on GitHub.<div><br></div><div>Eric</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 1, 2015 at 4:16 PM, <a href="mailto:alexandre.barachant@gmail.com" target="_blank">alexandre.barachant@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:alexandre.barachant@gmail.com" target="_blank">alexandre.barachant@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">i&#39;m not sure it is the same problem, but i was about to report a similar bug.<div>since a recent update of mne (something around 0.9), trigger channels are not calibrated properly :</div><div><br></div><div><img src="cid:ii_14db14f9d23b9c88" alt="Images intégrées 1" width="389" height="262"><br></div><div><br></div><div>Most of edf file writer rescale your data so they span across the 16 bit range. In my case, i have 0/1 triggers, so raw triggers data are stored in the edf file as -32767 / + 32767.</div><div>mne ignore this and force the gain and offset of trigger channel to 1 and 0 resp.</div><div>In addtion, mne force stim channel to be an unsigned int16, so at the end i get something going from 0 to +32767.</div><div><br></div><div>I will try to make a patch as soon as i can.</div><div><br></div><div>Alex</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-01 18:35 GMT-04:00 Hari Bharadwaj <span dir="ltr">&lt;<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hmm.. Because these are single bit triggers, I&#39;d check the hardware to<br>
make sure if the mapping between this and your intended triggers make<br>
sense (especially ascending versus descending).<br>
<br>
Hari<br>
<span><br>
<br>
<br>
On Mon, June 1, 2015 5:26 pm, Alan wrote:<br>
&gt; Hi Hari,<br>
&gt;<br>
&gt; Using ```stim_channel=&#39;Status&#39;``` helped a lot. Now the pattern of stim<br>
&gt; codes match the output from ```stim_channel=None```.<br>
&gt;<br>
&gt; Using ```mask=-256``` returned an empty array, but then I tried<br>
&gt; ```mask=255``` and got the following event codes ```[ 4096  8192 16384<br>
&gt; 32768]```, which works for me.<br>
&gt;<br>
&gt; Thanks!<br>
&gt; Alan<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Jun 1, 2015 at 1:38 PM, Hari Bharadwaj &lt;<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;&gt; Hi Alan,<br>
&gt;&gt;<br>
&gt;&gt;   Can you try with read_raw_edf(.., stim_channel=&#39;Status&#39;) and then<br>
&gt;&gt; find_events(..., mask=-256) and see if it helps?<br>
&gt;&gt;<br>
&gt;&gt; Hari<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, June 1, 2015 4:18 pm, Alan wrote:<br>
</span>&gt;&gt; &gt; Hey everyone. I’m back after almost a year of taking my quals<br>
&gt;&gt; and<br>
&gt;&gt; &gt; collecting data!<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I’m now analysing a set of EEG data using a 64 channel biosemi<br>
<span>&gt;&gt; cap<br>
&gt;&gt; (.bdf<br>
&gt;&gt; &gt; format). I used mne.io.read_raw_edf and I noticed that the event<br>
&gt;&gt; channel<br>
&gt;&gt; &gt; had no information in it (an array of 255). As a work around, I tried<br>
&gt;&gt; &gt; setting stim_channel=None, and this seemed to recover the info from<br>
&gt;&gt; the<br>
&gt;&gt; &gt; stim channel, except that the event codes that I would expect from<br>
&gt;&gt; biosemi<br>
&gt;&gt; &gt; are [16, 32, 64, 128]. Instead I get [-68113930, -68072970, -67991050,<br>
&gt;&gt; &gt; -67827210].<br>
&gt;&gt; &gt;<br>
</span>&gt;&gt; &gt; I’m wondering if this is a bug in my recording setup or if<br>
<div><div>&gt;&gt; anyone else<br>
&gt;&gt; &gt; using biosemi has had similar issues. If the ladder case, is there a<br>
&gt;&gt; &gt; setting I could code into mne.io.read_raw_edf?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -Alan<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Mne_analysis mailing list<br>
&gt;&gt; &gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt;&gt; &gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Hari Bharadwaj<br>
&gt;&gt; Research Fellow<br>
&gt;&gt; Martinos Center for Biomedical Imaging,<br>
&gt;&gt; Massachusetts General Hospital<br>
&gt;&gt; 149 Thirteenth Street,<br>
&gt;&gt; Charlestown, MA 02129<br>
&gt;&gt;<br>
&gt;&gt; <a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a><br>
&gt;&gt; Ph: <a href="tel:734-883-5954" value="+17348835954" target="_blank">734-883-5954</a><br>
&gt;&gt; <a href="http://www.haribharadwaj.com" target="_blank">www.haribharadwaj.com</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Mne_analysis mailing list<br>
&gt;&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt;&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The information in this e-mail is intended only for the person to whom<br>
&gt;&gt; it<br>
&gt;&gt; is<br>
&gt;&gt; addressed. If you believe this e-mail was sent to you in error and the<br>
&gt;&gt; e-mail<br>
&gt;&gt; contains patient information, please contact the Partners Compliance<br>
&gt;&gt; HelpLine at<br>
&gt;&gt; <a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you<br>
&gt;&gt; in<br>
&gt;&gt; error<br>
&gt;&gt; but does not contain patient information, please contact the sender and<br>
&gt;&gt; properly<br>
&gt;&gt; dispose of the e-mail.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; Mne_analysis mailing list<br>
&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
--<br>
Hari Bharadwaj<br>
Research Fellow<br>
Martinos Center for Biomedical Imaging,<br>
Massachusetts General Hospital<br>
149 Thirteenth Street,<br>
Charlestown, MA 02129<br>
<br>
<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a><br>
Ph: <a href="tel:734-883-5954" value="+17348835954" target="_blank">734-883-5954</a><br>
<a href="http://www.haribharadwaj.com" target="_blank">www.haribharadwaj.com</a><br>
<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" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
</div></div></blockquote></div><br></div>
</div></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" 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" 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>