next up previous contents
Next: Camera Control Up: GCX User's Manual Previous: The World Coordinate System   Contents

Subsections

Aperture Photometry

Prerequisites

To measure stars, we need to know where the stars are located. We need some standards to compare them with. And we need some way of estimating the accuracy of our results.

In GCX all photometry targets are specified using their world coordinates (right ascension, declination and epoch). While it is possible to trick the program into just using stars from the image, this is not very useful. Looking up maps and clicking on stars is a tedious and error-prone process. It's also very difficult to check the results.

The program has a powerful world coordinate fitting algorithm. It is always prefferable to try to use it, than attempting to work without. See the tutorial and the WCS section for more details.

During a photometry run, the following information is used:

Not all parameters are equally important. Some noise parameters may be ``guessed'' by the program. Many parameters can be added to the fits header after the observation is made, as they are fixed for a given observer and equipment setup.

Reduction Steps

Once all the data is gathered, reduction proceeds as follows:
  1. The WCS of the frame is fitted;
  2. For each star we want to measure, the program calculated the pixel position inside the frame and looks around that position for a peak that looks like a star. If a peak is found within a certain distance, the position is corrected to the centroid of that star image. This step can be disabled.
  3. The total flux within a circular aperture centered on the corrected position is calculated. The size of the aperture can be set by the user. If bad pixels are found within the aperture, the situation is flagged. The noise associated to this value is calculated using the supplied noise parameters.
  4. A histogram is constructed from the values of pixels in an annular aperture concentric with the first. The size of the annulus can be set by the user. The sky backgound level is estimated from this area, using one of the following methods: mean, median, mean with $\kappa$-$\sigma$ clipping, mean-median or synthetic mode. The noise associated to the background is also estimated.
  5. The background is substracted from the star flux, and the noise contributions are added in quadrature. Scintillation noise (a multiplicative factor) is estimated and added to the noise.
  6. The resulting flux and noise is converted to the magnitude scale.
  7. For standard stars the error from the input data is added to the noise. From here on, we will use the term error. For standard stars without error information, a default error is added, and the situation is flagged.
  8. A robust fit algorithm is used to determine the transformation between the instrumental and standard values.

    The fit algorithm also calculates the expected error of the transformation coefficients and the mean error of unit weight, which indicates the quality of the fit.

  9. Finally, a report is generated. In many cases, finding an accurate solution is not possible just from analysing one frame. The report contains enough information so that many observations can be reduced together in a later step. However, collective reduction of many observations is beyond the scope of this program.

Noise and Error Modelling

The issue of noise modelling is essential in any photometric endeavour. Measurement values are next to meaningless if they aren't acompanied by a measure of ther uncertainty.

