SkyRectangularAnnulus

class photutils.aperture.SkyRectangularAnnulus(positions, w_in, w_out, h_out, h_in=None, theta=<Quantity 0. deg>)[source]

Bases: photutils.aperture.SkyAperture

A rectangular annulus aperture defined in sky coordinates.

The aperture has a single fixed size/shape, but it can have multiple positions (see the positions input).

Parameters
positionsSkyCoord

The celestial coordinates of the aperture center(s). This can be either scalar coordinates or an array of coordinates.

w_inscalar Quantity

The inner full width of the rectangular annulus, either in angular or pixel units. For theta=0 the width side is along the North-South axis.

w_outscalar Quantity

The outer full width of the rectangular annulus, either in angular or pixel units. For theta=0 the width side is along the North-South axis.

h_outscalar Quantity

The outer full height of the rectangular annulus, either in angular or pixel units.

h_inNone or scalar Quantity

The outer full height of the rectangular annulus, either in angular or pixel units. If None, then the inner full height is calculated as:

\[h_{in} = h_{out} \left(\frac{w_{in}}{w_{out}}\right)\]

For theta=0 the height side is along the East-West axis.

thetascalar Quantity, optional

The position angle (in angular units) of the rectangle “width” side. For a right-handed world coordinate system, the position angle increases counterclockwise from North (PA=0). The default is 0 degrees.

Examples

>>> from astropy.coordinates import SkyCoord
>>> import astropy.units as u
>>> from photutils import SkyRectangularAnnulus
>>> positions = SkyCoord(ra=[10., 20.], dec=[30., 40.], unit='deg')
>>> aper = SkyRectangularAnnulus(positions, 3.0*u.arcsec, 8.0*u.arcsec,
...                              5.0*u.arcsec)

Attributes Summary

h_in

Check that value is either an angular or a pixel scalar Quantity.

h_out

Check that value is either an angular or a pixel scalar Quantity.

positions

Check that value is a SkyCoord.

theta

Check that value is either an angular scalar Quantity.

w_in

Check that value is either an angular or a pixel scalar Quantity.

w_out

Check that value is either an angular or a pixel scalar Quantity.

Methods Summary

to_pixel(wcs)

Convert the aperture to a RectangularAnnulus object defined in pixel coordinates.

Attributes Documentation

h_in

Check that value is either an angular or a pixel scalar Quantity.

h_out

Check that value is either an angular or a pixel scalar Quantity.

positions

Check that value is a SkyCoord.

theta

Check that value is either an angular scalar Quantity.

w_in

Check that value is either an angular or a pixel scalar Quantity.

w_out

Check that value is either an angular or a pixel scalar Quantity.

Methods Documentation

to_pixel(wcs)[source]

Convert the aperture to a RectangularAnnulus object defined in pixel coordinates.

Parameters
wcsWCS object

A world coordinate system (WCS) transformation that supports the astropy shared interface for WCS (e.g., astropy.wcs.WCS, gwcs.wcs.WCS).

Returns
apertureRectangularAnnulus object

A RectangularAnnulus object.