subtract_psf¶

photutils.psf.
subtract_psf
(data, psf, posflux, subshape=None)[source]¶ Subtract PSF/PRFs from an image.
 Parameters
 data
NDData
or array (must be 2D) Image data.
 psf
astropy.modeling.Fittable2DModel
instance PSF/PRF model to be subtracted from the data.
 posfluxArraylike of shape (3, N) or
Table
Positions and fluxes for the objects to subtract. If an array, it is interpreted as
(x, y, flux)
If a table, the columns ‘x_fit’, ‘y_fit’, and ‘flux_fit’ must be present. subshapelength2 or None
The shape of the region around the center of the location to subtract the PSF from. If None, subtract from the whole image.
 data
 Returns
 subdatasame shape and type as
data
The image with the PSF subtracted
 subdatasame shape and type as