One can assume that the noise and error modelling only applies to deriving an error figure. This in true only in extremely simple cases. In general, the noise estimates will also affect the actual values. For instance, suppose that we use several standards to calibrate a field. From the noise estimate, we know that one of the standards has a large probable error. Then, we choose to exclude (or downweight) that value from the solution--this will change the calibration, and directly affect the result (not just it's noise estimate).

Precision and Accuracy.

The precision of a measurement denotes the degree to which different measurements of the same value will yield the same result; it measures the repeatability of the measurement process. A precise measurement has a small random error.

The accuracy of a measurement denotes the degree to which a measurement result will represent the true value. The accuracy includes the random error of the measurement, as well as the systematic error.

Random errors are in a way the worst kind. We have to accept them and take into account, but they cannot be calculated out. We can try to use better equipment, or more telescope time and reduce them. On the other hand, since random errors are, well, random in nature (they don't correlate to anything), we can in principle reduce them to an aribitrarily low level by averaging a lerge number of measurements.

Systematic errors on the other hand can usually be eliminated (or at least reduced) by calibration. Systematic errors are not that different from random errors. They differ fundamentally in the fact the they depend on something. Of course, even random errors ultimately depend on something. But that something changes incontrollably, and in a time frame that is short compared to the measurement time scale.

A systematic error can turn into a random error if we have no control over the thing that the error depends on, or we don't have something to calibrate against. We could treat this error as ``random'' and try to average many measurements to reduce it, but we have to make sure that the something that the error depends on has had a change to vary between the measurements we average, or we won't get very far.

Noise

is the ``randomest'' source of random errors. We have no way to calibrate out noise, but it's features are well understood and relatively easy to model. One doesn't have a good excuse not to model noise reasonably well.

We will generally talk about ``noise'' when estimating random errors that derive from electrical noise sorce. Once these are combine with other error sources (like for instance expected errors of he standards), we will use the term ``error''. Of course, there are two ways of understanding an error value. If we know what the true value should be, we can talk about and actual error. If we just consider what error level we can expect, we talk about an estimated, or expected error.

CCD Noise Sources

There are several noise sources in a CCD sensor. We will see that in the end they can usually be modeled with just two parameters, but we list the main noise contributors for reference.

  1. Photon shot noise is the noise associated with the random arrival of photons at any detector. Shot noise exists because of the discrete nature of light and electrical charge. The time between photon arrivals is goverened by Poisson statistics. For a phase-insensitive detector, such as a CCD,

    \begin{displaymath}\sigma_{\rm ph} = \sqrt{S_{\rm ph}}\end{displaymath}

    where $S_{\rm ph}$ is the signal expressed in electrons. Shot noise is sometimes called ``Poisson noise''.
  2. Output amplifier noise originates in the output amplifier of the sensor. It consists of two components: thermal (white) noise and flicker noise. Thermal noise is independent of frequency and has a mild temperature dependence (is proportional to the square root of the absolute temperature). It fundamentally originates in the thermal movement of atoms. Flicker noise (or 1/f noise) is strongly dependent on frequency. It originates in the existance of long-lived states in the silicon crystal (most notably ``traps'' at the silicon-oxide interface).

    For a given readout configuration and speed, these noise sources contribute a constant level, that is also independant of the signal level, usually called the readout noise. The effect of read noise can be reduced by increasing the time in which the sensor is read out. There is a limit to that, as flicker noise will begin to kick in. For some cameras, one has the option of trading readout speed for a decrease in readout noise.

  3. Camera noise. Thermal and flicker noise are also generated in the camera electronics. the noise level will be independent on the signal. While the camera designer needs to make a distiction between the various noise sources, for a given camera, noise originating in the camera and the ccd amplifier are indistinguishable.

  4. Dark current noise. Even in the absence of light, electron-hole pairs are generated inside the sensor. The rate of generation depends exponentially on temperature (typically doubles every 6-7 degrees). The thermally generated electrons cannot be separated from photo-generated photons, and obey the same Poisson statistic, so

    \begin{displaymath}\sigma_{\rm dark} = \sqrt{S_{\rm dark}} \end{displaymath}

    We can substract the average dark signal, but the shot noise associated with it remains. The level of the dark current noise depends on temperature and integration time.

  5. Clock noise. Fast changing clocks on the ccd can also generate spurious charge. This charge also has a shot noise component associated. However, one cannot read the sensor without clocking it, so clock noise cannot be discerned from readout noise. The clock noise is fairly constant for a given camera and readout speed, and independent of the signal level.

Examining the above list, we see that some noise sources are independent of the signal level. They are: the output amplifier noise, camera noise and clock noise. They can be combined in a single equivalent noise source. The level of this source is called readout noise, and is a characteristic of the camera. It can be expressed in electrons, or in the camera output units (ADU).

The rest of the noise sources are all shot noise sources. The resulting value will be:

\begin{displaymath}\sigma_{\rm shot} = \sqrt{\sigma_{\rm ph}^2 + \sigma_{\rm dark}^2} \end{displaymath}


\begin{displaymath}\sigma_{\rm shot} = \sqrt{S_{\rm ph} + S_{\rm dark}} = \sqrt{S} \end{displaymath}

$S$ is the total signal from the sensor expressed in electrons. So to calculate the shot noise component, we just need to know how many ADUs/electron the camera produces. This is a constant value, or one of a few constant values for cameras that have different gain settings. We will use $A$ to denote this value.

Noise of a Pixel Value

We will now try to model the level of noise in a pixel value. The result of reading one pixel (excluding noise) is:

\begin{displaymath}s = s_b + A ( S_d + S_p) \end{displaymath}

where $s_b$ is a fixed bias introduced by the camera electronics, $S_d$ is the number of dark electrons, and $S_p$ is the number of photo-generated electrons (which is the number of photons incident on the pixel multiplied by the sensor's quantum efficiency).

Now let's calculate the noise associated with this value.

\begin{displaymath}\sigma^2 = \sigma_r^2 + A^2 (S_d + S_p) = \sigma_r^2 + A(s - s_b) \end{displaymath}

Where $\sigma_r$ is the readout noise expressed in ADU, and $S$ is the total signal expressed in electrons. Note that we cannot calculate the noise if we don't know the bias value. The bias can be determined by reading frames with zero exposure time (bias frames). These will contribute some read noise though. By averaging several bias frames, the noise contribution can be reduced. Another approach is to take the average across a bias frame and use that value for the noise calculation of all pixels. Except for very non-uniform sensors this approach works well. GCX supports both ways.

Note that a bias frame will only contain readout noise. By calculating the standard deviation of pixels across the difference between two bias frames is $\sqrt{2}$ times the readout noise.

Dark Frame Subtraction

A common situation is when one substracts a dark frame, but doesn't use bias frames. The noise associated with the dark frame is:

\begin{displaymath}\sigma_d^2 = \sigma_r^2 + A^2 S_d\end{displaymath}

The resulting pixel noise after dark frame substraction will be:

\begin{displaymath}\sigma_{\rm ds}^2 = 2\sigma_r^2 + A^2 (2 S_d + S_p) \end{displaymath}

while the signal will be

\begin{displaymath}s_{\rm ds} = AS_p\end{displaymath}

Using just the camera noise parameters, we cannot determine the noise anymore. We have to keep track of the dark substraction and it's noise effects. We however rewrite the dark-substracted noise equation as follows:

\begin{displaymath}\sigma_{\rm ds}^2 = \left(\sqrt{2\sigma_r^2 + 2 A^2 S_d}\right)^2 + A^2 S_p \end{displaymath}

If we use the notation $\sigma_r' = \sqrt{2\sigma_r^2 + 2 A^2 S_d}$, we get:

\begin{displaymath}\sigma_{\rm ds}^2 = \sigma_r'^2 + A^2 S_p\end{displaymath}

This is identical in form to the simple pixel noise equation, except that the true camera readout noise is replaced by the equivalent read noise $\sigma_r'$. What's more, the bias is no longer an issue, as it doesn't appeear in the signal equation anymore. We can derive the pixel noise from the signal directly, as:

\begin{displaymath}\sigma_{\rm ds}^2 = \sigma_r'^2 + As_{\rm ds}\end{displaymath}

The same parameters, $\sigma_r'$ and $A$ are sufficient to describe the noise in the dark-substracted frame.

Flat Fielding

To flat-field a frame, we divide the dark-substracted pixel value $s_{\rm ds}$ by the flat field value $f$. The noise of the flat field is $\sigma_f$. The resulting signal value is


\begin{displaymath}s_{\rm ff} = \frac{1}{f}AS_p\end{displaymath}

If we neglect second-order noise terms, the noise of the flat-fielded, dark substracted pixel is:

\begin{displaymath}\sigma_{\rm ff}^2 = f \sigma_r'^2 + A^2 S_p + \left(\frac{\sigma_f}{f}AS_p\right)^2\end{displaymath}


\begin{displaymath}\sigma_{\rm ff}^2 = f^2 \sigma_r'^2 + A f s_{\rm ff} + \left(\sigma_f s_{\rm ff}\right)^2\end{displaymath}

The problem with this result is that f is not constant across the frame. So in general, the noise of a flat-fielded frame cannot be described by a small number of parameters. In many cases though, $f$ doesn't vary too much across the frame. We can then use it's average value, $\widetilde{f}$ for the noise calculation. This is the approach taken by the program.

We can identify the previous noise parameters, $\sigma_r'' =
\widetilde{f}\sigma_r'$ and $A' = A\widetilde{f}$. We have to introduce a new parameter, $\sigma_f$.

Without reducing generality, we can arrange for $\widetilde{f} = 1$. This means that the average values on the frames don't change with the flatfielding operation, and is a common choice.

In this case, $\sigma_r$ and $A$ aren't affected by the flatfielding operation, while the third noise parameter becomes $\sigma_f/\widetilde{f}$, which is the reciprocal of the SNR of the flat field.

GCX models the noise of each pixel in the frame by four parameters: $\sigma_r$, $A$, $\sigma_f/\widetilde{f}$ and $\widetilde{s_b}$. The noise function $n(s)$ of each pixel is:


\begin{displaymath}n^2(s) = \sigma^2 = \sigma_r^2 + A \vert(s-\widetilde{s_b})\v...
...ft(\frac{\sigma_f}{\widetilde{f}}\right)^2(s-\widetilde{s_b})^2\end{displaymath}

$\sigma_r$ comes from the RDNOISE field in the frame header. $A$ is the reciprocal of the value of the ELADU field. $\sigma_f/\widetilde{f}$ comes from FLNOISE, while $\widetilde{s_b}$ comes from DCBIAS.

Every time frames are processed (dark and bias substracted, flatfielded, scaled etc), the noise parameters are updated.

Instrumental Magnitude Errors

Once we know the noise of each pixel, deriving the expected error of an instrumental magnitude is straightforward. Let $N_b$ be the number of pixels in the sky annulus, and $s_i$ the level of each pixel. The noise of the sky estimate is: 1

\begin{displaymath}\sigma_b^2 = \frac{1}{N_b}\sum_{i=1}^{N_b}n^2(s_i)\end{displaymath}

Now let $N_s$ be the number of pixels in the central aperture. The noise from these pixels is:

\begin{displaymath}\sigma_s^2 = \sum_{i=1}^{N_s}n^2(s_i)\end{displaymath}

The total noise after sky substraction will be:

\begin{displaymath}\sigma_n^2 = \sigma_s^2 + N_s \sigma_b^2\end{displaymath}

.

The program keeps track and reports separately the photon shot noise, the sky noise, the read noise contribution and the scintillation noise.

Scintillation is an atmospheric effect, which results in a random variation of the received flux from a star. We use the following formula for scintillation noise:


\begin{displaymath}\sigma_{\rm sc} = 0.09 F \frac{AM^{1.75}}{D^{2/3}\sqrt{2t}}\end{displaymath}

Where $F$ is the total flux received from the star, $AM$ is the airmass of the observation, $D$ is the telescope aperture in cm, and $t$ is the integration time. Scintillation varies widely over time, so the above is just an estimate.

Finally, we can calculate the expected error of the instrumental magintude as

\begin{displaymath}\epsilon_i = 2.51188 \log\left(1 + \frac{\sqrt{\sigma_n^2 + \sigma_{\rm sc}^2}}{F}\right) \end{displaymath}

Fitting the Solution

Having obtained instrumental magnitudes and error estimates for the standard stars, the program proceeds to finding a transformation between the instrumental and standard system. If color information is not present, or there aren't enough standards of different color, only a zeropoint for the transform is calculated. If the program decides there is enough information, it will determine both a zeropoint and a color coefficient. 2

A robust fitting algorithm is implemented, which proceeds as follows:

  1. First, the natural weights for each standard star are calculated as

    \begin{displaymath}W_i = \frac{1}{\epsilon_i^2 + \epsilon_s^2}\end{displaymath}

    where $\epsilon_i$ is the estimated error of the instrumental magnitude, and $\epsilon_s$ is the error of the standard magnitude (obtained from the recipy file).
  2. The values are fitted using these weights. For the no-colors case, the fit is simply a weighted mean; When color coefficients are fitted, linear regression is used.
  3. The residuals $\rho_i$ for each star are calculated.
  4. The weights are adjusted based on how much the residuals differ from their expected values. The following function is used:

    \begin{displaymath}W'_i = {W_i}\left({1 + \left({\frac{\rho_i}{\alpha\sqrt{\epsilon_i^2 +
\epsilon_s^2}}}\right)^\beta}\right)^{-1} \end{displaymath}

    Th weighting function reduces the weight of values that have residuals $\alpha$ times larger than expected to one half. Of course values with even larger residuals are downweighted even more. The parameter $\beta$ tunes the ``sharpness'' of the weighting function.
  5. steps 2-5 above are repeated until the solution converges (or the iteration limit is reached).
  6. Finally, the error for the estimated parameters is calculated. In the no-colors situation, the error for the zeropoint is calculated as follows:


    \begin{displaymath}\epsilon_{\rm zp}^2 = \frac{\sum\rho_i^2W_i}{\sum W_i}\end{displaymath}

    fwhile the mean error of unit weight is:

    \begin{displaymath}{\rm me1}^2 = \frac{\sum\rho_i^2W_i}{N-1}\end{displaymath}

    where $N$ is the number of standard stars. The mean error of unit weight is 1 in the ideal case (when all the errors are estimated correctly). A significantly larger value should raise doubts about the error estimates.

