EPSFStar#
- class photutils.psf.EPSFStar(data, *, weights=None, cutout_center=None, flux=None, origin=(0, 0), wcs_large=None, id_label=None)[source]#
Bases:
objectA class to hold a 2D cutout image and associated metadata of a star used to build an ePSF.
- Parameters:
- data
ndarray A 2D cutout image of a single star.
- weights
ndarrayorNone, optional A 2D array of the weights associated with the input
data.- cutout_centertuple of two floats or
None, optional The
(x, y)position of the star’s center with respect to the input cutoutdataarray. IfNone, then the center of the input cutoutdataarray will be used.- fluxfloat or
None, optional The flux of the star. If
None, then the flux will be estimated from the inputdata.- origintuple of two int, optional
The
(x, y)index of the origin (bottom-left corner) pixel of the input cutout array with respect to the original array from which the cutout was extracted. This can be used to convert positions within the cutout image to positions in the original image.originandwcs_largemust both be input for a linked star (a single star extracted from different images).- wcs_large
Noneor WCS object, optional A WCS object associated with the large image from which the cutout array was extracted. It should not be the WCS object of the input cutout
dataarray. The WCS object must support the astropy shared interface for WCS (e.g.,astropy.wcs.WCS,gwcs.wcs.WCS).originandwcs_largemust both be input for a linked star (a single star extracted from different images).- id_labelint, str, or
None, optional An optional identification number or label for the star.
- data
Attributes Summary
The minimal
BoundingBoxfor the cutout region with respect to the original (large) image.A
ndarrayof the(x, y)position of the star's center in the original (large) image (not the cutout image).A
ndarrayof the(x, y)position of the star's center with respect to the input cutoutdataarray.The 2D cutout image.
A tuple of two slices representing the cutout region with respect to the original (large) image.
Methods Summary
compute_residual_image(epsf)Compute the residual image of the star data minus the registered/scaled ePSF.
Estimate the star's flux by summing values in the input cutout array.
register_epsf(epsf)Register and scale (in flux) the input
epsfto the star.Attributes Documentation
- bbox#
The minimal
BoundingBoxfor the cutout region with respect to the original (large) image.
- center#
A
ndarrayof the(x, y)position of the star’s center in the original (large) image (not the cutout image).
- cutout_center#
A
ndarrayof the(x, y)position of the star’s center with respect to the input cutoutdataarray.Initially set to the geometric center of the cutout, this value is updated during ePSF building iterations to reflect the fitted center position as the star is aligned with the ePSF model.
- data#
The 2D cutout image.
- slices#
A tuple of two slices representing the cutout region with respect to the original (large) image.
Methods Documentation
- compute_residual_image(epsf)[source]#
Compute the residual image of the star data minus the registered/scaled ePSF.