subtract_psfs

one_pass_fitting.subtract_psfs(data, cat, mod, size=None)

Subtracts PSF models from the specified positions in the data.

Parameters

datandarray

The image from which to subtract the psfs

catTable

Astropy table containing flux and positions. The flux column must be labeled ‘f’ and the positions must be ‘x’ and ‘y’. The fluxes must be in the same units as the data and the positions must be in zero-indexed pixels

modGriddedPSFModel

The PSF model to generate the star images from the fit values

sizeint or iterable of length 2 or None, optional

Size of the cutout. If None, the size is determined based on the PSF model shape.

Returns

differencendarray

The data array with PSF models subtracted.