klip

jwst.coron.klip.klip(target_model, refs_model, truncate, return_psf=True)[source]

Apply KLIP algorithm to science data.

Parameters:
target_modelCubeModel

The input images of the target (NINTS x NROWS x NCOLS). Multiple integrations within a single exposure are stacked along the first (NINTS) axis of the data arrays. Updated in-place.

refs_modelCubeModel

The input 3D stack of reference images (NINTS_PSF x NROWS x NCOLS). The first (NINTS_PSF) axis is the stack of aligned PSF integrations for that target image.

truncateint

Indicates how many rows to keep in the Karhunen-Loeve transform.

return_psfbool, optional

If True, the PSF fit to the target image will be returned as a separate datamodel.

Returns:
target_modelCubeModel

Science target data model with PSF subtracted.

output_psfCubeModel, optional

Data model of PSF fitted to target image. Returned only if return_psf is set to True.