Using a catalog based on image thresholding, such as that derived with image_catalogs this routine performs aperture photometry to obtain instrumental magnitudes.
% imgcat0_apmags --help usage: imgcat0_apmags Rsco2043.fits [-v] [-h] [-c] [-n NumPixMin] [-far ApRadPix] Additional options: -v = print verbose comments and run in debug mode -h = show a help file and then exit -c = allow use of a a local imgcat0_apmags.config file -n = minimum (integer) number of pixels for imgcat0 sources -far = fixed aperture radius in pixel units (can be "none") The output files are palced in ./local_red/ApMags/***basename***There are a lot of output files for each image processed by this routine. You can read about the output from imagecat0_apmags.
What determines which objects in the image catalog from image_catalogs end up being measured with an aperture? The basic answer involves the routine that takes objects from the catalog and build a ds9 regions file. This routine is reg_from_imgcat. Here is the call in the imgcat0_apmags script that does this:
reg_from_imgcat ${basename}.fits -n $NumPixMin -far $ApRadPix >/dev/nullI need more words here. Return to top of page.
The aperture sizes used are set primarily using the hlaf-light radius (R50) derived with the find_r50 code.
![]() |
The blue circles are the aperture used to measure sources extracted from an imgcat0 catalog (the catalog compiled with the routine image_catalogs. |
Note that parameters can be read from a local configuration file named "imgcat0_apmags.config" if the "-c" option is invoked. If the "-c" flag is set, and no local "imgcat0_apmags.config" is present, then the user is queried for the desired value. If there is no config file, no values are set explicitly on the command line, or "-c" is not set, then internal default values are used. Here is an example:
% cat imgcat0_apmags.config ApRadPix 16.0 # radius in pixels used for profile compilation NumPixMin 8 # miminim NumPix for selecting sources from the imgcat0 catalog NumPixMinOp 5 # smallest aperture size allowed for optimal apertures rin 22.0 # inner radius in pixels of the bacground annulus rout 35.0 # outer radius in pixels of the bacground annulus % imgcat0_apmags /home/sco/AUTO_match_for_wcs/S/20191018T024545.3_acm_sci.fits -c R50 = 4.236500 -+ 0.099188 (pixels) N=26 % \rm -f imgcat0_apmags.config % imgcat0_apmags /home/sco/AUTO_match_for_wcs/S/20191018T024545.3_acm_sci.fits -c Enter value of ApRadPix: 20.0 Enter value of NumPixMin: 5 R50 = 4.240000 -+ 0.452821 (pixels) N=27Hence, you see that becasue I deleted the config file I was queried for the values of ApRadPix and NumPixMin. Becasue I enter different values than what were in the config vfile I got a slightly different answer for the mean half-light radius of the image. The routine used to access config file values is config_val_get.
Finally, it is difficult to keep track of these parameters, so a summary file is made that tells us what was used in a given imagscat0_apmags run:
Our config file: % cat imgcat0_apmags.config ApRadPix 16.0 NumPixMin 8 rin 22.0 rout 35.0 NumPixMinOp 5 Our summary file: % cat 20191018T024545.3_acm_sci_imgcat0_apmags.summary Summary of imgcat0_apmags parameters used for basename = 20191018T024545.3_acm_sci For profile calculation to derive quartile radii: Min number of allowed pixels for objecte selected from imgcat0 (NumPixMin) = 8 Fixed aperture radius (in pixels) of objects selected (ApRadPix ) = 16.0 Inner bkg radius (r1, in pixels) = 21.000000 Outer bkg radius (r2, in pixels) = 42.000000 For optimal aperture photometry: Median half-light radius in pixel units (R50) = 4.225000 Median 75-percent radius in pixel units (R75) = 5.973000 Smallest allowed optimal aperture (rsmallest) = 4.225000 Radius in pixel units of inner background annulus (rin) = 11.946000 Radius in pixel units of outer background annulus (rout) = 23.892000 Minimum allowed NumPix (imgcat0) for final sources with apertures = 5
Below is a table that explains the parameters that can be set for use in a run of imgcat0_apmags.
% Parametes recognized in imgcat0_apmags.config Name Explanation of parameter -------------- ----------------------------------------------------------------- ApRadPix radius in pixels used for profile compilation NumPixMin miminim NumPix for selecting sources from the imgcat0 catalog NumPixMinOp smallest aperture size allowed for optimal apertures rin inner radius in pixels of the bacground annulus rout outer radius in pixels of the bacground annulusReturn to top of page.