I want to transform my EEG data with the Current source density transformation, and I followed the guide in Transform EEG data using current source density (CSD) — MNE 1.1.1 documentation. Before the transformation, I removed 6 channels. And then plot the transformed data. However, no EEG values are plotted. The figure is empty. I do not know how to deal with this situation. Could you help me with this?
- MNE version: 1.1.1
- operating system: Windows 10
My code is as follows:
%matplotlib inline
import os
import os.path as op
import mne
import numpy as np
import pandas as pd
examples_dir = r'F:\eeg\preprocess-byscript' # Path to the raw EEG Data folder
sub_file = examples_dir+ r'\event_1.set' # Path to the raw EEG header file print(sub_file)
examples_dir = r'F:\eeg\preprocess-byscript' # Path to the raw EEG Data folder
sub_file = examples_dir+ r'\event_1.set' # Path to the raw EEG header file
print(sub_file)
raw = mne.io.read_raw_eeglab(sub_file) # Returns a Raw object containing BrainVision data
raw.load_data() # Loading continuous data
raw=raw.drop_channels(['CB1','CB2','VEO','HEO','M1','M2'])
raw_csd = mne.preprocessing.compute_current_source_density(raw)
raw.plot()
raw_csd.plot()