troubles with mne.io.read_raw_brainvision

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
-------------- 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
-------------- 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
-------------- 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

hi Stefania,

can you share the file?

thanks
Alex

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.

     Best,
         B.

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

hi,

to follow up I created the issue:

https://github.com/mne-tools/mne-python/issues/4283

Alex