raw.plot scaling changes after 1 second of data

Hi there,

I’m trying to plot filtered raw MEG data to figure out which channels are bad. Unfortunately, for some participants the plots show 1 second of ‘normally’ scaled data, but after that basically show the data in a very different scale. This is the case for a few participants, which makes me wonder if there is a structural setting that needs to be tweaked or if the data needs to be handled in some way before plotting the raw signal.

Does anyone know what is going on here or do you have some tips?

Best,

Olof

  • MNE version: e.g. 0.20.0
  • operating system: e.g. macOS 11.6

Can you rule out that this is what’s actually in the data? Can you share such a problematic file?

I agree with @cbrnr - this looks to be the actual signal. You can verify that by plotting a few seconds of the signal using plain matplotlib:

import matplotlib.pyplot as plt

ch_idx = 10
max_sample = 4000
plt.plot(raw.times[:max_sample], raw._data[ch_idx , :max_sample])

Thanks for your answers.

I think its the actual signal:

Not sure what’s going on here. It’s consistently present from about 1 second of the recording until the end of the file, in this participant and a couple of others. I’ve tried to filter the data in various ways and to look around online but I can’t find a reason yet.

were there HPI coils that got turned on about 1 second into the recording, perhaps? mne.chpi.filter_chpi might help.

2 Likes

Thanks a lot Dan, that did the trick!