Home / Learn / Science / Sky watching / Lesson 6.4
All lessons

Module 6: Astrophotography · Lesson 6.4 · about 20 min

Stacking: why many short shots beat one long one

Averaging many aligned frames keeps the signal and cuts random noise by the square root of the number of frames. Stacking also rejects satellite trails and aircraft, and lets cheaper mounts make deep images.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 6 · about 20 minutes · read first: 6.2 Exposure, noise and signal-to-noise, 6.3 Calibration frames: darks, flats and bias · maths: square roots and averages. You’ll be able to explain why stacking works, choose between few long or many short frames, and describe registration and outlier rejection.

Averaging many aligned frames keeps the signal and cuts random noise by the square root of the number of frames; stacking also rejects satellite trails and lets modest mounts make deep images.

1. Why this matters

Stacking is how a modest camera on a small mount produces images that rival professional photos from decades ago. The same averaging logic is behind every survey’s deep co-added images (Astronomy 5.6).

2. Averages cancel noise

Each frame of the same target has the same signal plus its own random noise. Add n frames: the signal adds up n times, the random noise only n times (it partly cancels). So the SNR improves by n.

Try it: stack more frames
noise left
SNR gain
Each frame has the same faint galaxy plus fresh random noise. Averaging keeps the galaxy (it is the same in every frame) while the noise partly cancels: 4 frames halve it, 16 quarter it, 64 cut it to an eighth. Stacking also lets software throw out satellite trails and aircraft by rejecting pixels that disagree with the rest (sigma clipping). Made-up data.

Things to notice:

  • 4 frames halve the noise; to halve it again you need 16, then 64. Returns diminish: plan total time, not frame count.
  • The galaxy itself never changes; only the noise around it fades.

3. The steps

  1. Calibrate each frame (Lesson 6.3).
  2. Register: find stars in each frame and shift, rotate (and sometimes scale) frames so they line up.
  3. Combine: average or median each pixel across frames, with outlier rejection (sigma clipping): values far from the others at that pixel, like a satellite trail, a plane or a cosmic-ray hit, are dropped.
SNRn = √n × SNR₁
Stacking n frames.
Sigma clipping
Ignore values far from the stack's average at each pixel.
B t ≫ R²
Each frame should be long enough for sky noise to swamp read noise.
Physical meaning
Many blurry, noisy photos of the same scene, averaged, show what is really there: the true signal is in every frame and adds up, while the random speckle points a different way each time and averages out.

“Stacking 100 one-second frames equals one 100-second frame.” Only if read noise is negligible. Each frame adds read noise, so very short frames can be much worse. Make each frame long enough that sky noise dominates.

4. Long or short?

  • Read noise is added once per frame, so very short frames pay more read noise per minute of total time.
  • Long frames risk tracking errors, saturated stars and losing a whole frame to a gust of wind or a plane.
  • Rule of thumb: make each frame long enough that the sky’s noise swamps the read noise (often a few minutes in a city, longer under dark skies or with narrowband filters), then take as many as you can.

Stack 64 short frames of a nebula:

One frame. SNR 4: the nebula is barely visible in the noise.
Align. Software finds the stars in each frame and shifts them all to match.
Average 4 frames. Signal is the same, noise falls by √4 = 2: SNR 8.
Average 64. Noise falls by √64 = 8: SNR 32. The faint outer wisps appear.
Reject outliers. A satellite crosses one frame. Sigma-clipping notices that pixel is far from the others in the stack and ignores it.
Maths and principle

Stack of n frames, each with signal S and random noise σ:

signal=nS,noise=nσ,SNRn=nSσ

(Averaging instead of summing divides both by n, same SNR.)

When read noise matters: for a sky signal per frame Bt (electrons per pixel), read noise R adds little once Bt≫R2; a common target is Bt≈10R2, which keeps the total noise within about 5% of the read-noise-free value.

Try it: read noise 3 e⁻, sky 0.5 e⁻/s per pixel: t≈10×9/0.5=180 s per frame.

5. Worked example

Two plans for 2 hours on a galaxy, read noise 5 e⁻, sky 1 e⁻/s per pixel.

  • 4 frames of 30 minutes: sky per frame 1,800 e⁻, read noise per frame 25 e⁻², total noise² per pixel 4×(1800+25)=7300.
  • 120 frames of 1 minute: sky per frame 60 e⁻, total noise² 120×(60+25)=10200.

The 1-minute plan has 10200/7300=1.18 times more noise: a loss, but small, and in return a plane or a wind gust only ruins 1 minute instead of 30. Two- to five-minute frames would get most of both benefits.

6. Practice

More practice (answers below):

  1. How many frames would cut noise by 10 times?
  2. One frame has SNR 8. What SNR do 36 frames give?
  3. Why is the median better than the mean at removing satellite trails when you have few frames?
Answers
  1. 8×6=48.
  2. A single very bright value shifts the mean a lot but barely moves the median.
  • Stacking n frames improves SNR by √n.
  • Align on stars, then average with outlier rejection.
  • Satellite trails and planes are removed by sigma clipping.
  • Sub-exposures should be long enough that sky noise beats read noise.

Try it with your own files: align and stack frames in your browser with the image stacker.

New words: stacking, registration, sigma clipping, outlier rejection, sub-exposure, integration time.

Check yourself

1You stack 25 frames. By how much does random noise fall compared with one frame?
2What does sigma-clipping do in stacking?
3Why must frames be aligned (registered) before stacking?

Sources

  • Howell, S. B. (2006), Handbook of CCD Astronomy, 2nd ed., Cambridge University Press (the CCD equation, calibration frames)
  • Berry, R. and Burnell, J. (2005), The Handbook of Astronomical Image Processing, 2nd ed., Willmann-Bell

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Numbers in the examples are made up to show the idea unless a source is given. Simulations run in your browser on made-up data; nothing you type is sent anywhere. Astronomy only: nothing here is astrology.