Apertures

Using Preset Apertures

The presets for an Aperture are Ellipse, Circle, and Annulus. Each of these subclasses inherit properties from the base class, Aperture.

When using photometer, an aperture must be specified. To use variable-width apertures that change with the FWHM of the sources in the catalog, use any of the Aperture subclasses as the aperture argument in photometer.

For this example, suppose we have a MasterCatalog object called mc (For directions on how to create this object, see the Getting Started section) and we want to do some photometry.

from dendrocat.aperture import Ellipse, Circle, Annulus

mc.photometer(Ellipse, Circle, Annulus)
This will take the MasterCatalog’s catalog source entries and use their major and minor FWHM as aperture radii, where applicable.
  • For a Circle, the radius is the source’s major FWHM.
  • For a Ellipse, the major and minor FWHM of the source, as well as its position angle, are used directly as the parameters of the elliptical aperture.
  • For a Annulus, the inner and outer radii of the aperture are determined by the major FWHM of the source, as well as the annulus_padding and annulus_width attributes of the RadioSource object storing the image data.

Annulus Inner Radius = Source Major FWHM + Annulus Padding

Annulus Outer Radius = Source Major FWHM + Annulus Padding + Annulus Width

These two parameters ensure that annular apertures don’t overlap with source apertures, and can be tuned within each RadioSource object.

Defining Custom Apertures

To use fixed apertures instead, create an instance of any of the Aperture subclasses with the desired parameters. Parameters can be specified in pixel or degree coordinates.

import astropy.units as u

# Define a fixed-radius elliptical aperture in pixels
fixed_ellipse_pix = Ellipse([0,0], 15*u.pix, 10*u.pix, 30*u.deg, name=ellipsepix)

# Define a fixed-radius elliptical aperture in degrees
fixed_ellipse_deg = Ellipse([0,0], 15*u.arcsec, 10*u.arcsec, 30*u.deg, name=ellipsedeg)

Photometry can then be performed exactly as if these were new aperture presets.

mc. photometer(fixed_ellipse_pix, fixed_ellipse_deg)

Note

The first argument of any Aperture subclass is always center. When creating an instance of the Aperture subclasses, this argument can be filled with any two coordinates—they will be overwritten with the source objects’ center coordinates when photometry is performed.