aperture 1 aperture Davd Makovoz, 30/01/2006 Verson 1.0 Table of Contents aperture... 1 1 Overvew... 2 1.1 Input Image Requrements... 2 2 aperture... 2 2.1 Input... 2 2.2 Processng... 4 2.3 Output Table... 6 3 aperture.pl...7 4 References... 8
aperture 2 1 Overvew Included n MOPEX s a program for computng aperture photometry - aperture. It s used n the scrpt apex.pl and apex_1frame.pl as part of computng pont source fluxes. It can be also used as a stand-alone program to compute aperture photometry for a lst of ponts (not necessarly pont sources) specfed n the nput table n a sngle nput mage. Another opton s usng t to compute aperture photometry for a sngle pont n a set of mages specfed n an nput lst. Ths capablty s encapsulated n the perl scrpt aperture.pl. Ths document descrbes the nput requrements, processng, and output of aperture and aperture.pl. 1.1 Input Image Requrements The nput mages have to be n the FITS format. The data type of the mages are sngle precson floatng pont numbers,.e. BUNIT = -32. The followng keywords are requred n the headers of the nput fles for the software to work: BITPIX, NAXIS, NAXIS1, NAXIS2, CRVAL1, CRVAL2, CRPIX1, CRPIX2, CTYPE1, CTYPE2. CD-Matrx elements or/and CDELT1, CDELT2, CROTA2 should be also present. 2 aperture 2.1 Input The program aperture takes ts nput ether on the command lne or from the namelst (confguraton fle). The command lne takes precedence over the namelst. All the keywords are case-senstve. The namelst does not have the default locaton n the cdf subdrectory. If the namelst s located n the cdf subdrectory t has to be specfed explctly: aperture n cdf/aperture.nl Table 1 contans all the nput parameters, ther namelst names and command lne swtches. Parameter Name Requred Default Namelst Command lne Input_Image_Flename - y - Input_Lst_Flename -l y, f SnglePont_X(Y), are not gven Output_Table_Flename -o y - N_Apertures -napers y - Aperture_Radus_# -aper# y - N_Masks -nmask n 0 Mask_Value_# -mv# y, f N_Masks > 0 - -
aperture 3 Mask_Flename_# -m# y, f N_Masks > 0 - X_Column_Name -xname n x Y_Column_Name -yname n y TransformatonType -tr n NoTransform FIF_Flename -ff n - SnglePont_X -x n - SnglePont_Y -y n - Use_Refned_Pontng -refpont n 0 Mode -mode n mage Use_Annulus -ann n 0 Annulus_Compute_Type -comp n medan Inner_Radus -nnr y, f Use_Annulus=1 - Outer_Radus -outr y, f Use_Annulus=1 - Mn_Number_Pxels -mnpx n 9 HghPrecson -hgh n 0 Table 1. The lst of namelst names and the command lne swtches for the nput parameters for the program aperture. The aperture photometry s measured n the nput fts fle (Input_Image_Flename). The aperture photometry s measured at a set of ponts lsted n the nput lst (Input_Lst_Flename). The lst s an IPAC table whch should have two requred columns wth the coordnates of the ponts. The column names can be changed from ther default by the user (X_Column_Name, Y_Column_Name). The program can compute aperture photometry for a sngle pont. In order to do so the coordnates of the pont are gven as nput to the program (SnglePont_X, SnglePont_Y). In ths case the nput lst name s gnored. The coordnates could be ether pxel coordnates n an mage or the sky coordnates. The coordnate transformaton from the coordnates n the table to the pxel coordnates n the nput mage should be performed. The type of coordnate transformaton (TransformatonType) depends on the coordnates n the nput lst. If the pont coordnates are pxel coordnate n the nput fle, then the coordnate transformaton s set to NoTransform. If the pont coordnates are pxel coordnates n a dfferent fts fle, then the coordnate transformaton s set to PlaneToPlane. In ths case the pontng nformaton of the fts fle should be gven n the FIF table (FIF_Flename). If the pont coordnates are sky coordnates, then the coordnate transformaton s set to SkyToPlane. The number of apertures s gven by the namelst keyword N_Apertures. The number of aperture keywords should match the value of N_Apertures and they should be numbered n order. For example, f N_Apertures = 2 s set n the namelst, or napers 2 on the command lne, then there should be two keywords Aperture_Radus_1 and Aperture_Radus_2 set n the namelst, or alternatvely aper1 and aper2 on the command lne. If the mage s n surface brghtness unts (FITS keyword BUNIT = MJy/Sr or mcrojy/square_arcsec), t computes the results n the unts of μjy. Otherwse the output s n the unts of the nput mage.
aperture 4 Optonally an unlmted number of mask fts fles can be specfed along wth the fatal bt pattern for each mask. The number of Mask_Flename_# and entres should match the value of N_Masks. E.g f N_ N_Masks = 2 s set n the namelst, or nmask 2 on the command lne, then there should be two keywords Mask_Flename_1 and Mask_Flename_2 set n the namelst, or alternatvely m1 and m2 on the command lne. In addton there should be two keywords Mask_Value_1 and Mask_Value_2 set n the namelst, or alternatvely mv1 and mv2 on the command lne. If HghPrecson s set, the output s wrtten wth 9 sgnfcant dgts (formattng %9.7e). Otherwse t s wrtten wth 5 sgnfcant dgts (formattng %5.3e). The refned pontng keywords RARFND, DECRFND, CT2RFND are read optonally nstead of the standard keywords CRVAL1,CRVAL2,CROTA2, f Use_Refned_Pontng s set. 2.2 Processng By default the aperture photometry AP s computed as AP = a I, whch s the sum of the products of the pxel values I weghted wth the exact area overlap a. If Mode s set to sgma, the pxel contrbutons are added n quadratures: AP = ( ) a I 2 Fgure 1. A crcle of a specfed radus centered on the pont source (red) s overlad on the mage and aperture photometry s computed by summng the pxel values weghted by the overlap area. Optonally, f Use_Annulus s set, the background B can be estmated and subtracted from the aperture photometry for each pont. It s estmated wthn an annulus of a user specfed sze. B = Operaton(Pxels wth R >= Inner_Radus and R <= Outer_Radus). R s the dstance from the pont poston to the center of the pxel, fractonal pxel computaton s not done, pxel s ether n or out.
aperture 5 Operaton s defned by the Annulus_Compute_Type keyword and can be of three types: mean, medan (default), and mode. Mn_Number_Pxels s the mnmum number of good (non-nan) pxels n the annulus to compute the background. If the number of good pxels < Mn_Number_Pxels, then the background s not estmated and the aperture photometry s wrtten n the output table wthout background subtracton. The background subtracted aperture photometry s computed as AP = a I B a Outer_Radus Inner_Radus Fgure 2. The geometry of the annulus used for background estmaton. For MOPEX releases 030106 and later, the pxel area s computed takng the Sptzer dstortons nto account, f such are present n the fts headers. 2.3 Sample Runnng Optons One can specfy all the nput parameters on the command lne: aperture mosac.fts l detect.tbl o aperture.tbl xname RA yname Dec -napers 1 aper1 6 tr SkyToPlane Alternatvely, as was mentoned above, one can run the program wth only the namelst on the command lne: aperture n cdf/aperture.nl or a combnaton of the namelst and command lne optons: aperture n cdf/aperture.n mosac_mnback.fts o aperture_mnback.tbl Below s a sample namelst. &APERTURE Comment = 'Namelst fle for APERTURE', Input_Image_Flename = 'mosac.fts', Input_Lst_Flename = 'detect.tbl',
aperture 6 Output_Table_Flename = 'aperture.tbl', X_Column_Name = 'RA', Y_Column_Name = 'Dec', TransformatonType = 'NoTransform', N_Apertures = 3, Aperture_Radus_1 = 6.0, Aperture_Radus_2 = 10.0, Aperture_Radus_3 = 15.0, Use_Annulus = 1, Mn_Number_Pxels = 10, Annulus_Compute_Type = 'mode', Inner_Radus = 15, Outer_Radus = 25, &END 2.4 Output Table All the nput parameters are wrtten n the header of the output table. The columns of the output table are lsted n Table 2. # Column Name Descrpton 1 srcd The ndex of the pont 2 x The x coordnate of the pont n the nput mage 3 y The y coordnate of the pont n the nput mage 4 n+3 aperture# N_Apertures columns gvng the aperture photometry n+4 2n+3 bad_px# N_Apertures columns gvng unusable porton of the aperture 2n+4 bckgrnd/pxl Annulus background per pxel B( f Use_Annulus = 1 was set) Table 2. The columns of the output table. Here n s the number of apertures. Below s a sample output table. \char comment = Output from APERTURE, verson 2.00 \char Date-Tme = Wed Oct 12 10:10:34 2005 \char comment = dlmage lbrary verson 4.00 \char Mode = mage \nt Use_Annulus = 1 \nt N_Apertures = 1 \float Aperture_Radus_1 = 3.000000 \char Input_Image_Flename = IRAC/5598208/ch1/apex/Combne/mosac.fts \char Input_Lst_Flename = IRAC/5598208/ch1/apex/extract_raw.tbl \char Input_Lst_Flename = IRAC/5598208/ch1/apex/extract_raw.tbl \nt Mn_Number_Pxels = 10 \float Outer_Radus = 15.000000 \float Inner_Radus = 10.000000 \char Annulus_Compute_Type = mode \char Output_Table_Flename = IRAC/5598208/ch1/apex/aperture.tbl \float Converson Factor = 33.778720 srcd x y aperture1 bad_px1 bckgrnd/pxl
aperture 7 r r r r r 1 5.030e+01 5.963e+00 3.991e+00 0.000e+00 2.292e-01 3 aperture.pl One can use the program aperture n order to compute the aperture photometry for a sngle pont n a set of mages. The functonalty s encapsulated by the perl scrpt aperture.pl. The nput fles are specfed outsde of the aperture namelst block ether n the namelst or on the command lne as shown n. Input Fle Default Name Namelst name Command lne opton Requre d Namelst * aperture.nl N/A -n y Lst of nput mages Permanently damaged pxels mask mage Lst of DCE status mask mages Lst of outler Rmask mages - IMAGE_STACK_FILE_NAME -I y - PMASK_FILE_NAME -M n - DCE STATUS MASK LIST -d n - RMASK_LIST -R n Table 3. Input to the scrpt aperture.pl. Below s a sample namelst. IMAGE_STACK_FILE_NAME = Long_Ch1ImageLst.txt OUTPUT_DIR = aperture_ch1_nput_p1 &APERTURE Comment = 'Namelst fle for APERTURE', SnglePont_X = 281.832350, SnglePont_Y = 68.279313, X_Column_Name = 'RA', Y_Column_Name = 'Dec', TransformatonType = 'SkyToPlane', N_Apertures = 1, Aperture_Radus_1 = 5, Use_Refned_Pontng = 1, Use_Annulus = 1, Mn_Number_Pxels = 10, Annulus_Compute_Type = 'medan', Inner_Radus = 10, Outer_Radus = 15, &END
aperture 8 The scrpt goes through the lst of nput mages. For those mages that contan the nput coordnates the aperture photometry s computed. The name and the flux are wrtten n the output table. Two sets of values of the average aperture and the standard devaton are computed. The frst set - average_aperture0, sgma_aperture0 s computed usng all the mages. The second set - average_good_aperture0, sgma_good_aperture0 s computed usng the mages whch have no mssng pxels wthn the aperture,.e. bad_px0 = 0. The output table named aperture.tbl s wrtten n the output drectory, whch s specfed n the namelst (OUTPUT_DIR) or on the command lne (-O) wth the default beng the runnng drectory (./). Below s a sample output table produced by aperture.pl. \nt Use_Annulus = 1 \nt N_Apertures = 1 \float Aperture_Radus_1 = 5.000000 \nt Mn_Number_Pxels = 10 \float Outer_Radus = 15.000000 \float Inner_Radus = 10.000000 \char Annulus_Compute_Type = mode \float RA = 2.8183234e+02 \float Dec = 6.8279312e+01 \char Comment = p 2.8183234e+02 6.8279312e+01 \char mosac/interp/nterp_bcd_fp_0.fts \char mosac/interp/nterp_bcd_fp_1.fts \float average_aperture0 = 203146.529795918 \float sgma_aperture0 = 593.912795678604 \float average_good_aperture0 = 203146.529795918 \float sgma_good_aperture0 = 593.912795678604 mage_number aperture0 bad_px0 f f 0 2.02417e+05 0.000e+00 1 1.94163e+05 0.000e+00 4 References All of the documents referenced n ths document can be obtaned from the Sptzer Scence Center webste, http://ssc.sptzer.caltech.edu/postbcd/documentaton.html. 1. Sptzer_Apex