The photometric equation allows us to relate the AB (instrumental) magnitude mAB of
a given star to the total flux (in e^{-}∕s):

| (1.1) |

the total flux for a given exposure time t_{exp} being simply given by F_{tot} = F_{e}t_{exp}. In
equation 1.1, transis the atmospheric transmission at zenith at the time of the exposure,
ZP is the zero point in e^{-}∕s in the given band, am is the airmass of the exposure, and k
is an airmass-dependent slope of the atmospheric extinction. To compute the
signal to noise in an aperture, we will also need the total background flux in
e^{-}∕s∕pixel

| (1.2) |

Finally, the Point Spread Function of the CFHT imagers are well represented by a Moffat function:

| (1.3) |

where R is the angular distance (radius) from the point source in arcsec, α = IQ∕2 (where IQ, the Image Quality or “seeing”, is defined as the full width at half maximum of the PSF), and β = 3 is a good fit to both MegaCam and WirCam. The flux fraction contained within an aperture of radius R is thus:

| (1.4) |

This allows us to write the expression of the signal-to-noise for the flux measured in a circular aperture of radius R:

| (1.5) |

The noise contributions in the numerator include the photon noise variance from both
the source and the background, and the readout-noise variance n_{ccd}^{2}. These last two
quantities are expressed per pixel area, hence the π(R∕r_{pix})^{2}factor. Finally, n_{C} is a fudge
factor that can account for possible spatial correlations in the noise, it will be set to
n_{C} = 1 (no correlation) in the ETC.

For a fixed exposure time, equation 1.5 gives the expression of the signal-to-noise in the
aperture as a function of the aperture radius. We seek to find R_{opt} the optimal radius
that maximizes this quantity. Starting from equation 1.5, and defining F(R) = F_{tot}f(R),
we get:

| (2.1) |

which is solved by a simple root finder. Equation 1.5 is then used to compute the corresponding the optimal signal-to-noise ratio.

Of course, the same equation can be used to compute the SNR in any given aperture. For instance, the “large aperture” mode of the ETC corresponds to the case where

| (2.2) |

This aperture, for a Moffat profile (equation 1.3) with β = 3, includes ~ 96.24% of the total flux of the source.

Starting from equation 1.5, and recalling that F_{tot} = F_{e} ×t_{exp}, we can solve for t_{exp} at
fixed SNR = SNR_{0}. Indeed it is the solution of a second degree polynomial equation:

(3.1) |

This case turns out to be a simpler version of the formulation above. The photometric
equation 1.1 can be used as written, but the fluxes (as well as the magnitudes) are to be
understood per 1arcsec^{2} aperture. In such an aperture, the total flux is then simply
given by F_{e} × t_{exp}. Equation 1.5 then reads:

Solving for t_{exp}at fixed SNR, we get:

(4.1) |

In the case of extended objects like galaxies, which are still characterized with a total magnitude like point sources, but also exhibit an intensity profile I(r) that is not negligible in size compared to the PSF extent, a specific treatment is necessary. Indeed, in this case, Eq. 1.5 is still valid, but Eq. 1.4, which is valid for a point source, needs to be modified to account for the extension of the galaxy. Let us model the galaxy intensity profiles as general Sérsic profiles:

| (5.1) |

with R_{1∕2}the half-light radius of the intensity profile, n the profile index, and α_{(n)} is a
normalization constant such that Γ(2n) = 2γ(2n,α_{(n)}) where γ(n,x) is the incomplete
Gamma function of index n. The intensity profile of Eq. 5.1 is impacted by the seeing, so
that the observed intensity profile is the convolution of the profile of Eq. 5.1 with the
Moffat profile of the PSF given by Eq. 1.3. There is unfortunately no simple close form
for this convolution [Trujillo et al., 2001].

However, both Sérsic and Moffat profiles can be adequately approximated by mixtures of gaussian profiles, which again produce mixtures of gaussian profiles after convolving one by the other. Also, mixture of gaussian profiles can be easily scaled, as to match the PSF seeing and galaxy half-light radius, so that the approximations, parametrized by the weights and variances of the mixture of gaussians, can be precomputed once for all.

In practice, these parameters are computed for integer values of the Sérsic index n ∈{1,...,5}, and a Moffat parameter β = 3 which is a good match for the PSF of both imaging CFHT instruments. The computation has been done using the relevant part of The Tractor software http://thetractor.org, as described in Hogg and Lang [2013]. Following the latter, let us define a mixture of gaussian profiles in the following way:

where (r;σ^{2}) is a circularly symmetric, two-dimensional, normalised Gaussian
profile, i.e. such that ∫
_{0}^{∞}2πrÑ(r;σ^{2})dr = 1. This normalisation implies automatically
that

and in particular that ∫
_{0}^{∞}2πr × MoG(r,ρ_{i},σ_{i}^{2})dr = ∑
_{i=1}^{K}ρ_{i}. The mixtures of
Gaussian are thus very easy to normalize. The flux fraction within an aperture of radius
R is thus simply given by:

| (5.2) |

To be complete, let us now express the convolution of two mixtures of gaussian profiles. Again, following Hogg and Lang [2013], it is given by the following mixture of gaussian profiles:

which is easily computed. Plugging Eq. 5.2 into the expression of the SNR given by Eq. 1.5, one can then proceed as in Sec. 2 and Sec. 3.

D. W. Hogg and D. Lang. Replacing Standard Galaxy Profiles with Mixtures of Gaussians. PASP, 125:719–730, June 2013. doi: 10.1086/671228.

I. Trujillo, J. A. L. Aguerri, J. Cepa, and C. M. Gutiérrez. The effects of seeing on Sérsic profiles - II. The Moffat PSF. MNRAS, 328:977–985, December 2001. doi: 10.1046/j.1365-8711.2001.04937.x.