On 9/20/05, Juan Conejero <pleiades2004@pleiades-astrophoto.com> wrote:
Hi Wei-Hao,
This is very interesting. So after equalizing the images to achieve similar
brightness and contrast, you measure the standard deviation s on background
areas of each channel, to take 1/Sqrt( s ) as weighting factors. This makes
sense assuming a Gaussian distribution of noise.
This is not limited to Gaussian noise. It is very general in statistics. The
error weighted mean (i.e., weighted by 1/err^2.0) will give the best S/N.
Jean-Luc Stark describes an iterative method to calculate the standard
deviation of Gaussian noise that could be very helpful here (Astronomical
Image and Data Analysis, pp 37-38). A simple tool using this method should
be very easy to implement, for automatic calculation of relative weighting
factors.
How many samples of rms do you take on your images?
Just one. (I'm lazy.) Of course, the measuring area needs to be large enough.
>For raw (linear and without any prior processes) digital images taken from
>the same night and under similar conditions, they can be simply added
>together with equal weighting even if they have different exposure times.
>This is the simplest case.
I don't understand this. I assume you're talking of images taken with linear
sensors (CCD). Linear images with different exposure times have
proportionally different signal intensities. Discarding noise, we should
take into account the total amount of signal when we are averaging a set of
images with different exposure times. For example, if I have a linear image
A exposed by a factor 1, and another linear image B exposed by 0.8, the
correct average should be (A+B)/1.8. Furthermore, if exposure time improves
the signal-to-noise ratio, this also should be taken into account. Or am I
completely wrong (I reserve that right :)?
You are not really terribly wrong. Indeed, it is exactly the "different signal
intensities" you just mention taking care of the weighting. The longer
exposure images look brighter. And therefore in a straight add, they
automatically have higher weights. The raw images are already weighted
by the exposure times so there is no need to give additional weights.
This can be viewed in another way. In the best possible weighting method,
stacking an A min exposure and an B min exposure should give a result
exactly identical to a single (A+B) min exposure. How to achieve this?
Just directly add the raw images together without any weights. The final
result doesn't care if the "integration" is done on the CCD chip or in
softwares. Just collect and add the photons together, and we will
have the best possible S/N.
Even another different way to look at this. Above you mentioned "exposure
time improves S/N." This is true. And in a good linear device, the S/N
improves as the square root of exposure time. (This is the nature of both
photons and dark electrons.) Therefore, if we calibrate the images first
(i.e., bring them to similar brightness) and weight the images with 1/rms^2
as I mentioned earlier, what we really do is weighting the images with
the exposure times. This is identical to directly adding the raw images.
This also shows why error weighted mean will give the best results, although
the idea of error weighted mean isn't really restricted to photons. In general
statistics, a good mean is an error weighted mean. In astronomy, an error
weighted mean is an exposure time weighted mean.
Hope this clears your questions. There are lots of stories to tell about
statistics and imaging. I once tried to write up series of essays
on this for amateur astronomers and I gave up. This is not because the
topic itself is difficult to write, but because my English isn't good enough.
Writing academic papers is already challenging enough. It's too much
for me to write something that is easy to understand for the amateur.
Cheers,
Wei-Hao