class photutils.psf.EPSFFitter(*, fitter=<astropy.modeling.fitting.LevMarLSQFitter object>, fit_boxsize=5, **fitter_kwargs)[source]

Bases: object

Class to fit an ePSF model to one or more stars.

fitterastropy.modeling.fitting.Fitter, optional

A Fitter object.

fit_boxsizeint, tuple of int, or None, optional

The size (in pixels) of the box centered on the star to be used for ePSF fitting. This allows using only a small number of central pixels of the star (i.e., where the star is brightest) for fitting. If fit_boxsize is a scalar then a square box of size fit_boxsize will be used. If fit_boxsize has two elements, they must be in (ny, nx) order. fit_boxsize must have odd values and be greater than or equal to 3 for both axes. If None, the fitter will use the entire star image.

**fitter_kwargsdict-like, optional

Any additional keyword arguments (except x, y, z, or weights) to be passed directly to the __call__() method of the input fitter.

Methods Summary

__call__(epsf, stars)

Fit an ePSF model to stars.

Methods Documentation

__call__(epsf, stars)[source]

Fit an ePSF model to stars.


An ePSF model to be fitted to the stars.

starsEPSFStars object

The stars to be fit. The center coordinates for each star should be as close as possible to actual centers. For stars than contain weights, a weighted fit of the ePSF to the star will be performed.

fitted_starsEPSFStars object

The fitted stars. The ePSF-fitted center position and flux are stored in the center (and cutout_center) and flux attributes.