GLOBAL KNOWLEDGE ARK

Astronomy · Finding change in the sky

Comparing images and detecting change

Follow a signed three-pixel difference through an explicit throughput scaling, then distinguish a changed source from unmatched image response and reference-dependent flux.

Continue in the approved chapter order. Necessary vocabulary, quantities and assumptions are explained in the lesson.

Back to the chapter

After reading, you can

  • Identify the registration, calibration, background and image-response conditions of an image comparison.
  • Calculate a supplied science-minus-scaled-reference pixel ledger.
  • Explain why a residual or a positive centre is not automatically a new physical source.
01

Subtraction needs more than two pictures

A science image and a reference image record light under particular observing conditions. Before their values can be compared, the images must refer to compatible sky coordinates, bands and photometric scales. A reference also contains its own source light and measurement uncertainty.

Registration aligns coordinates so that the same sky locations are compared. Photometric scaling accounts for a declared relative throughput or exposure response. A differential background can require a separate additive correction.

The point-spread function describes how a point source’s light is distributed in an image. Seeing, optical response, sampling and position can change that distribution between observations. An unchanged source can leave structured residuals if those responses are not adequately matched or modelled.

Alard and Lupton developed a fitted image-matching approach, while Zackay, Ofek and Gal-Yam formulate a statistical subtraction and detection method under explicit assumptions. Their methods motivate these distinctions; the three-pixel arithmetic below is not an implementation or performance test of either algorithm.

02

A throughput change can mimic source brightening

For an original ledger, use three invented detector pixels with expected background-subtracted linear signals in one arbitrary signal unit Q0. The differential additive background is already removed. Let R be the reference row and S the science row.

Supply a known reference-to-science throughput factor a, and define each corrected difference pixel by D = S − aR. In the first case R = (1, 3, 1)Q0, S = (2, 6, 2)Q0 and a = 2. The source is stipulated unchanged after the response scaling.

Naive subtraction S − R gives (1, 3, 1)Q0, a positive residual. Correct subtraction S − 2R gives (0, 0, 0)Q0. The apparent excess came from the known relative response, rather than a supplied astrophysical change.

The exact scale factor is an assumption here. In real data its uncertainty, colour dependence, spatial variation and interaction with the response model would need treatment. The ledger contains expected signals, not a random detector realization.

03

Distinguish throughput from an added source contribution

In the second case keep R = (1, 3, 1)Q0 and a = 2, but supply S = (3, 9, 3)Q0. The corrected difference is (1, 3, 1)Q0 with sum 5Q0. A positive contribution remains after the declared scale correction.

The science sum is 15Q0, whereas the scaled reference sum is 10Q0. Their difference is 5Q0. This measures a reference-relative change on the science scale; it is not the entire science-image signal.

Absolute source flux would require the reference source contribution and compatible calibration as well. An object can already be present in the reference and later brighten or fade. A negative difference represents a signed decrease relative to the reference, rather than negative incident photons.

The table keeps each row’s definition visible. A nonzero difference can motivate investigation, but without uncertainty and response validation it is not yet a detection significance or a physical classification.

Original three-pixel expected-signal ledgers in Q0. Differential backgrounds are removed and the supplied throughput factor a is exactly known. These rows are not real images, physical PSFs or outputs of a named subtraction algorithm.
CaseReference R/Q0Science S/Q0aNaive (S − R)/Q0Corrected (S − aR)/Q0Corrected sum / Q0
Throughput only(1, 3, 1)(2, 6, 2)2(1, 3, 1)(0, 0, 0)0
Source brighter(1, 3, 1)(3, 9, 3)2(2, 6, 2)(1, 3, 1)5
Unmatched shape(2, 4, 2)(1, 6, 1)1(−1, 2, −1)(−1, 2, −1)0
04

Inspect the surrounding residual and its model

