A way to obtain ica.exclude selections without closing ica.plot_sources window?

  • MNE .240
  • Mac OS 11.6.1

This question is closely related to that at Obtaining bad channels and annotations from command line without closing plot window

In my tkinter GUI, I frequently need to retrieve the current selection of bad channels while the window is still open so I can execute a command from a pull-down menu. If my plot is labelled fig=raw.plot(), the current bad channels are given by bads=fig.mne.info['bads']

I’m curious to know if there is something similar for determining the unselected components of a figure showing ICA sources. In particular, if ica is an instance of ICA and if


can one determine the current indices in ica.exclude without actually closing the figure?