I have been recording some EEG data from the gtec Nautilus headset. I am trying to plot it via the MNE package but I have struggles with it. The channel’s data aren’t showing up properly. What is going wrong? I can plot it correctly when i simply use plt.plot()…
The data seems to be scaled incorrectly. MNE expects EEG signal in V, and you probably have it in µV. Therefore, dividing by 10^6 to convert to V might do the trick.
This array represents the mean for every channel (16 channels)
[-2.07639746e-08 -1.84736637e-08 -2.60456712e-08 -1.07056338e-08
-3.50582107e-08 -8.93639772e-09 -2.36951378e-08 -8.13024605e-09
9.41100607e-10 -1.02837258e-08 -1.13612198e-09 -5.76478096e-09
1.24304284e-08 1.30558460e-08 -5.09543558e-09 7.85983950e-08]`
The next array represents the maxima of every channel:
[4.19258301e-03 2.51899976e-03 1.18923574e-02 3.62315552e-03
9.63265869e-04 3.24972290e-03 3.21279810e-03 2.31229419e-03
3.85584741e-03 2.48471753e-03 4.42166113e-03 9.40465942e-04
1.71706201e-03 6.89180762e-03 3.11295020e-03 2.03371510e-07]
Then you can see the array with every minima of every channel:
[-1.16874329e-03 -9.32007715e-03 -3.22880933e-03 -1.01792151e-03
-3.49732837e-03 -9.11778992e-04 -1.19499248e-02 -6.65349365e-04
-1.07882239e-03 -9.21418945e-03 -1.23046838e-03 -3.44146021e-03
-6.36056641e-03 -2.56745801e-02 -8.62682251e-04 -1.25151694e-07]
Hm, unless these are artifact spikes it looks like your data is stored in mV? Can you try dividing by 1000 to see if this gives proper µV data traces? If that doesn’t work, can you post how it looks like when plotting with plt.plot()?
x = np.arange(0,270,0.002) #270%0.002 samples in total
x=x[:,np.newaxis]
y=eeg_raw_np[6,:]
y=y[:,np.newaxis]
plt.plot(x,y,'-', markersize=1)
plt.axis([50, 200, -0.2, 0.2]) #used to zoom in
OK, the data is definitely not scaled correctly. You should see a signal between ±50µV (depends on the derivation of course, so this is just a guess), but you have ±50mV. Therefore, dividing by 1000 should solve the plotting issue. There’s a huge artifact at the beginning, so make sure to scroll forward to around second 30 to see the signals.
When I tried to use the MNE library, I divided my data by both1000 and 10e6 but it does not change anything… I forgot to tell you just before it’s really weird because clearly there should be something
It seems that I cannot share via this post my CSV file. Is there any other way ? I tried to convert it to PNG but impossible since my file is too big, I tried to make it smaller but still not successful.
But it still shows this very bad plot
It might be something to do with the packages , because there is this red warning. I will try to maybe update some packages or smtgh
You need to scroll to second 50, there is a huge spike at the start of the data. Then, you probably need to adjust the zoom level a bit. You can also do rawAurore.plot(clipping=None) to allow the traces to be drawn outside their bounding box.
About that warning: it is best to completely remove the two lines where you set the lowpass and highpass (but this doesn’t affect the plotted data at all).