EPSFStar

class photutils.psf.EPSFStar(data, *, weights=None, cutout_center=None, origin=(0, 0), wcs_large=None, id_label=None)[source]

Bases: object

A class to hold a 2D cutout image and associated metadata of a star used to build an ePSF.

Parameters:
datandarray

A 2D cutout image of a single star.

weightsndarray or None, 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 cutout data array. If None, then the center of of the input cutout data array will be used.

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. origin and wcs_large must both be input for a linked star (a single star extracted from different images).

wcs_largeNone or 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 data array. The WCS object must support the astropy shared interface for WCS (e.g., astropy.wcs.WCS, gwcs.wcs.WCS). origin and wcs_large must 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.

Attributes Summary

bbox

The minimal BoundingBox for the cutout region with respect to the original (large) image.

center

A ndarray of the (x, y) position of the star's center in the original (large) image (not the cutout image).

cutout_center

A ndarray of the (x, y) position of the star's center with respect to the input cutout data array.

data

The 2D cutout image.

slices

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_flux()

Estimate the star's flux by summing values in the input cutout array.

register_epsf(epsf)

Register and scale (in flux) the input epsf to the star.

Attributes Documentation

bbox

The minimal BoundingBox for the cutout region with respect to the original (large) image.

center

A ndarray of the (x, y) position of the star’s center in the original (large) image (not the cutout image).

cutout_center

A ndarray of the (x, y) position of the star’s center with respect to the input cutout data array.

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.

Parameters:
epsfEPSFModel

The ePSF to subtract.

Returns:
datandarray

A 2D array of the residual image.

estimate_flux()[source]

Estimate the star’s flux by summing values in the input cutout array.

Missing data is filled in by interpolation to better estimate the total flux.

register_epsf(epsf)[source]

Register and scale (in flux) the input epsf to the star.

Parameters:
epsfEPSFModel

The ePSF to register.

Returns:
datandarray

A 2D array of the registered/scaled ePSF.