grid_from_epsfs#

photutils.psf.grid_from_epsfs(epsfs, grid_xypos=None, meta=None)[source]#

Create a GriddedPSFModel from a list of ImagePSF models.

Given a list of ImagePSF models, this function will return a GriddedPSFModel. The fiducial points for each input ImagePSF can either be set on each individual model by setting the ‘x_0’ and ‘y_0’ attributes, or provided as a list of tuples (grid_xypos). If a grid_xypos list is provided, it must match the length of input EPSFs. In either case, the fiducial points must be on a grid.

Optionally, a meta dictionary may be provided for the output GriddedPSFModel. If this dictionary contains the keys ‘grid_xypos’, ‘oversampling’, or ‘fill_value’, they will be overridden.

Note: If set on the input ImagePSF (x_0, y_0), then origin must be the same for each input EPSF. Additionally data units and dimensions must be for each input EPSF, and values for flux and oversampling, and fill_value must match as well.

Parameters:
epsfslist of photutils.psf.ImagePSF

A list of ImagePSF models representing the individual PSFs.

grid_xyposlist, optional

A list of fiducial points (x_0, y_0) for each PSF. If not provided, the x_0 and y_0 of each input EPSF will be considered the fiducial point for that PSF. Default is None.

metadict, optional

Additional metadata for the GriddedPSFModel. Note that, if they exist in the supplied meta, any values under the keys grid_xypos , oversampling, or fill_value will be overridden. Default is None.

Returns:
GriddedPSFModel: photutils.psf.GriddedPSFModel

The gridded PSF model created from the input EPSFs.