@verbose
def whiten_evoked(evoked, noise_cov, picks=None, diag=False, rank=None, scalings=None, verbose=None):
 evoked = cp.deepcopy(evoked)
 if (picks is None):
  picks = pick_types(evoked.info, meg=True, eeg=True)
 W = _get_whitener_data(evoked.info, noise_cov, picks, diag=diag, rank=rank, scalings=scalings)
 evoked.data[picks] = (np.sqrt(evoked.nave) * np.dot(W, evoked.data[picks]))
 return evoked

@ verbose def whiten_evoked ( evoked , noise_cov , picks = None , diag = False , rank = None , scalings = None , verbose = None ) : evoked = cp . deepcopy ( evoked ) if ( picks is None ) : picks = pick_types ( evoked . info , meg = True , eeg = True ) W = _get_whitener_data ( evoked . info , noise_cov , picks , diag = diag , rank = rank , scalings = scalings ) evoked . data [ picks ] = ( np . sqrt ( evoked . nave ) * np . dot ( W , evoked . data [ picks ] ) ) return evoked
whiten evoked data using given noise covariance .