Photometry

To obtain calibrated photometry in magnitudes, the zero-point (ZP) is essential and usually all that is needed apart from the counts (“flux”) measured from the images:

\(m = -2.5*log_{10}(\text{counts}) + ZP\)

However, the error propagation can be a lot more problematic for some surveys.

Note: out of the included surveys, WISE, 2MASS, VISTA, SkyMapper and UKIDSS images need background subtraction (background subtraction of these surveys is performed by default by HostPhot). The images from the other surveys are already background subtracted.

For the global photometry, HostPhot uses sep.sum_ellipse() to meaused the counts of the host galaxy, where the value of the parameter gain depends on each survey+image and the parameter err is taken to be the global RMS of the background of the image, calculated with sep.Background().

For the local photometry, HostPhot uses photutils.aperture_photometry() to meaused the counts of the host galaxy, where the value of the parameter error is calculated with astropy.stats.sigma_clipped_stats() (using sigma=3) and photutils.utils.calc_total_error() (using the exposure time of each image). From the output of photutils.aperture_photometry() the counts/flux is given by aperture_sum while the error is given by aperture_sum_err (\(\sigma_{\text{ap}}\)). Other uncertainties are added in quadrature (see below for the respective surveys).

Note that the global and local photometry are calculates in a similar way as in Wiseman et al. (2020) and Kelsey et al. (2021), respectively.

Any offsets added to the zeropoints are instead propagated into the fluxes, such that the zeropoints remain unchaged.

PS1

  • ZP

    The PS1 images have a fixed ZP of \(25\). The flux for PS1 needs to be rescaled by the exposure time, given by the EXPTIME keyword in the images (see the PS1 Photometric Calibration).

  • Error Propagation

    The readnoise and Poisson noise are propagated using the following formula in magnitude space:

    \(\sigma_{\text{noise}} = 2.5/ln(10) * sqrt(A_{\text{ap}} * (\text{readnoise}**2) + flux / \text{gain}) / flux\)

    where \(A_{\text{ap}}\) is the area of the aperture used (\(\pi*a*b\) for an ellipse) and \(flux\) are the counts measured inside that area. The readnoise is obtained from the HIERARCH CELL.READNOISE keyword in the image’s header, while the gain is obtained from the HIERARCH CELL.GAIN keyword. In addition, a systematic error floor is added to each filter, (\(\sigma_g, \sigma_r, \sigma_i, \sigma_z, \sigma_y\)) = (14, 14, 15, 15, 18) mmag, as described in Magnier et al. (2020).

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{floor}}^2)\).

DES

  • ZP

    DES coadd images use a global ZP set to \(30\) (see the DES DR1 Processing).

  • Error Propagation

    The errors are propagated in the same way as for PS1. However, there is an additional component coming from the calibration of the photometric system (see the DES DR1 Quality website). There are statistical uncertainties on the shifts applied to DES photometry to place it in the AB system (\(\sigma_{\text{stat, shift}}\)), which are 2.6, 2.9, 3.4, 2.5, and 4.5 mmag for the \(g\), \(r\), \(i\), \(z\), and \(Y\) bands, respectively. In addition, there are median coadd zeropoint statistical uncertainties (\(\sigma_{\text{stat, zp}}\)): 5, 4, 5, 6, and 5 mmag for the \(g\), \(r\), \(i\), \(z\), and \(Y\) bands, respectively.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{stat, shift}}^2 + \sigma_{\text{stat, zp}}^2)\).

SDSS

  • ZP

    Given that the units of the SDSS images are in nanomaggies, the ZP is equal to \(22.5\) (see https://www.sdss.org/dr13/help/glossary/#nanomaggie). However, SDSS magnitudes are not exactly in AB system, as described in https://www.sdss4.org/dr12/algorithms/fluxcal/#SDSStoAB. Therefore, offsets need to be applied to \(u\) and \(z\) bands: \(u_{\rm AB} = u_{\rm SDSS} - 0.04\) and \(z_{\rm AB} = z_{\rm SDSS} + 0.02\), which are instead propagated into the fluxes to keep a constant zeropoint for all bands.

  • Error Propagation

    Additional noise is propagated with the following formula in magnitude space:

    \(\sigma_{\text{noise}} = 2.5/ln(10) * sqrt(\text{dark variance} + flux / \text{gain}) / flux\)

    where the values of gain and dark variance are obtained from https://data.sdss.org/datamodel/files/BOSS_PHOTOOBJ/frames/RERUN/RUN/CAMCOL/frame.html and they are assumed to be the largest available values, for a conservative approach.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2)\).

GALEX

  • ZP

    GALEX images have different ZPs for the two filters: \(18.82\) and \(20.08\) for \(FUV\) and \(NUV\), respectively (see https://asd.gsfc.nasa.gov/archive/galex/FAQ/counts_background.html).

  • Error Propagation

    The formulas from the GALEX website are used (in magnitude space):

    \(\sigma_{\text{rep}} (FUV) = -2.5*\Big(log_{10}(\text{CPS}) - log_{10}\big(\text{CPS} + sqrt(\text{CPS} * t_{\text{exp}} + (0.050 * \text{CPS} * t_{\text{exp}} )^2) / t_{\text{exp}} \big) \Big)\) \(\sigma_{\text{rep}} (NUV) = -2.5*\Big(log_{10}(\text{CPS}) - log_{10}\big(\text{CPS} + sqrt(\text{CPS} * t_{\text{exp}} + (0.027 * \text{CPS} * t_{\text{exp}} )^2) / t_{\text{exp}} \big) \Big)\)

    where CPS is counts per second and \(t_{\text{exp}}\) is the exposure time. The later is obtained from the images obtained with astroquery.mast.Observations and saved in the EXPTIME keyword.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{rep}}^2)\).

