PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v1.0.1 »
- SDSS Spectroscopic Data (`pydl.pydlspec2d`) »
- pca_solve

# pca_solve

pydl.pydlspec2d.spec1d.pca_solve(newflux, newivar, maxiter=0, niter=10, nkeep=3, nreturn=None, verbose=False)

  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`, optional

      Stop PCA+reject iterations after this number.

    niter `int`, optional

      Stop PCA iterations after this number.

    nkeep `int`, optional

      Number of PCA components to keep.

    nreturn `int`, optional

      Number of PCA components to return, usually the same as `nkeep`.

    verbose `bool`, optional

      If `True`, print extra information.

  Returns:
    `dict`

      The PCA solution.