SkyEllipticalAperture#

class photutils.aperture.SkyEllipticalAperture(positions, a, b, theta=<Quantity 0. deg>)[source]#

Bases: SkyAperture

An elliptical 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.

ascalar Quantity

The semimajor axis of the ellipse in angular units.

bscalar Quantity

The semiminor axis of the ellipse in angular units.

thetascalar Quantity, optional

The position angle (in angular units) of the ellipse semimajor axis. For a right-handed world coordinate system, the position angle increases counterclockwise from North (PA=0).

Examples

>>> from astropy.coordinates import SkyCoord
>>> import astropy.units as u
>>> from photutils.aperture import SkyEllipticalAperture
>>> positions = SkyCoord(ra=[10.0, 20.0], dec=[30.0, 40.0], unit='deg')
>>> aper = SkyEllipticalAperture(positions, 1.0*u.arcsec, 0.5*u.arcsec)

Attributes Summary

a

The semimajor axis in angular units.

b

The semiminor axis in angular units.

isscalar

Whether the instance is scalar (i.e., a single position).

positions

The center position(s) in sky coordinates.

shape

The shape of the instance.

theta

The position angle in angular units of the ellipse semimajor axis.

Methods Summary

copy()

Make an deep copy of this object.

to_pixel(wcs)

Convert the aperture to an EllipticalAperture object defined in pixel coordinates.

Attributes Documentation

a#

The semimajor axis in angular units.

b#

The semiminor axis in angular units.

isscalar#

Whether the instance is scalar (i.e., a single position).

positions#

The center position(s) in sky coordinates.

shape#

The shape of the instance.

theta#

The position angle in angular units of the ellipse semimajor axis.

Methods Documentation

copy()#

Make an deep copy of this object.

Returns:
resultAperture

A deep copy of the Aperture object.

to_pixel(wcs)[source]#

Convert the aperture to an EllipticalAperture 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:
apertureEllipticalAperture object

An EllipticalAperture object.