# Aperture Photometry Tool

Aperture Photometry Tool (APT) is software with a graphical user interface for computing aperture photometry on astronomical imagery. Image overlays, graphical representations, statistics, models, options and controls for aperture-photometry calculations are brought together into a single package. The software handles only images in FITS file format. The software also can be used as a FITS-image viewer. APT is executed on desktop and laptop computers, and is free of charge under a license that limits its use to astronomical research and education. The software may be downloaded from its official website, and requires the Java Virtual Machine to be installed on the user's computer.

## History

The initial version of APT was released on November 2, 2007. The latest version is APT v. 3.0.9, released on September 24, 2024. The software was developed by Dr. Russ Laher, a member of the professional staff at the NASA Exoplanet Science Institute (NExScI), part of the Infrared Processing and Analysis Center (IPAC) at the California Institute of Technology. A paper on APT was published in July 2012 in the journal Publications of the Astronomy Society of the Pacific. A companion paper compares the performance of APT vs. SExtractor, an established command-line software program for aperture photometry.

## Aperture and Sky Annulus

Aperture geometry, size, and location in the image are important parameters in aperture photometry. APT allows circular and elliptical shapes for apertures and sky annuli (the latter are used for background estimation). The rotation can be controlled in the case of an ellipse. The sky annulus will have the same shape as the aperture, but with larger inner and outer radii than the aperture. Although there is no hard limitation on the aperture size, it is practically limited by the software's response time in the calculation for a large aperture and sky annulus, and the tool for the user to interactively specify the size parameters includes a discretely zoomable subimage that is 801x801 pixels. The aperture is placed on the desired image location with a mouse click. Options to allow minor adjustments of the aperture position via centroiding are available. APT also has pixel-zapping functionality, which can be used to temporarily set the value of select pixels to NaN (not a number), effectively removing them from the aperture-photometry calculations.

## Sky Coordinates

For aperture photometry on an astronomical image, it is often useful to know the sky coordinates of an image pixel. APT computes and displays sky coordinates if keywords that define a World Coordinate System (WCS) are present in the header of the FITS-image file. APT handles the commonly used tangent or gnomonic projection (TAN, TPV, and SIP subtypes), as well as the sine (a.k.a. orthographic), Cartesian, and Aitoff projections (the latter is probably only useful for display purposes).
APT calculates geometric image distortion only for the tangent projection at this time. Two distortion conventions are supported, which are the two major methods employed in modern astronomy. The SIP convention is applied for images with CTYPE1 = 'RA---TAN-SIP' and CTYPE2 = 'DEC—TAN-SIP'. In the absence of SIP keywords, APT will attempt to read in and apply any PV distortion keywords in the FITS header for images with either CTYPE1 = 'RA---TAN' and CTYPE2 = 'DEC—TAN' or with CTYPE1 = 'RA---TPV' and CTYPE2 = 'DEC—TPV'. APT computes SIP distortion up to ninth polynomial order and PV distortion up to seventh polynomial order.
Recent updates to APT include a modification to display a warning when the reverse SIP transformation is not included in the FITS header with SIP distortion model.

## Java requirements

APT is written in the Java programming language. The latest APT version was built with the JDK 13 on a MacBook Pro laptop under macOS Monterey, Version 12.7.6 (and using apache-ant-1.9.16). Generally, APT can be executed with JRE versions greater than or equal to 13, since Java is "forward-compatible". APT can be executed by clicking or double-clicking on the APT icon in the case of Apple and Windows machines. The wrapper script APT.csh can be executed from a terminal window to start APT running from any machine, including those with Linux-type or Unix-type operating systems.