Reporting

An example report is shown below.

(   observation
      ( object "rs-lyr" ra "19:13:01.88" dec "33:24:46.13" 
        equinox 2000 jdate 2452760.45870622 
        telescope "30cm SCT FLEN=2000.0" aperture 30.0 
        exptime 20.00 sns_temp 238.0 filter "v" 
        )
    noise (read 7.3 eladu 2.0 flat 0.0 scint 0.003)
    ap_par (r1 3 r2 9 r3 13 sky_method "median" sigmas 3.0)
    stars (
      ( name "GSC2657-0144" type std
        smags "v(aavso)=12.300 p(gsc)=11.750" imags "v=-9.958/0.010"
        residual 0.066 weight 384.712
        flags ( centered undef_err )
        noise (sky 0.001 read 0.004 photon 0.008 scint 0.003) )
      ( name "GSC2657-0268" type std
        smags "v(aavso)=13.000 p(gsc)=12.710" imags "v=-9.149/0.016"
        residual -0.043 weight 362.665
        flags ( centered undef_err )
        noise (sky 0.003 read 0.008 photon 0.012 scint 0.003) )
      ( name "GSC2657-0835" type std
        smags "v(aavso)=9.200 p(gsc)=9.010" imags "v=-12.967/0.004"
        residual -0.025 weight 397.903
        flags ( centered undef_err )
        noise (sky 0.000 read 0.000 photon 0.002 scint 0.003) )
      ( name "RS-LYR" type var
        comments "VMAG=(9.2 15.8) SPECTYPE=M5e VARTYPE=M VARID=1909+33"
        smags "v(aavso)=13.684/0.054" imags "v=-8.508/0.025"
        flags ( centered )
        noise (sky 0.005 read 0.015 photon 0.016 scint 0.003) )
    )
    transform (zerop 22.192 zp_err 0.048 me1 1.14)
)

The report is in the form of an association list, i.e. a list of name-value pairs. Some values can also be lists. Top-level list elements are:

observation
a list of parameters that globally describe the observation. They are taken straight from the FITS header of the frame being reduced.
noise
the noise parameters from the frame header.
ap_par
photometry process parameters used. These parameters are read from the configuration file, and can be modified in the Options dialog.
stars
a list of the stars that have been measured. The instrumental magnitudes, derived standard magnitudes are listed here. The error estimate for the star is broken down in components (from the sky baground estimation, from read noise, from photon shot noise and from scintillation). The total error appears in the error field of the instrumental magnitude. For standard stars, the residual and the weight used in the fit are listed. A list of flags in included, which signal occurences in the reduction process that can have an influence on results.
transform
the parameters of the trasformation from instrumental to standard, as determined by the program.


next up previous contents
Next: Camera Control Up: GCX User's Manual Previous: The World Coordinate System   Contents
Radu Corlan 2004-01-12