Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.

Signal Versus Noise

The topic of signal and noise in a measurement is a very important one -- but also a very broad one. We will touch just the tip of the iceberg, using as an example measurements made from CCD images of optical sources.

There are a number of factors which affect the quality of photometry of star in a CCD image. One is the exposure time: the longer the exposure time, the higher the signal in a star, and so the more precise the measurements. Of course, if one exposures too long, one will saturate the CCD, which ruins the measurements. But how long an exposure time is necessary?

The answer depends on your goal. If you simply want to verify that an object is present at a particular location, you may accept a very faint, barely noticeable dot of light. If you want to measure the position of an asteroid to an arcsecond, you would need a little more signal. If you want to make a very rough estimate of magnitude, to ten percent, say, then you might need more signal. And if the goal is to look for tiny variations in light of a variable star, you might need to expose long enough that the star comes close to the non-linear regime.

So how can you figure out the appropriate exposure time for a given project? There are two approaches:

  1. Consider this exchange from Calvin and Hobbes:

    You can do exactly the same thing with your astronomical observing: take a series of images with increasing exposure times, and measure the object of interest on each one. The shortest exposure which provides enough precision for your goal is the right length.

    This actually isn't a bad idea if you have huge amounts of observing time. On the other hand, if you are given just a single night on a big telescope, you probably won't want to waste any time taking a series of pictures, most of which turn out to be useless.

  2. Calculate the signal from your object for a set of exposure times. There will be a number of different sources of noise in the image -- determine the amount of noise from each and add them up. The ratio of signal-to-noise (S/N) yields the uncertainty in the measurement of stellar brightness:
    
                                         1
          fractional  uncertainty  =   -----
                                        S/N
      
    So, for example, if the S/N ratio is 50, the photometry will have an uncertainty of 0.02, which is approximately 0.02 magnitudes.


Source of signal

There is only one source of signal from a star: the light of the star itself. If the star causes N(star) photons to strike the CCD chip during the exposure, and all of them knock free one electron, then the image should have N(star) electrons. That's the signal.

Of course, real detectors don't have 100 percent quantum efficiency. If N(star) photons do strike a detector, maybe only 0.70*N(star) electrons are knocked free.

For the standard astronomical passbands, there are equations which give the number of photons per second collected by a telescope of a particular size from a star of a particular magnitude. A good source of these zero-point fluxes is Allen's Astrophysical Quantities. Some additional references are collected at the end of today's lecture. I use these values:

  Passband     photons/sec/cm^2 
              from star of mag 0
---------------------------------
    U            550,000
    B          1,170,000
    V            866,000
    R          1,100,000
    I            675,000

Exercise:
  1. Ignoring atmospheric extinction, how many photons should strike a CCD in a 15-second exposure with the RIT 12-inch telescope through the V filter of a star with magnitude V=13?


Sources of noise

There are four main sources of noise for simple aperture photometry on a CCD: shot noise from the star itself, shot noise from the background sky, thermal noise from the CCD, and readout noise from the CCD. Let's consider each in turn.

  1. Noise from the star: The star produces photons in a random Poisson process, so that there are random variations in the number of photons which strike the chip each second. The size of these random variations is simply the square root of the number of photons:
            noise(star)  =  sqrt of number of photons from star
    
                         =  sqrt[ N(star) ]
       

  2. Noise from the background: In aperture photometry, one adds up the light from all the pixels within an aperture; that light is a combination of photons from the star and photons from the sky near the star. One then subtracts the contribution from the sky within the aperture, leaving only the light from the star.

    However, just as the number of photons from a star varies randomly according to Poisson statistics, so does the number of photons from the sky. There is always some uncertainty in the amount of background light subtracted from the aperture. The noise due to this random variation is

            noise(sky)   =  sqrt of number of photons from sky
    
                         =  sqrt[ N(sky)  ]
       
    We can break this down a bit further: to calculate the sky contribution, we determine a local sky level per pixel, and then multiply by the number of pixels within the aperture.
                N(sky)   =  (electrons per pixel from sky) * (number of pixels)
       
    So we can write the noise from the sky as
            noise(sky)   =  sqrt[ N(sky per pixel) * npix ]
       

  3. Thermal noise: Thermal motions in the silicon lattice of the chip knock some electrons free; this is the so-called "dark current". You have already seen how this thermal contribution is a sensitive function of temperature.

    When we add up all the electrons within some aperture, some may come from the star, some will come from the light of the background sky, but some will be due to this thermal contribution. These electrons also follow a Poisson distribution, so the noise due to this random variation is

         noise(thermal)  =  sqrt of number of electrons from thermal motions
    
                         =  sqrt[ N(thermal)  ]
       
    Just as we did for the electrons from the background sky, we can break this up into the electrons per pixel, and the number of pixels in the aperture we're using.
            N(thermal)   =  (electrons per pixel from thermal) * (number of pixels)
       
    So we can write the thermal noise as
         noise(thermal)  =  sqrt[ N(thermal per pixel) * npix ]
       

  4. Readout noise in the CCD: The CCD electronics do not measure perfectly the amount of charge in each packet of electrons. They add a little bit of noise as they perform the measurement process. Astronomers call this readout noise, and always express it in units of electrons. One can measure it by looking at a very short dark image: calculate the standard deviation of counts in a box of 20x20 or 30x30 pixels, then multiply by the gain of the chip:
                                               electrons 
          readnoise R    =  stdev(counts)  *  ------------
                                                 count 
       

    In our calculations of signal-to-noise, we need to convert from the stdev to the corresponding variance:

            variance     =  (stdev * stdev)
       
    and then add up the variance from all the pixels which fall inside the photometric aperture. The result is
         noise from CCD  =     (R*R)  * npix
       

