def pick_types_forward(orig, meg=True, eeg=False, ref_meg=True, seeg=False, ecog=False, include=[], exclude=[]):
 info = orig['info']
 sel = pick_types(info, meg, eeg, ref_meg=ref_meg, seeg=seeg, ecog=ecog, include=include, exclude=exclude)
 if (len(sel) == 0):
  raise ValueError('No valid channels found')
 include_ch_names = [info['ch_names'][k] for k in sel]
 return pick_channels_forward(orig, include_ch_names)

def pick_types_forward ( orig , meg = True , eeg = False , ref_meg = True , seeg = False , ecog = False , include = [ ] , exclude = [ ] ) : info = orig [ 'info' ] sel = pick_types ( info , meg , eeg , ref_meg = ref_meg , seeg = seeg , ecog = ecog , include = include , exclude = exclude ) if ( len ( sel ) == 0 ) : raise ValueError ( 'No valid channels found' ) include_ch_names = [ info [ 'ch_names' ] [ k ] for k in sel ] return pick_channels_forward ( orig , include_ch_names )
pick by channel type and names from a forward operator .