New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug read_raw_brainvision #4283
Comments
Being not familiar with the "_BaseRaw" object, I haven't (yet) identified where the problem is. But to advance a bit, here is a short piece of code that 1) replicate the problem, 2) open the file correctly (through direct memmap). I haven't been able to get the same (wrong) data as mne through a direct memmap, by transposing and/or reshaping differently the array. Hope this can be useful...
|
Is this on master? IIRC we had a problem with long channel names earlier that should now be fixed. WIll try to look at it later, but might take a while :( |
There's a small copy-paste error in the example: mne_data = mne.io.read_raw_brainvision(emgFname+'.vhdr',montage=None, misc='auto',scale=1.0,preload=True, verbose=True)
plt.subplot(311)
plt.plot(mne_data._data[0,22000:120000]) #portion of data where something interesting occurs
plt.subplot(312)
plt.plot(mne_data._data[1,22000:120000])
plt.subplot(313)
# this index needs to be a 2
plt.plot(mne_data._data[2,22000:120000])
# reshaping by hand
raw_data = np.memmap(emgFname+'.eeg', np.float32)
rs_data = raw_data.reshape((3,813056)) #hard coded based on the vhdr file
plt.subplot(311)
plt.plot(rs_data[0,22000:120000])
plt.subplot(312)
plt.plot(rs_data[1,22000:120000])
plt.subplot(313)
plt.plot(rs_data[2,22000:120000])
# data OK |
The fix is relatively straightforward for this example; the trick is that the function that has to be modified isn't in the |
from mailing list
answer by @bburle
problematic file is here
EMG.zip
The text was updated successfully, but these errors were encountered: