ASTR 210 · Lecture 11

Image Stacking, Registration, and Cosmic Rays

Stacking is a statistical operation, not magic noise removal

Learning Goals

  1. Explain how signal-to-noise improves with the number of stacked, independent exposures.
  2. Compare median and mean combination for robustness to cosmic-ray hits.
  3. State the registration requirement that must be satisfied before stacking is valid.

Reading anchor: OpenStax Astronomy 2e, Chapter 6.3 (detectors, CCD imaging).

Why This Matters

Deep imaging and faint-source detection depend on combining many exposures, but stacking only improves a measurement if the images are registered to a common coordinate system and the noise in each frame is independent. Careless stacking can inject artifacts rather than removing them.

Opening Phenomenon

A single 2-hour-old exposure gives SNR = 12 for a faint source — barely a secure detection. Combining 9 such exposures, taken under similar conditions, should improve the detection significantly if the images are well registered.

First question: what here is directly measured, and what is inferred from a model?

Terms for This Lecture

image registration

Definition: The transformation and resampling that align multiple images to a common pixel or sky-coordinate grid.

Why it matters here: Registration ensures that real source signal lands at the same output location before frames are combined.

Relationships: Centroids or WCS solutions constrain shifts, rotation, scale, and sometimes distortion.

Boundary / common confusion: Registration after stacking cannot undo source smearing already introduced by misalignment.

Evidence We Need to Explain

Model

Quantitative Tool

\[ {\rm SNR}_{\rm stack} \approx \sqrt{N}\,\times\,{\rm SNR}_{\rm single} \]

Worked Example

  1. Single-frame SNR = 12; stacking N = 9 independent, registered frames gives an expected improvement factor of √9 = 3.00.
  2. Stacked SNR ≈ 12 × 3.00 = 36.0 — a marginal detection becomes a secure one.
  3. If one of the nine frames contains a 5000-count cosmic-ray spike in the target pixel, a simple mean combine adds roughly 5000/9 ≈ 556 counts of spurious signal to that pixel, while a median combine of nine values is essentially untouched by the single spike.

Visual Reasoning

Read the stacking-gain curve alongside the cosmic-ray comparison.

  • Why does the SNR gain grow more slowly as N increases?
  • Why does a median combine resist the single spiked frame while a mean combine does not?
Lecture 11: Image Stacking, Registration, and Cosmic Raysnumber of stacked frames NSNR gain factor √NN=9: √N=3.00, SNR 12→36.0Cosmic-ray robustness (1 of 9 frames spiked)mean: +556 ADU biasmedian: unaffectedStacking N=9 registered frames gains √9=3.00× in SNR, but only a median combine resists a single-frame cosmic-ray spike.
SNR gain from stacking N frames, plus a comparison of mean and median combination under a cosmic-ray spike.

Common Pitfall

Assuming that stacking automatically removes artifacts. Stacking only removes random, independent noise; it does not remove a systematic error (like an uncorrected flat field) present in every frame, and a naive mean combine does not remove cosmic rays.

Active Learning Segment

Given nine simulated per-frame values for one pixel, one of which is a clear outlier, compute both the mean and median and discuss which combination method a careful reduction pipeline should use.

Lab or Observing Connection

This unit is assessed through Problem Set 06 rather than a dedicated lab, using simulated per-frame values that mirror this worked example.

Synthesis

Stacking is a statistical operation that trades exposure count for signal-to-noise; it rewards careful registration and is easily defeated by sloppy combination methods.

References