PRFAdapter

class photutils.psf.PRFAdapter(psfmodel, renormalize_psf=True, flux=1, x_0=0, y_0=0, xname=None, yname=None, fluxname=None, **kwargs)[source]

Bases: astropy.modeling.Fittable2DModel

A model that adapts a supplied PSF model to act as a PRF.

It integrates the PSF model over pixel “boxes”. A critical built-in assumption is that the PSF model scale and location parameters are in pixel units.

Parameters
psfmodela 2D model

The model to assume as representative of the PSF

renormalize_psfbool

If True, the model will be integrated from -inf to inf and re-scaled so that the total integrates to 1. Note that this renormalization only occurs once, so if the total flux of psfmodel depends on position, this will not be correct.

xnamestr or None

The name of the psfmodel parameter that corresponds to the x-axis center of the PSF. If None, the model will be assumed to be centered at x=0.

ynamestr or None

The name of the psfmodel parameter that corresponds to the y-axis center of the PSF. If None, the model will be assumed to be centered at y=0.

fluxnamestr or None

The name of the psfmodel parameter that corresponds to the total flux of the star. If None, a scaling factor will be applied by the PRFAdapter instead of modifying the psfmodel.

Notes

This current implementation of this class (using numerical integration for each pixel) is extremely slow, and only suited for experimentation over relatively few small regions.

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)

The evaluation function for PRFAdapter.

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]

The evaluation function for PRFAdapter.