2MASS

  • ZP

    Each 2MASS image has its own ZP (MAGZP keyword in the header, as described in Section 4.3 from the 2MASS website).

  • Error Propagation

    To calculate the coadd noise we follow the equations described in https://wise2.ipac.caltech.edu/staff/jarrett/2mass/3chan/noise/:

    \(\sigma_{\text{noise}} = 1.0857/\text{SNR}\) \(\text{SNR} = S / sqrt\big( (S/G*N_c) + n_c*(2*k_z*\sigma_c)^2 + (n_c*0.024*\sigma_c)^2 \big)\)

    where \(S\) is the integrated aperture flux, \(G\) is the gain (typically 10), \(N_c\) is the number of coadds per pixel (assumed to be 6), \(n_c\) is the number of coadd pixels in the aperture (equal to \(4*n_f\)), \(k_z\) is the kernel smoothing factor (\(\sim1.7\)) and \(\sigma_c\) is the coadd noise (assumed to be approximately the global RMS of the image’s background). \(n_f\) is the number of frame pixels in the aperture and is assumed to be equal to the aperture area in pixel units.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2)\).

WISE

  • Correct flux

    To properly calculate the flux of the WISE images, and aperture correction factor (\(f_{\text{apcorr}}\)) is applied, as described in Section 2.3 of the WISE website. This is assumed to be \(1.0\) as HostPhot does not use PSF fitting.

  • ZP

    The WISE images also have their own ZP in their headers (MAGZP keyword in the header, as described in Section 2.3 of the WISE website, link above).

  • Error Propagation

    The ZP comes with an associated uncertainty (\(\sigma_{ZP}\), MAGZPUNC keyword in the header). The source uncertainty is:

    \(\sigma_{\text{src}} = sqrt\big(f_{\text{apcorr}}^2 * F_{\text{src}} * (\Sigma\sigma_i^2 + k*(N_A^2/N_B) * \sigma^2_{\bar{B}/pix}) + \sigma_{\text{conf}}^2 \big)\),

    where \(F_{\text{corr}}\) is the correlated noise correction factor for flux variance , \(N_A\) and \(N_B\) are the number of pixels in the source aperture and annulus (both assume to be equal to the aperture area in pixel units), respectively, \(\sigma_i\) is the flux uncertainty for pixel \(i\) from uncertainty map (assumed to be approximately the error on the aperture sum above), \(\sigma^2_{\bar{B}/pix}\) is the variance in sky-background annulus (assumed to be equal to the global RMS of the image’s background), and \(\sigma_{\text{conf}}^2\) is the confusion noise-variance on scale (assumed to be approximately the error on the aperture sum above).

    Thus, \(\sigma = sqrt\big(\sigma_{ZP}^2 + 1.179*(\sigma_{\text{src}}^2 / F_{\text{src}}^2) \big)\), as described in the link above, were \(F_{\text{src}}\) is the integrated aperture flux of the source (e.g. galaxy).

unWISE

  • ZP

    unWISE images are rescaled to have ZPs of \(22.5\), as explained in Lang (2014). Note that to improve the agreement between unWISE and AllWISE fluxes, it is recommend subtracting \(4\) mmag from unWISE W1 and \(32\) mmag from unWISE W2 fluxes, as descrived in the unWISE catalogs website (performed internally by HostPhot).

  • Error Propagation

    This is calculated in the same way as for WISE.

Legacy Survey

  • ZP

    Legacy Survey images use a global ZP set to \(22.5\) (see the Legacy Survey website).

  • Error Propagation

    This surveys has two main sources of unertainties: one coming from the photometric calibration of DR10 (see Zhou et al. (2023)), which are 5.0, 3.9, 4.3 and 5.5 mmag for the \(g\), \(r\), \(i\) and \(z\) bands, respectively, and the other coming from the inverse-variance maps included with the images.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{ZP}}^2 + \sigma_{\text{invvar}}^2)\).

