<div dir="ltr">Great -- pull request welcome. I don't know too much about those files, but would be happy to review any proposed changes. If you can'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"><<a href="mailto:alexandre.barachant@gmail.com" target="_blank">alexandre.barachant@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">i'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"><<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>></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'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>
> Hi Hari,<br>
><br>
> Using ```stim_channel='Status'``` helped a lot. Now the pattern of stim<br>
> codes match the output from ```stim_channel=None```.<br>
><br>
> Using ```mask=-256``` returned an empty array, but then I tried<br>
> ```mask=255``` and got the following event codes ```[ 4096 8192 16384<br>
> 32768]```, which works for me.<br>
><br>
> Thanks!<br>
> Alan<br>
><br>
><br>
><br>
> On Mon, Jun 1, 2015 at 1:38 PM, Hari Bharadwaj <<a href="mailto:hari@nmr.mgh.harvard.edu" target="_blank">hari@nmr.mgh.harvard.edu</a>><br>
> wrote:<br>
><br>
>> Hi Alan,<br>
>><br>
>> Can you try with read_raw_edf(.., stim_channel='Status') and then<br>
>> find_events(..., mask=-256) and see if it helps?<br>
>><br>
>> Hari<br>
>><br>
>><br>
>><br>
>> On Mon, June 1, 2015 4:18 pm, Alan wrote:<br>
</span>>> > Hey everyone. I’m back after almost a year of taking my quals<br>
>> and<br>
>> > collecting data!<br>
>> ><br>
>> > I’m now analysing a set of EEG data using a 64 channel biosemi<br>
<span>>> cap<br>
>> (.bdf<br>
>> > format). I used mne.io.read_raw_edf and I noticed that the event<br>
>> channel<br>
>> > had no information in it (an array of 255). As a work around, I tried<br>
>> > setting stim_channel=None, and this seemed to recover the info from<br>
>> the<br>
>> > stim channel, except that the event codes that I would expect from<br>
>> biosemi<br>
>> > are [16, 32, 64, 128]. Instead I get [-68113930, -68072970, -67991050,<br>
>> > -67827210].<br>
>> ><br>
</span>>> > I’m wondering if this is a bug in my recording setup or if<br>
<div><div>>> anyone else<br>
>> > using biosemi has had similar issues. If the ladder case, is there a<br>
>> > setting I could code into mne.io.read_raw_edf?<br>
>> ><br>
>> > -Alan<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>
>> --<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>
>><br>
>><br>
>> The information in this e-mail is intended only for the person to whom<br>
>> it<br>
>> is<br>
>> addressed. If you believe this e-mail was sent to you in error and the<br>
>> e-mail<br>
>> contains patient information, please contact the Partners Compliance<br>
>> 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<br>
>> in<br>
>> error<br>
>> but does not contain patient information, please contact the sender and<br>
>> properly<br>
>> dispose of the e-mail.<br>
>><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>
<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>