The third row has R = (2, 4, 2)Q0, S = (1, 6, 1)Q0 and a = 1. Both input sums equal 8Q0, but their distributions differ. Subtraction gives (−1, 2, −1)Q0: a positive centre accompanied by negative adjacent values and zero total.

This case deliberately omits image-response matching. It illustrates how a central residual can arise when shapes differ even though their integrated totals agree. It does not claim that these three numbers form a real stellar point-spread function or uniquely diagnose a particular instrumental fault.

A real comparison must assess position shifts, response shape, backgrounds, masks, saturation and neighbouring sources. Atmospheric colour effects and interpolation can add complications. A visually compact residual is evidence to test against these alternatives.

Difference flux and a matched-filter detection statistic are also different quantities. A method can use a model of the expected residual shape and noise to construct a detection statistic. Its assumptions determine how that statistic relates to false alarms or uncertainty.

05

A change is only as interpretable as its inputs

Noise in the reference contributes to each difference using it. Processing can correlate neighbouring pixels or repeated measurements, and calibration uncertainties can be shared. Treating every pixel or later difference as independent can misstate the evidence.

Claims of statistically optimal subtraction or uncorrelated noise apply within the stated method and noise assumptions. The source papers discuss qualifications near bright objects and under imperfect sampling, response or registration. A generic subtraction is not automatically a perfect or independent measurement.

Preserve the science and reference identities, calibration and processing versions, masks and relevant quality information. When the reference changes, the meaning of a reference-relative light curve can change too unless the comparison is explicitly reconciled.

The next lesson follows a candidate into an alert and possible follow-up observations. It will distinguish a new message from a new detection and show quantitatively how a reused reference can correlate apparently separate measurements.

Worked examples

Compare naive and calibrated subtraction

Why does the unchanged first source leave a residual under S − R but none under S − 2R?

  1. The supplied science response is twice the reference response, so S = 2R for this unchanged row.
  2. Naive subtraction gives 2R − R = R = (1, 3, 1)Q0.
  3. Applying the known factor gives 2R − 2R = 0 in every pixel.

The naive residual is a response mismatch under the declared model, not evidence of source brightening.

Inspect all three pixels

Does the third row’s central value + 2Q0 establish an added positive total source signal?

  1. The two input sums are both 8Q0.
  2. The residual is (−1, 2, −1)Q0.
  3. Its sum is −1 + 2 − 1 = 0, so the central positive value is balanced by the adjacent negative values.

No. The deliberately unmatched shapes create a structured zero-sum residual in this toy.

Try the reasoning

  1. Is direct pixel subtraction generally interpretable without compatible sky registration and response?

    Show the answer and reasoning

    No.

    Coordinate, throughput, background and image-shape differences can create residuals.

  2. Is a reference-relative difference automatically the full source flux in the science image?

    Show the answer and reasoning

    No.

    The reference may already contain source light that must be accounted for on a compatible scale.

  3. Does a negative difference pixel imply negative incident photons?

    Show the answer and reasoning

    No.

    It is a signed change in a calibrated quantity relative to the chosen reference.

  4. Does one positive residual uniquely establish a new astrophysical event?

    Show the answer and reasoning

    No.

    Uncertainty, response matching, artifacts, motion and alternative physical changes require further evidence.

What to carry forward

  • Image comparison needs compatible coordinates, scale, background and response.
  • A signed difference measures change relative to its reference.
  • Residual structure, uncertainty and provenance are part of the detection argument.

References

Teaching resources and research supporting this lesson’s explanations and examples.

  1. A Method for Optimal Image SubtractionChristophe Alard and Robert H. LuptonReference guidearxiv.orgRead source
  2. Proper Image Subtraction — Optimal Transient Detection, Photometry and Hypothesis TestingBarak Zackay, Eran O. Ofek and Avishay Gal-YamReference guidearxiv.orgRead source
  3. The Zwicky Transient Facility: Data Processing, Products, and ArchiveFrank J. Masci and the listed ZTF coauthorsReference guidearxiv.orgRead source