pca_solve¶
-
pydl.pydlspec2d.spec1d.
pca_solve
(newflux, newivar, maxiter=0, niter=10, nkeep=3, nreturn=None, verbose=False)[source]¶ Replacement for idlspec2d pca_solve.pro.
Parameters: newflux : array-like
The input spectral flux, assumed to have a common wavelength and redshift system.
newivar : array-like
The inverse variance of the spectral flux.
maxiter :
int
, optionalStop PCA+reject iterations after this number.
niter :
int
, optionalStop PCA iterations after this number.
nkeep :
int
, optionalNumber of PCA components to keep.
nreturn :
int
, optionalNumber of PCA components to return, usually the same as
nkeep
.verbose :
bool
, optionalIf
True
, print extra information.Returns: The PCA solution.