1. Formulation of the problem

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

             (ZP-mAB -k(am -1))∕2.5
Fe = trans× 10                  ,

the total flux for a given exposure time texp being simply given by Ftot = Fetexp. 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

                [                        ]
S   = S  ×t   =  S (am = 1)+ -dSe(am - 1) × t  .
  tot   e   exp    e          dam             exp

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

            (β - 1)(21∕β - 1) [          R2 ]-β
M (R,α,β) = --------2------ 1+ (21∕β - 1)-2   ,
                 πα                    α

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-β
           R                        1∕β     R2-
f(R ) = 2π 0 M (r,α,β)rdr = 1 - 1+ (2   - 1)α2    .

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

SN R(R) = ∘---------Ftotf(R2)----------.
            Ftotf(R) + nCπrR2pix(Stot +n2ccd)

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

2. Computing SNR at optimal radius (and others)

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 Ropt the optimal radius that maximizes this quantity. Starting from equation 1.5, and defining F(R) = Ftotf(R), we get:

                         (      2                 )
dSN-R(Ropt) = 0 ∝ 1F dF-+ nC π-R--dF-- nCπ R--F(R ) (Stot +n2ccd)
 dR              2  dR        r2pix dR       r2pix

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

Rlarge = 4 × α = 2 × IQ.

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

3. Computing exposure time at optimal radius (and others)

Starting from equation 1.5, and recalling that Ftot = Fe ×texp, we can solve for texp at fixed SNR = SNR0. Indeed it is the solution of a second degree polynomial equation:

                                                      √ --
        t  (R, SN R ) = SN-R20(Fef-(R-)+-nCπ(R-∕rpix)2Se)+--Δ-
         exp       0                2F 2ef2(R )
Δ = SN R4 {F f(R )+ n π(R∕r   )2S }2 + 4F 2f2(R )n π(R∕r  )2n2 SN  R2
         0  e        C     pix  e       e      C     pix  ccd    0
At this stage, we still need to minimize texp(R,SNR0) with respect to R to get the minimal exposure time, and the corresponding optimal radius. Using the implicit function theorem, we see that dtexp(R,SNR0)
    dR ∂SNR-
 ∂R(R,texpR), so that we only need to solve ∂SNR-
 ∂R(R,texp(R)) = 0. This can be done using equation 2.1, with Ftot = Fetexp(R), and a simple root finder. Again, if we want to compute the required exposure time for a given aperture Rlarge = 4 × α, we can simply use equations 3.1.

4. Case of extended sources

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 1arcsec2 aperture. In such an aperture, the total flux is then simply given by Fe × texp. Equation 1.5 then reads:

SN R =  ∘----------Ftot-----------.
          Ftot + (1∕rpix)2(Stot + n2ccd)

Solving for texpat fixed SNR, we get:

                  SN R2(F + S ∕r2 ) + √Δ-
     texp(SN R0) = ----0--e----e2-pix-------
         (           )      2Fe
Δ = SN R40 Fe + Se∕r2pix + 4(Fe × SN R × nccd∕rpix)2

5. Case of galaxies with Sérsic profiles

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:

I(r) = S (r,R1∕2,n) =-----α-(n)------e-α(n)((r∕R1∕2)1∕n-1)
                   eα(n)2πnΓ (2n)R21∕2

with R12the 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, as described in Hogg and Lang [2013]. Following the latter, let us define a mixture of gaussian profiles in the following way:

M oG (r,ρi,σ2i)  =      ρi˜N (r;σ2i)
      ˜    2      -1----r2∕(2σ2)
      N(r;σ )  =   2πσ2e

where ˜
N(r;σ2) is a circularly symmetric, two-dimensional, normalised Gaussian profile, i.e. such that 02πrÑ(r;σ2)dr = 1. This normalisation implies automatically that

∫ R                      ∑K
   2πr× M oG (r,ρi,σ2i)dr =    ρi(1 - e-R2∕(2σ2i),
 0                       i=1

and in particular that 02πr × MoG(r,ρii2)dr = i=1Kρ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:

      ∑K        -R2∕(2σ2) ∑K
f(R ) =   ρi(1- e       )∕   ρi.
      i=1                i=1

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:

          2           ′ ′2   ∑K ∑K    ′˜    2   ′2
M oG(r,ρi,σi)⋆ M oG(r,ρj,σj ) =      ρiρjN(r;σi + σj )

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.