Error about brainvision EEG data reading (Xia Tao)

External Email - Use Caution

Hi Alex,
    Thanks for the reply. Attached is one file in my analysis. The script
as following:"*raw_fname=('/home/eeg/sub6_Moral_asso_1.vhdr') *

*montage=mne.channels.read_montage('standard_1020')*
*raw=mne.io.read_raw_brainvision(raw_fname,montage,preload=True)*"
    Thank you very much.
     Regards,
demo.zip
<https://drive.google.com/a/connect.hku.hk/file/d/1udpwmQnKbnlVE10XN1UCN3rkj-Bjg1bP/view?usp=drive_web>

External Email - Use Caution

hi,

the problem is the following. The vhdr header file contains not timestamp
of the onset of the recording but it's written in the vmrk that
contains the annotations.

The vmrk contains:

Mk1=New Segment,1,1,-1,20141204100512303000

So when setting the annotations mne says it does not know the time
of the raw data so it cannot place properly the annotations.

I don't know if it's a bug in the MNE that should allow this. Maybe
someone knows?

In the mean time to fix it you can edit the vmrk file and replace the line above
by:

Mk1=New Segment,1,1,-1,00000000000000000000

hopefully this fixes the problem

HTH
Alex

External Email - Use Caution

Hi Everybody,

The vmrk file in the demo data contains the timestamp: 20141204100512303000

Let me quote from the BrainVision Recorder manual (Appendix C):

The date has the following format:
4 digits = year
2 digits = month
2 digits = day
2 digits = hour (24-hour system)
2 digits = minute
2 digits = second
6 digits = microsecond

Thus, the recording date was the 4th of December, 2014 at 10:05.

To me, this date is well specified. What surprises me however, is the
"-1" in the line:

Mk1=New Segment,1,1,-1,20141204100512303000

The -1 corresponds to the channel index this event relates to. Usually,
this is "0" for the "New Segment" marker (because "0" means the event is
related to all channels). Perhaps this occurs, because the data was
written with PyCorder instead of the more commonly used BrainVision
Recorder? --> See third line in the .vhdr ... it could be a PyCorder bug?

Anyhow, the fix is to change a RegExp in our BrainVision IO code, so
that it can also deal with this unexpected negative number.

I have submitted a PR here:

Let's continue the discussion on GitHub if needed.

Best,

Stefan