radial_photometry

petrofit.photometry.radial_photometry(image, position, r_list, error=None, mask=None, elong=1.0, theta=0.0, plot=False, vmin=0, vmax=None, method='exact')[source]

Core photometry function. Given a position, a list of radii and the shape of apertures, calculate the photometry of the target in the image.

Parameters:
image2D array

Image to preform photometry on.

positiontuple

(x, y) position in pixels.

r_listlist

A list of radii for apertures.

error2D array

Error map of the image.

mask2D array

Boolean array with True meaning that pixel is unmasked.

elongfloat

Elongation.

thetafloat

Orientation in rad.

plotbool

Plot the target and apertures.

vminint

Min value for plot.

vmaxint

Max value for plot.

method{‘exact’, ‘center’, ‘subpixel’}, optional

The method used to determine the overlap of the aperture on the pixel grid. Not all options are available for all aperture types. Note that the more precise methods are generally slower. The following methods are available:

  • 'exact' (default): The the exact fractional overlap of the aperture and each pixel is calculated. The returned mask will contain values between 0 and 1.

  • 'center': A pixel is considered to be entirely in or out of the aperture depending on whether its center is in or out of the aperture. The returned mask will contain values only of 0 (out) and 1 (in).

  • 'subpixel' A pixel is divided into subpixels (see the subpixels keyword), each of which are considered to be entirely in or out of the aperture depending on whether its center is in or out of the aperture. If subpixels=1, this method is equivalent to 'center'. The returned mask will contain values between 0 and 1.

Returns:
photometry, aperture_area, error

Returns photometry, aperture area (unmasked pixels) and error at each radius.