Bad Channels: Annotating subsets of channels for ICA exclusion?

  • MNE 0.20.5 on macOS Catalina 10.15.3 (old version bc this is a very old project, decided to remain consistent with data processing tools from when we started)

I recently started using the annotation feature in when selecting bad channels to interpolate in the raw.plot() GUI. I do this to exclude bursts of noise from ICA in particularly noisy subjects, and later exclude these bursts in epoch preparation. Is there a way to mark only a subset of channels bad via annotation, such that only a selected period of time from from that subset of channels is excluded from ICA and epochs, rather than all channels at that time?

For example:
Typically, I would annotate this burst to exclude from ICA:

However, many channels are not affected:

There is partial support for channel-specific annotations. Currently it is possible when creating annotations programmatically (with code, i.e. the mne.Annotations() constructor) to specify which channel(s) the annotation refers to. However, the colored annotation spans shown in the GUI do not reflect this, and it is currently not possible to create channel-specific annotations interactively by click-dragging in the GUI.

Moreover, when creating epochs, it is not possible (in MNE-Python) to have different numbers of channels in each epoch, so even if you have channel-specific annotations I think they will be treated as all-or-nothing when Epoching (unless you pass reject_by_annotation=False in which case they are ignored anyway). Off the top of my head I’m not sure how channel-specific annotations interact with ICA.

Two things that might (?) help with your use case are the MNE-compatible autoreject package and the mne.equalize_channels() function. There’s been some talk of making equalize_channels() have an option to interpolate rather than drop channels but as far as I can tell that hasn’t happened yet (@richard was the one who suggested it I think? He might know more.)

1 Like