Frequently Asked Questions
- Can APT display an image from the command line?
- How do I process a number of images and source lists non-interactively?
- What does the “Snap” button do?
- How do I get the elliptical aperture?
- How is the elliptical-aperture angle measured?
- Is it possible to use APT like a typical UNIX application (i.e., bypassing the GUI entirely)?
- I couldn’t figure out how to fit the radial profile with pixel data — is there some document to use it?
Yes! Just bring up a terminal window and execute
APT.csh -i myImage1.fits
On Windows machines, use APT.bat instead.
NOTE: Either the location of APT.csh or APT.bat must be in the PATH or the complete path to the script can be specified on the command line.
APT can be executed in the batch mode (albeit do not expect fast processing times, such as from SExtractor). In this mode, the GUI will not be displayed. Here is how to do it from a Mac or Unix machine:
APT.csh -i myImage1.fits -s mySourceList1.txt APT.csh -i myImage2.fits -s mySourceList2.txt APT.csh -i myImage3.fits -s mySourceList3.txt ...
For Windows machines, replace “APT.csh” with “APT.bat” above.
Mac users, in addition to the *.dmg file, may want to also install the APT *.tar.gz or *.zip file, which will create a folder where APT.csh is more easily accessible.
Aperture Photometry Tool’s source-list tool should first be executed in the normal (non-batch) mode in order to set up the source-list option: pixel coordinates or (R.A., Dec.) in decimal degrees. You will also need to consider changing input parameters and options on the “More Settings” panel. Saving preferences in the default APT.pref file preserves the settings for subsequent the batch-mode calculations. This will also give you an idea of how long the processing will take (for long source lists and large images, you may want to run them overnight).
The “Snap” button moves the aperture from its current position to the INTEGER pixel coordinates nearest to the centroid. After the snap, the old (X_cen, Y_cen) becomes the new (X, Y) in integer pixel coordinates. The new (X, Y) is fed to the routine that computes the aperture photometry. It also recomputes (X_cen, Y_cen) based on the new (X, Y). In general, the new and old (X, Y) will have different centroids because the center position has shifted; thus, the centroid is a “moving target”, which sometimes does not converge. If you checked the checkbox labeled “Use centroid in photometry calculation?” under the “More Settings” panel, then the photometry calculation will use the new (X_cen, Y_cen) instead of the new (X, Y). So even after the snap, you have the option of using the new (X_cen, Y_cen), which may be different from the old (X_cen, Y_cen).
Under the “Preferences” menu, there is an option called “Set Aperture Size, Shape, and Angle” that will bring up a control panel entitled “Elliptical-Aperture Attributes”. There is also a convenient button just to the right of the label “Aperture attributes:” in the left middle of the main GUI panel that will do the same thing.
Click on image to enlarge.
On the “Elliptical-Aperture Attributes” control panel, you have to un-check the circular-aperture checkbox. Then you can use the sliders to set the ellipse parameters. Or, if you change the numbers in the text fields, you will also need to hit the enter or return button for each text -field change. Finally, you need to mouse-click on the “Apply” button.
Remember, the major radius must be greater than or equal to the minor radius; otherwise, the software will assume a circular aperture with the specified major radius.
The elliptical-aperture angle is measured with respect to the image pixel rows (or columns), not the world coordinate system that may be included in the header of the image. A positive angle will rotate the ellipse in the counter-clockwise direction.
Yes, it is possible to run APT.csh from a script, but you must specify an input FITS image via the -i option and an input source-list filename via the -s option (see here for further explanation and additional command-line options available). When executed in this so-called batch mode, the GUI will not be displayed.
To set up APT for running in the batch mode, you need to beforehand save your preferred settings to ~/.AperturePhotometryTool/APT.pref (the default preferences file located in the APT hidden directory in your home directory). Preferences such as whether your source list is in pixels or equatorial coordinates are very important to specify for batch-mode operations.
Here is a Perl one-liner example of running APT.csh in a script:
$ perl -e '@op=`APT.csh -i myImage9.fits -s sourceList9.txt`; print "@op\n";'
APT execution is done via the Perl backtick operator. Standard output is printed after APT terminates. While APT is no where near as fast as compiled source-extraction software (e.g., SExtractor), it is acceptably fast on a newer machine (and impressively fast on my MacBook Pro with a 2.2 GHz Intel Core i7 processor running Lion OS X). The computing speed will, of course, depend on the number of sources in your source list. APT also has a Preferences option that allows multi-threading, to take maximum advantage of the available cores in your CPU.
I couldn’t figure out how to fit the radial profile with pixel data — is there some document to use it?
At the top of the main GUI panel, there is a button labeled “About & Help” that will pop up some documentation. Also, there is similar online documentation. Here are the basic steps for using the radial-profile tool:
- Execute APT and open a FITS image.
- Mouse-click on a bright, unsaturated, isolated star to overlay an aperture and do an initial aperture-photometry calculation.
- Click on the “More Settings” button, select “Model 0 = No aperture interpolation” and “Model A = No sky-background subtraction on the panel that pops up, make sure the “Perform new image-data conversion” check box is NOT checked, click on the “Apply Settings” button, and then click on the “Close Windows” button.
- Click on the “Recompute Photometry” button to update the aperture-photometry calculation.
- Click on the “Radial Profile” button.
- Use the slider on the lower right-hand side of the radial-profile panel to minimize Chi2 for the best radial-profile fit, click on the “Recompute Fit” button, click on the “Save” button, and then click on the “Close” button. The “Set Slider” button can also be used to center the slider on the current value of the sigma parameter of the fit.
- The saved radial-profile model can now be used for data interpolation on other stars. To do this, click on the “More Settings” button, select either “Model 1″ or “Model 2″ (two different interpolation modes) on the panel that pops up, click on the “Apply Settings” button, and then click on the “Close Windows” button.
- Perform aperture-photometry calculations on other stars with interpolation enabled. This is especially useful for stars that are saturated or have missing pixels.