Python ica_command

import sys
import anywave

anywave.init(sys.argv)

# assume the current data file open has ica matrices loaded 
# we want to reject component 10 and 15 of MEG IC
cfg = dict()
cfg['labels'] = ['M_IC10', 'M_IC15']
cfg['command'] = 'reject'

anywave.ica_command(cfg)  # anywave will mark channels as rejected and rebuild the MEG signals.   
# this is similar of what the user can do manually by rejecting ICA channels (components)  


# if no command is speficied in cfg,  reject will be done by default.   
# set command to 'undo' to undo previously rejections.