def _get_ch_whitener(A, pca, ch_type, rank):
 (eig, eigvec) = linalg.eigh(A, overwrite_a=True)
 eigvec = eigvec.T
 eig[:(- rank)] = 0.0
 logger.info(('Setting small %s eigenvalues to zero.' % ch_type))
 if (not pca):
  logger.info(('Not doing PCA for %s.' % ch_type))
 else:
  logger.info(('Doing PCA for %s.' % ch_type))
  eigvec = eigvec[:(- rank)].copy()
 return (eig, eigvec)

def _get_ch_whitener ( A , pca , ch_type , rank ) : ( eig , eigvec ) = linalg . eigh ( A , overwrite_a = True ) eigvec = eigvec . T eig [ : ( - rank ) ] = 0.0 logger . info ( ( 'Setting small %s eigenvalues to zero.' % ch_type ) ) if ( not pca ) : logger . info ( ( 'Not doing PCA for %s.' % ch_type ) ) else : logger . info ( ( 'Doing PCA for %s.' % ch_type ) ) eigvec = eigvec [ : ( - rank ) ] . copy ( ) return ( eig , eigvec )
get whitener params for a set of channels .