Background (composite)

Cloud-cleared multiday composite background, paper section 3.2 Option B.

Cloud-cleared composite clear-sky background (Miller et al. 2017, §3.2).

The emissivity-free alternative to shachen.background: stack the same time-of-day scenes from the preceding ~14 days and, per pixel, keep the three TIR brightness temperatures from the day with the warmest BT10.4 (clouds are cold; the warmest day is taken as the clear-sky estimate). Because the composite is built from real observations it carries the split-window water-vapor depression the semianalytic (emissivity x Planck, no atmosphere) background lacks: the ~1 K high bias that zeroes DT1/DT2 on transparent winter plumes (see docs/deviations.md).

Spectral coherence: all three bands come from the same selected day, and a day is a candidate at a pixel only where all three bands are finite there.

shachen.composite.COMPOSITE_BANDS: tuple[Band, ...] = (Band.TIR_86, Band.TIR_104, Band.TIR_123)

The bands a composite scene must carry (the three DEBRA TIR windows).

shachen.composite.composite_background(scenes: Sequence[Dataset]) Dataset[source]

Clear-sky background signals from a stack of same-time-of-day scenes.

Each element of scenes must carry 2-D bt_tir_86, bt_tir_104, bt_tir_123 (K) on one common grid; ValueError on an empty sequence, a missing variable, or any shape mismatch. Per pixel, a scene is a candidate only where all three bands are finite; the candidate with the warmest bt_tir_104 is selected (first wins on exact ties) and all three bands are taken from it. Pixels with zero candidates are NaN.

Returns the shachen.background.background_signals() contract — bt_bg_tir_86, bt_bg_tir_104, bt_bg_tir_123 (units “K”), rsw_bg (= bt_bg_tir_123 - bt_bg_tir_104) and btd_bg (= bt_bg_tir_86 - bt_bg_tir_104) — plus n_valid (per-pixel candidate count, integer dtype) and attrs["n_scenes"] = len(scenes).