def _close_event(events, params):
 info = params['info']
 c_names = [('IC #%03d' % x) for x in range(params['ica'].n_components_)]
 exclude = [c_names.index(x) for x in info['bads'] if x.startswith('IC')]
 params['ica'].exclude = exclude

def _close_event ( events , params ) : info = params [ 'info' ] c_names = [ ( 'IC #%03d' % x ) for x in range ( params [ 'ica' ] . n_components_ ) ] exclude = [ c_names . index ( x ) for x in info [ 'bads' ] if x . startswith ( 'IC' ) ] params [ 'ica' ] . exclude = exclude
exclude the selected components on close .