Context and 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.
Learning Goals
- Explain how signal-to-noise improves with the number of stacked, independent exposures.
- Compare median and mean combination for robustness to cosmic-ray hits.
- State the registration requirement that must be satisfied before stacking is valid.
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.
Terms Developed in Context
These terms form the measurement chain for Image Stacking, Registration, and Cosmic Rays: each connects an observable to a model choice, and each has a boundary that must be respected when making a scientific claim.
- image registration
The transformation and resampling that align multiple images to a common pixel or sky-coordinate grid. Registration ensures that real source signal lands at the same output location before frames are combined.
Centroids or WCS solutions constrain shifts, rotation, scale, and sometimes distortion. Registration after stacking cannot undo source smearing already introduced by misalignment.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- median combine
A stack in which each output pixel is the median of the aligned input-pixel values. It rejects isolated cosmic-ray values without requiring their amplitudes to be modeled.
For an odd number of frames, one extreme outlier does not change the central ordered value. The median is robust but statistically less efficient than the mean for purely Gaussian noise and small stacks.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- sigma-clipping
An iterative combination method that estimates a center and scatter, rejects values beyond a chosen sigma threshold, and recomputes the result. It retains much of the mean’s efficiency while rejecting cosmic rays and other outliers.
The threshold is defined relative to a noise estimate and therefore depends on stack depth and the validity of that estimate. Aggressive clipping can remove real variable or moving-source signal, especially with few frames.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- cosmic ray
An energetic-particle event that deposits charge in one exposure, often as a sharp bright pixel or track. Its single-frame nature distinguishes it from a stationary astronomical source and motivates robust stacking.
Registered stacks expose cosmic rays as temporal outliers at a pixel while persistent source flux repeats. Not every isolated bright pixel is a cosmic ray; hot pixels, satellites, and transients require different checks.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- independent noise
Random fluctuations whose values in one exposure do not predict their values in another. The square-root stacking gain assumes this independence across frames.
Independent variances add, so averaging \(N\) comparable frames reduces standard error by \(1/\sqrt N\). Flat-field errors, sky gradients, and guiding patterns repeated across frames are correlated systematics and do not average down this way.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- stack depth
The number of usable aligned exposures, or equivalently the total integrated exposure represented by a stack. It sets the expected random-noise improvement and the robustness available for outlier rejection.
For equal independent frames, SNR grows approximately as \(\sqrt N\); total exposure grows as \(Nt\). Nominal frame count overstates effective depth if frames differ greatly in quality or share correlated errors.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- outlier rejection
A documented rule for identifying and excluding measurements inconsistent with the expected distribution or temporal behavior. It prevents cosmic rays and defective pixels from dominating combined images.
Median combination and sigma-clipping are two rejection strategies with different efficiency and sample-size requirements. Rejecting points solely because they disagree with the desired result is not valid outlier treatment.
Developed in this lecture: The term helps interpret this evidence: A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is. It also constrains the working model: If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
Evidence
- A cosmic-ray strike appears as a single, very bright pixel in exactly one frame of a stack and nowhere else — it is not reproduced across exposures the way real astrophysical signal is.
- Stacking without first aligning (registering) the frames to a common pixel grid blurs point sources and can create false extended structure.
- A simple mean combine is pulled toward the cosmic-ray value in the affected pixel; a median combine of nine frames is essentially unaffected by one outlier.
Model
- If per-frame noise is independent and Gaussian, stacking N frames improves SNR by √N relative to a single frame.
- Median combination (or sigma-clipped mean) is far more robust to single-frame outliers like cosmic rays than a simple arithmetic mean.
- Registration (aligning frames to a common World Coordinate System or pixel grid) must happen before combination, not after.
Working Equation
\[ {\rm SNR}_{\rm stack} \approx \sqrt{N}\,\times\,{\rm SNR}_{\rm single} \]
Worked Example
- Single-frame SNR = 12; stacking N = 9 independent, registered frames gives an expected improvement factor of √9 = 3.00.
- Stacked SNR ≈ 12 × 3.00 = 36.0 — a marginal detection becomes a secure one.
- 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.
Common Misconception
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 Guidance
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 / 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 Questions
- What was measured directly in this lecture’s worked example, and what was inferred from the model?
- Which uncertainty or systematic would most change the interpretation?
- How does this technique connect to the technical observing report due at the end of the term?
References
- OpenStax Astronomy 2e, Chapter 6.3 (detectors, CCD imaging).
- Local reference copy:
references/openstax-astronomy-2e.pdf.