@verbose
def _band_pass_filter(ica, sources, target, l_freq, h_freq, verbose=None):
 if ((l_freq is not None) and (h_freq is not None)):
  logger.info('... filtering ICA sources')
  kw = dict(phase='zero-double', filter_length='10s', fir_window='hann', l_trans_bandwidth=0.5, h_trans_bandwidth=0.5)
  sources = filter_data(sources, ica.info['sfreq'], l_freq, h_freq, **kw)
  logger.info('... filtering target')
  target = filter_data(target, ica.info['sfreq'], l_freq, h_freq, **kw)
 elif ((l_freq is not None) or (h_freq is not None)):
  raise ValueError('Must specify both pass bands')
 return (sources, target)

@ verbose def _band_pass_filter ( ica , sources , target , l_freq , h_freq , verbose = None ) : if ( ( l_freq is not None ) and ( h_freq is not None ) ) : logger . info ( '... filtering ICA sources' ) kw = dict ( phase = 'zero-double' , filter_length = '10s' , fir_window = 'hann' , l_trans_bandwidth = 0.5 , h_trans_bandwidth = 0.5 ) sources = filter_data ( sources , ica . info [ 'sfreq' ] , l_freq , h_freq , ** kw ) logger . info ( '... filtering target' ) target = filter_data ( target , ica . info [ 'sfreq' ] , l_freq , h_freq , ** kw ) elif ( ( l_freq is not None ) or ( h_freq is not None ) ) : raise ValueError ( 'Must specify both pass bands' ) return ( sources , target )
optionally band-pass filter the data .