Error importing Visual Evocked Potential

First I imported the continous file (with "review raw" function), actually it worked and the file was imported but with no events, I don't know why

There is something weird in this file, maybe there was an error while it was saved.
The field "numevents" is set to zero, while there are events defined in the file...
I added a hack to the reading function to bypass the test (numevents>0) so that events could be read in this case. I hope this is not going to break anything else...
IO: Neuroscan .cnt: Allow reading events when numevents=0 · brainstorm-tools/brainstorm3@852c6b8 · GitHub

Where did this file come from?
Can you see the events when opening with the Neuroscan software? Or with any other software?

Then I tried to import the averaged file (avg) but I got this error message:

You hit another blind spot in the Neuroscan reading functions. This .avg file is weirdly defined, as the pre-stimulus baseline (time before the stim) is not a round number of samples. In other terms, there are two samples at t=-2ms and one at t=2ms, but no recordings at t=0ms (at 250Hz, the sampling period is 4ms). I realized that this special case can't be handled in Brainstorm...

I fixed the reader so that it rounds to the closest sample, therefore the first sample won't be displayed as being -50ms (as defined in the .avg header) but as -52ms, so that we have a sample at t=0ms.

Update Brainstorm to get both fixes and try again opening your files.

1 Like