We can add all four sources of noise together: the way to do it is to add up all the electrons they produce, and then again appeal to Poisson statistics to find the noise.

    total noise      =   sqrt [ N(star)  +  
                                N(sky per pixel)*npix  +  
                                N(thermal per pixel)*npix  +  
                                (R*R)*npix  ]


The "background" term: sky and thermal contributions

The number of thermal electrons will grow with time: the longer the exposure, the more thermal electrons are knocked free per pixel. The same is true of electrons which are knocked free by photons from the background sky: double the exposure time, double the number of electrons from the sky. Since these two sources of noise

they are often bundled together as a general "background" term:
    total noise      =   sqrt [ N(star)  +  
                                N(background per pixel)*npix  +  
                                (R*R)*npix  ]

Let's compare "typical" values for these two sources of noise in an image from the RIT Observatory.

Exercise:

  1. Make a copy of all the images from the sep20_2003 directory into your own directory
  2. Use the buffers command to print out the values in the FITS image header of v585.fit. Write down the exposure time, the filter name, and the camera temperature. Note the COMMENTs at the end of the header.
  3. Based on images from Oct 4, 2003, the dark current is roughly 1 count per pixel per second at a temperature of -15 degrees Celsius. How many ELECTRONS per pixel per second are created by thermal motions? Write this down.
  4. Now, display the v585.fit image, which has already had the dark contribution subtracted away. What is the mean level in the sky background in this image? How many ELECTRONS per pixel per second are created by background sky photons?

Which source of background electrons dominates?

Would the situation change if we used a different filter?


Calculating Signal to Noise Ratio

In order to find the S/N ratio, we simply divide the total signal by the total noise.

  signal                         N(star)
  ------  =  ---------------------------------------------------------------
   noise     sqrt [ N(star)  +  N(background per pix)*npix  +  (R*R)*npix  ]
where
     N(star)                 is the number of electrons from the star
                                   which fall within the aperture
 
     N(background per pix)   is the number of electrons per pixel
                                   due to the sky and thermal background

     R                       is the readout noise per pixel, in electrons

     npix                    is the number of pixels in the aperture

Remember to be consistent in your calculations. Always use electrons, in all the terms. It's easy to forget, and mix counts with electrons, but that will doom your work.

Exercise:
  1. Make a fresh copy of the v585.fit image from the sep20_2003 directory.

  2. Display the v585.fit image. Measure the position of the bright star at lower right, near row=230, col=360.

  3. Define a box which includes the star, and is 10 by 10 pixels in size: you can type
                     box 1 cr=xxx cc=yyy nr=10 nc=10
             
    where you replace xxx by the row position of the star, and yyy by the column position of the star.

  4. Add up all the counts inside this box:
                     abx v585.fit box=1
             
    Look at the "tot. adus" value for the total sum.

  5. Now define a box of the same size which does NOT include this star, or any star.
                     box 2 cr=zzz cc=www nr=10 nc=10
             
    where you choose the coordinates zzz and www to be the location of a blank region of the sky.

  6. Add up all the counts inside this other box:
                     abx v585.fit box=2
             

  7. Calculate the signal inside the first box.

  8. Calculate the noise inside the first box. Please write down all these terms explicitly, before adding them together. What is the value of npix in this calculation?
     noise  =  sqrt [ N(star)  +  N(background per pix)*npix  +  (R*R)*npix  ]
             

  9. Which of the noise terms is/are dominant? Which is/are negligible?

  10. Calculate the signal-to-noise ratio.

  11. Estimate the uncertainty, in magnitudes, of a magnitude measurement of the star from this image.

You can see the actual scatter in magnitude measurements of this star by looking at this page describing V585 Lyr observations from Sep 20, 2003. The bright star you chose is the one marked "A" in the chart. Its scatter is indicated by the second dot from the left in the sigma-vs-mag diagram. You can see closeups of the magnitude measurements ...


For more information

Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.