@verbose
def _compute_pow_plv(data, K, sel, Ws, source_ori, use_fft, Vh, with_power, with_plv, pick_ori, decim, verbose=None):
 (shape, is_free_ori) = _prepare_tfr(data, decim, pick_ori, Ws, K, source_ori)
 (n_sources, n_times) = shape[:2]
 power = np.zeros(shape, dtype=np.float)
 plv = (np.zeros(shape, dtype=np.complex) if with_plv else None)
 for epoch in data:
  epoch = epoch[sel]
  if (Vh is not None):
   epoch = np.dot(Vh, epoch)
  (power_e, plv_e) = _single_epoch_tfr(data=epoch, is_free_ori=is_free_ori, K=K, Ws=Ws, use_fft=use_fft, decim=decim, shape=shape, with_plv=with_plv, with_power=with_power)
  power += power_e
  if with_plv:
   plv += plv_e
 return (power, plv)

@ verbose def _compute_pow_plv ( data , K , sel , Ws , source_ori , use_fft , Vh , with_power , with_plv , pick_ori , decim , verbose = None ) : ( shape , is_free_ori ) = _prepare_tfr ( data , decim , pick_ori , Ws , K , source_ori ) ( n_sources , n_times ) = shape [ : 2 ] power = np . zeros ( shape , dtype = np . float ) plv = ( np . zeros ( shape , dtype = np . complex ) if with_plv else None ) for epoch in data : epoch = epoch [ sel ] if ( Vh is not None ) : epoch = np . dot ( Vh , epoch ) ( power_e , plv_e ) = _single_epoch_tfr ( data = epoch , is_free_ori = is_free_ori , K = K , Ws = Ws , use_fft = use_fft , decim = decim , shape = shape , with_plv = with_plv , with_power = with_power ) power += power_e if with_plv : plv += plv_e return ( power , plv )
aux function for induced power and plv .