Greetings,
I am exploring different methods of MNE 1.5.1 for preprocessing of MEG and EEG data. At the moment I am working with SSP for artifact rejection of ECG. i am following the documentation and the code works fine (that means the projectors look accurate according to ecg), until i want to look at a joint plot of the projectors.
the example data has no dedicated ECG Channel, but my data has.
if i use the suggested code of the documentation with picks_trace=‘ecg’ for present ecg channel in the data, i get a “ValueError: picks (‘ecg’) could not be interpreted as channel names (no channel “[‘ecg’]”), channel types (no type “ecg” present), or a generic type (just “all” or “data”).”
In addition i tried ‘ECG’ (the actual name of the ecg-channel), what caused the same error.
fig = mne.viz.plot_projs_joint(ecg_projs, ecg_evoked, picks_trace=‘ecg’)
fig.suptitle(“ECG projectors”)
If i use index of the ecg-channel, the plot gets shown, but it takes the “EEG002” channel instead of the ECG channel.
ecg_channel_index = raw.ch_names.index(‘ECG’)
fig =mne.viz.plot_projs_joint(ecg_projs,ecg_evoked,picks_trace=ecg_channel_index)
fig.suptitle(“ECG projectors”)
I am not sure on which data picks_trace is taking the ecg channel, is it from the raw data or from the ecg_evoked? because in the ecg_evoked there is no ECG-channel present
Maybe someone of the forum can tell me what i am missing or how i can correctly use the ECG-channel for the “plot_projs_joint()” function.
Let me know if more information of code is needed.
Thank you in advance!