chb-mit dataset montage

Hi,

I’m trying to run ICA on chb-mit dataset, but the MNE seems like didn’t have the bipolar montage.When I try to use the ica.find_bads_muscle command, I get an error:WARNING:root:Did not find any electrode locations
I then tried adding a montage to my data but it seems that mne does not have a montage for the bipolar export.
My code:

import mne

specified_channels = [“FP1-F7”, “F7-T7”, “T7-P7”, “P7-O1”, “FP1-F3”, “F3-C3”, “C3-P3”, “P3-O1”, “FP2-F4”, “F4-C4”, “C4-P4”, “P4-O2”, “FP2-F8”, “F8-T8”, “T8-P8-0”, “P8-O2”, “FZ-CZ”, “CZ-PZ”]
data_path = “…/…/data/Sub01/Original_data/chb01_03.edf”
raw = mne.io.read_raw_edf(data_path, preload=True)
raw.pick_channels(specified_channels)

raw.pick(picks=“eeg”, exclude=“bads”)
raw.load_data()
raw.filter(l_freq=1.0, h_freq=None)

ica = mne.preprocessing.ICA(
n_components=18, method=“picard”, max_iter=“auto”, random_state=97
)
ica.fit(raw)

muscle_idx_auto, scores = ica.find_bads_muscle(raw)
ica.plot_scores(scores, exclude=muscle_idx_auto)
print(
f"Automatically found muscle artifact ICA components: {muscle_idx_auto}"
)

Hello, this is to be expected, as a bipolar reference consists of two electrodes, hence it’s unclear which location belongs to the resulting value. What you could do is drop the “-X” part from the channel names and set a template montage; this way you would be able to visualize half the electrodes… :thinking:

Best wishes,
Richard

Thanks!
I have one more question.
If I drop the “-X” part from the channel names and set a template montage, and then apply ICA to the data, could this approach potentially affect the effectiveness of the ICA?

I’m sorry, I don’t have experience with this kind of data. Maybe @cbrnr can share some insights?

Good luck,
Richard

ICA is completely agnostic to channel locations, so changing labels and/or the montage won’t affect its result at all.

Thanks for your help Richard!

Thanks for your help!
Now I undersatnd!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.