prepare_psf_model¶
- photutils.psf.prepare_psf_model(psfmodel, *, xname=None, yname=None, fluxname=None, renormalize_psf=True)[source]¶
Deprecated since version 1.9.0: The prepare_psf_model function is deprecated and may be removed in a future version. Use make_psf_model instead.
Convert a 2D PSF model to one suitable for use with
BasicPSFPhotometry
or its subclasses.Note
This function is needed only in special cases where the PSF model does not have
x_0
,y_0
, andflux
model parameters. In particular, it is not needed for any of the PSF models provided by photutils (e.g.,EPSFModel
,IntegratedGaussianPRF
,FittableImageModel
,GriddedPSFModel
, etc).- Parameters:
- psfmodel
Fittable2DModel
The model to assume as representative of the PSF.
- xname
str
orNone
, optional The name of the
psfmodel
parameter that corresponds to the x-axis center of the PSF. IfNone
, the model will be assumed to be centered at x=0, and a new parameter will be added for the offset.- yname
str
orNone
, optional The name of the
psfmodel
parameter that corresponds to the y-axis center of the PSF. IfNone
, the model will be assumed to be centered at y=0, and a new parameter will be added for the offset.- fluxname
str
orNone
, optional The name of the
psfmodel
parameter that corresponds to the total flux of the star. IfNone
, a scaling factor will be added to the model.- renormalize_psfbool, optional
If
True
, the model will be integrated from -inf to inf and rescaled so that the total integrates to 1. Note that this renormalization only occurs once, so if the total flux ofpsfmodel
depends on position, this will not be correct.
- psfmodel
- Returns:
- result
Fittable2DModel
A new model ready to be passed into
BasicPSFPhotometry
or its subclasses.
- result