I’m trying to use MNE functions to detect ECG and EOG patterns to remove their artifacts using ICA . mne.preprocessing.create_ecg_epochs() and detect_artifacts() functions need channels or time series for ECG and EOG to identify the patterns. But, I don’t have channel and time series for ECG and EOG. Can you please let me know how can I reject ECG and EOG artifacts using ICA without having a channel for them or their time series?
heartbeat artifacts can be fairly reliably detected from magnetometers. See this tutorial section and the ch_name parameter of find_ecg_events(). You’ll also notice in the ICA tutorial that one of the output boxes says Reconstructing ECG signal from Magnetometers.
Blink artifacts can be detected by using one of the frontal EEG channels as a surrogate EOG. You should examine your data to see which channel has the most clear/obvious blink response in it, and pass that as ch_name. Beware though that this can inadvertantly remove brain signal, especially if the blink detection algorithm does a mediocre job of aligning to actual blinks, so be sure to plot the artifacts to make sure they look right.
Thank you for your response Dan.
I’m importing my data from EDF files using mne.io.read_raw_edf(), but I cannot import the data for magnetometers. Is it possible that this is happening because sampling rates for eeg and mag data are different? If yes, how can I use these magnetometer data for heart beat detection?