I understand that when preprocessing eeg, bad channels are removed after filtering. If do that, it will end up with a situation where the amplitude jumps as shown in the picture. If apply ica and drop the bad channel, it comes out fine when plotting raw. What’s the problem?
Can you do raw.get_data(picks="eeg")[0, :20] and give the values you get here?
Also, all browser accept the scalings argument to control the scaling and the +/- keys on the keyboard to interactively change the scale. That plot with vertical lines is definitely badly scaled… Run with scalings="auto" or press the - key.
That array is definitely not EEG in Volts, but it’s neither EEG in uV…
Maybe one of the channels used in the average re-referencing should not be used? e.g. maybe you have a BIP/ECG/EOG or whatever else channel which type should be first changed from 'eeg' to the appropriate type for this channel with raw.set_channel_types?
The magnitude after re-referencing is off. I assume that there’s at least one channel in your data that is problematic, and the referencing action pollutes the data across all other channels.
Before re-referencing, have a look to your data and find the channel which has an abnormal amplitude. Either it’s an EEG channel, in which case mark it as bad. Or it’s not an EEG channel but has the type 'eeg', in which case correct the type with raw.set_channel_types.