GriddedPSFModel

class photutils.psf.GriddedPSFModel(data, flux=1.0, x_0=0.0, y_0=0.0, fill_value=0.0)[source]

Bases: astropy.modeling.Fittable2DModel

A fittable 2D model containing a grid PSF models defined at specific locations that are interpolated to evaluate a PSF at an arbitrary (x, y) position.

Parameters
dataNDData

An NDData object containing the grid of reference PSF arrays. The data attribute must contain a 3D ndarray containing a stack of the 2D PSFs (the data shape should be (N_psf, PSF_ny, PSF_nx)). The meta attribute must be dict containing the following:

  • 'grid_xypos': A list of the (x, y) grid positions of each reference PSF. The order of positions should match the first axis of the 3D ndarray of PSFs. In other words, grid_xypos[i] should be the (x, y) position of the reference PSF defined in data[i].

  • 'oversampling': The integer oversampling factor of the

    PSF.

The meta attribute may contain other properties such as the telescope, instrument, detector, and filter of the PSF.

Attributes Summary

flux

param_names

Names of the parameters that describe models of this type.

x_0

y_0

Methods Summary

evaluate(x, y, flux, x_0, y_0)

Evaluate the GriddedPSFModel for the input parameters.

Attributes Documentation

flux = Parameter('flux', value=1.0)
param_names = ('flux', 'x_0', 'y_0')

Names of the parameters that describe models of this type.

The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.

When defining a custom model class the value of this attribute is automatically set by the Parameter attributes defined in the class body.

x_0 = Parameter('x_0', value=0.0)
y_0 = Parameter('y_0', value=0.0)

Methods Documentation

evaluate(x, y, flux, x_0, y_0)[source]

Evaluate the GriddedPSFModel for the input parameters.