# troubles with mne.io.read\_raw\_brainvision

**URL:** <https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [May 24, 2017, 10:10am UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224 "2017-05-24T10:10:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 24, 2017, 10:10am UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224/1 "2017-05-24T10:10:10Z")

</div>

Hello,I am using mne.io.read\_raw\_brainvision to read bipolar EMG and EKG data saved as brainvision files (vhdr).  
I have 4 channels: EMGleft,EMGright,EKG and STI 014 with the triggers.  
However, when I import the data in MNE python, the first three channels are not correctly imported.They all look like a combination of EMG data, however they do not correspond to the original data, particularly even the third channel is not at all EKG. You can see attached to the email the images with a portion of imported data from the three channels.  
Is it possible that the function is using a reference by default? I don't see this option in the function.This is how I am using the function:  
emg = mne.io.read\_raw\_brainvision(emgFname,montage=None, misc='auto',scale=1.0,preload=True, verbose=True) I don't get any error. But the data are not correctly imported.  
Any ideas?

Many thanks,Stefania  
Stefania Ficarella, Ph.D.Laboratoire de Neurosciences Cognitives (LNC)Centre National de la Recherche Scientifique (CNRS)Aix-Marseille Universit?Site Saint Charles3, Place Victor Hugo13331 Marseille (France)  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170524/56686f44/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170524/56686f44/attachment-0001.html)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: EMGright.png  
Type: image/png  
Size: 15205 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170524/56686f44/attachment-0003.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170524/56686f44/attachment-0003.png)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: EMGleft.png  
Type: image/png  
Size: 13468 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170524/56686f44/attachment-0004.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170524/56686f44/attachment-0004.png)  
-------------- next part --------------  
A non-text attachment was scrubbed...  
Name: EKG.png  
Type: image/png  
Size: 15697 bytes  
Desc: not available  
Url : [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170524/56686f44/attachment-0005.png](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170524/56686f44/attachment-0005.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 24, 2017, 10:37am UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224/2 "2017-05-24T10:37:43Z")

</div>

hi Stefania,

can you share the file?

thanks  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 24, 2017, 2:06pm UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224/3 "2017-05-24T14:06:54Z")

</div>

Hello,

Just an update on Stefania comments.

Investigating the issue, it appears that mne.io.read\_raw\_brainvision is  
currently not using the information about data orientation in the header  
(.vhdr) file:

DataOrientation=VECTORIZED

Apparently, the function assumes that data are multiplexed. It's just a  
matter of transposing the matrix while reading. I'll try to pinpoint the  
lines in mne.io.read\_raw\_brainvision where this should be done.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Best,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 24, 2017, 2:12pm UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224/4 "2017-05-24T14:12:12Z")

</div>

Excellent, thanks for investigating. Can you open a GitHub issue or PR and  
we can iterate there?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [May 25, 2017, 7:45am UTC](https://mne.discourse.group/t/troubles-with-mne-io-read-raw-brainvision/1224/5 "2017-05-25T07:45:47Z")

</div>

hi,

to follow up I created the issue:

[https://github.com/mne-tools/mne-python/issues/4283](https://github.com/mne-tools/mne-python/issues/4283)

Alex
