Closed nbeliy closed 4 years ago
Hi @nbeliy ,
I would strongly recommend using the mne.io.read_raw_brainvision to load your BrainVision file into memory, and then using the following lines to extract the data and sampling frequency:
from visbrain.gui import Sleep
from mne.io import read_raw_brainvision
raw = read_raw_brainvision("YOURFILE.vhdr", preload=True)
data = raw.get_data() * 1e6 # Convert Volts to uV
sf = raw.info['sfreq']
channels = raw.ch_names
Sleep(data=data, sf=sf, channels=channels).show()
Hope this helps!
It worked! Thanks a lot!
Dear experts,
I have a BrainVision eeg sample with DataFormat set as IEEE_FLOAT_32 when I try to load it, the Sleep crashes with an assertion error:
It looks easy to fix in
read_sleep.py
by changing the type innp.ndarray
, but will be this the only place to change?When I change data from '<i2' to
float32
, I have following warnings and error:Can you tell what causes these problems? I've put the vhdr file in attachement (changed extention to txt eeg.txt ).