Spitzer

  • ZP

    Spitzer images include their own ZP in their headers. They include both VEGA and AB ZPs, although the latter is used. This is found in the ZPAB keyword, although it is renamed to MAGZP to follow HostPhot convention. For more information, check the calibration of IRAC by Gillian Wilson

  • Error Propagation

    The errors are propagated in the same way as for PS1, where the gain and readnoise come from the IRAC and MIPS instrument manuals (see tables 2.3 and 2.4).

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2)\).

VISTA

  • ZP

    VISTA images include their own ZP in their headers: MAGZPT keyword (see the CASU VISTA website). Atmospheric extinction correction needs to be applied to the VISTA images in order to obtain an “effective” zeropoint (private communication with Nicholas Cross and VSA support). The atmospheric extinction is calculated as:

    \(extinction = c_{\text{ext}} \times (airmass - 1)\),

    where the extinction coefficient \(c_{\text{ext}}\) is 0.05 (EXTINCT keyword in the header) and the airmass is the average between the values at the start and end of the observations (taken from the header as well). Thus, the effective zeropoint is:

    \(ZP_{\text{eff}} = MAGZPT - extinction\)

    and is stored in the MAGZP to follow HostPhot convention. In addition, the flux is rescaled by the exposure time, in the same way as for the PS1 images.

  • Error Propagation

    The errors are propagated in the same way as for PS1, with an additional component coming from the ZP calibration (\(\sigma_{\text{ZP}}\)), found in the header of the images (MAGZRR keyword).

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{ZP}})\).

HST/WFC3

  • ZP

    HST zeropoints can be calculated using the PHOTFLAM and PHOTPLAM keywords from the image’ header, as explained in https://www.stsci.edu/hst/instrumentation/wfc3/data-analysis/photometric-calibration and https://www.stsci.edu/hst/instrumentation/wfc3/data-analysis/photometric-calibration:

    \(ZP_{\text{AB}} = -2.5\log(PHOTFLAM) - 5\log(PHOTPLAM) - 2.408\).

    This is saved in the header under the MAGZP keyword.

    In addition, the image’s counts should be multiplied by the encircled energy fraction, which mainly affects small apertures (see EE-UVIS and EE-IR for WFC3/UVIS and WFC3/IR instruments, respectively). WFC3/UVIS has two detectors, UVIS1 and UVIS2, where the downloaded images have the detector UVIS2 scaled to UVIS1. The encircled energy fraction depends on each detector, so an average is taken between both. The value of PHOTFLAM also depends on the detector (PHOTFLAM1 and PHOTFLAM2), but it is already calibrated to a single value (PHOTFLAM) and the same thing for PHOTPLAM.

  • Error Propagation

    The errors are propagated in the same way as for PS1, with an additional component coming from the ZP calibration (ERR_PHOTFLAM; \(\sigma_{\text{ZP}}\)), taken from the tables found in the photometric calibration websites of the instruments (see UVIS photometric calibration IR photometric calibration), which is of the order of a few percent at most.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{ZP}})\).

SkyMapper

  • ZP

    SkyMapper images include their own ZP in their headers: ZPAPPROX keyword (see the survey website forum), although this is renamed to MAGZP to follow HostPhot convention.

  • Error Propagation

    The errors are propagated in the same way as for PS1 (gain and exposure time from header, and readnoise of 5 electrons - explained in the SkyMapper instrument website), with an additional component coming from the ZP calibration (\(\sigma_{\text{ZP}}\)), found in the header of the images (ZPTERR keyword).

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{ZP}})\).

SPLUS

  • ZP

    S-PLUS images have their ZP tabulated for the different filters in the DR3_zero-points.cat file (field dependent values) found in the SPLUS DR2/3 website: these are added to the image header under the MAGZP keyword to follow HostPhot convention.

  • Error Propagation

    The errors are propagated in the same way as for PS1 (gain, exposure time and readnoise from header), with an additional component coming from the ZP calibration (\(\sigma_{\text{ZP}}\)), following Section 4.4 of Almeida-Fernandes et al. (2022): \(25\) mmag for \(U\) and \(F395\) filters, \(15\) mmag for \(F378\) filter and \(10\) mmag for the rest.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{ZP}})\).

UKIDSS

  • ZP

    UKIDSS images include their own ZP in their headers and an “effective” zeropoint has to be calculated (stored in the MAGZP keyword in the header), correcting for atmospheric extinction, in the same way as for the VISTA images. In addition, the flux is rescaled by the exposure time, in the same way as for the PS1 images.

  • Error Propagation

    The errors are propagated in the same way as for PS1 (gain, exposure time and readnoise from header), with an additional component coming from the ZP calibration (\(\sigma_{\text{ZP}}\)), found in the header of the images (MAGZRR keyword).

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^2 + \sigma_{\text{ZP}})\).