D Calculation of the errors

The errors are calculated in one of four ways, as discussed in the section on command P. The first method assumes true photon statistics and the error is calculated from the following definitions:

Number of pixels in object aperture = ao
Number of pixels in sky aperture = as
Sum of data in object aperture = Do
Sum of data in sky aperture = Ds
Offset in one pixel = BIASLE
Number of photons per data unit = PADU

The contribution of the sky in the object aperture can now be calculated:

Number of photons in object aperture = Po = PADU (Do ao BIASLE)
Number of photons in sky aperture = Ps = PADU (Ds as BIASLE)
Number of photons in object aperture due to sky = Pso = PADU (Ds as BIASLE) (ao/as)

The signal due to the object is the difference of the total number of photons in the object aperture minus the number due to the sky:

Object signal = So = Po Pso = PADU (Do Ds (ao/as))

The error on the object signal is the quadratic sum of the errors on the individual measurements. Using ε to signify the error:

ε(So)2 ε(Do)2 + ε(Ds)2 (ao/as)2

Assuming the errors are solely from photon statistics then the error on the signal is:

ε(So)2 = ε(Po)2 + ε(Ps)2 (ao/as)2

The error from photon counting is the square root of the number of photons:

ε(Po) = Po and ε(Ps) = Ps

Therefore:

ε(So)2 = Po + Ps (ao2/as2) = PADU (Do + Ds (ao2/as2) BIASLEao(1 + ao/as))̲ (1)

The second method of calculating the errors assumes that the variance in the sky aperture corresponds to the photon noise. This allows the photon errors to be calculated without knowing BIASLE. One additional definition has to be given:

Standard deviation in sky aperture per pixel in data units = σs

If the photon error Ps is equated to the standard deviation PADUσs then the total number of photons in the sky aperture is given by:

Ps = as PADU2 σs2

The offset in the sky aperture can now be calculated:

BIASLE = (Ds/as) (PADUσs2)

Substituting this into the calculation of the error gives:

ε(So)2 = PADU (Do Ds (ao/as) + PADUσs2 ao (1 + ao/as))

or

ε(So)2 = So + PADU2 σs2 ao (1 + ao/as))̲ (2)

The third method of calculating the errors sums the data variances from the variance component of an NDF. Two additional definitions have to be given:

Sum of variance in object aperture = Vo
Sum of variance in sky aperture = Vs

The error is then calculated from:

ε(So)2 = PADU2 (Vo + Vs (ao/as)2)̲ (3)

The magnitude error is calculated from differentiating the magnitude equation:

m = 2.5 log 10So

thus:

dm = 2.5 ln 10 ε(So) So̲

The fourth method is like method two, but the sky variations are interpreted by a gaussian error source, so PADU and BIASLE are not required. With guassian errors the source signal is effectively zero (since it has the same noise per pixel as the sky), so

ε(So) = PADUσs (ao)̲ (4)

and

So = PADU (Do Ds (ao/as))̲ (5)

so the PADUs cancel out in the dm calculation.