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 implemented surveys, only WISE and 2MASS images need background subtraction. 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.

In addition to the magnitude uncertainty calculated from the aperture photometry above (\(\sigma_{\text{ap}}\)), other uncertainties are added in quadrature (see below).

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.

PS1

  • ZP

    The PS1 images are rescaled to a ZP of \(25 + 2.5*log_{10}(\text{exposure time})\), where the exposure time is 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.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^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). The calibration uncertainties (\(\sigma_{\text{cal}}\)) are 2.6, 2.9, 3.4, 2.5, and 4.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{cal}}^2)\).

SDSS

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 save 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 SDSS.

  • Error Propagation

    This is assumed to be the same as for WISE.

Legacy Survey

  • ZP

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

  • Error Propagation

    The errors are propagated in the same way as for PS1. The gain, exposure time and readnoise are assumed to be similar to those of DES: \(30\) \(e\)/ADU, \(900\) s and \(7\) \(e\)/pixel, respectively.

    Thus, \(\sigma = sqrt(\sigma_{\text{ap}}^2 + \sigma_{\text{noise}}^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, although this is renamed to MAGZP to follow HostPhot convention.

  • 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}})\).