Dust tests

DT1-DT3 against the dynamic background, Eqs. 13-15.

DEBRA dust detection tests DT1-DT3, Eqs. 13-15 (Miller et al. 2017).

DT1/DT2 measure the observed split-window signals against the per-pixel dynamic background (RSW_bg / BTD_bg used as the MIN bound of Eq. 3). DT3 is the thermal-contrast consensus builder; it is implemented magnitude-reversed relative to the printed Eq. 15, per the paper’s prose (“observations that are relatively cold compared to MERRA produce high value for DT3”); see docs/deviations.md:

DT3 = clip(((T_MERRA - S) - BT10.4) / depth, 0, 1)

with the surface shift S = -10 K (land) / +5 K (ocean) applied as printed (T_MERRA - S) and depth = 50 K.

shachen.dust_tests.dt1(rsw_obs, rsw_bg, constants: DustTestConstants = DustTestConstants(dt1_max_rsw_k=3.5, dt2_max_btd_k=3.0, dt3_shift_land_k=-10.0, dt3_shift_ocean_k=5.0, dt3_depth_k=50.0))[source]

Eq. 13: (RSW_obs - RSW_bg) / (MAX_RSW - RSW_bg) clipped to [0, 1].

RSW = BT12.3 - BT10.4 (K). Array-generic. Where the dynamic range is degenerate (RSW_bg >= MAX_RSW) the test returns 0.0; NaN propagates.

shachen.dust_tests.dt2(btd_obs, btd_bg, constants: DustTestConstants = DustTestConstants(dt1_max_rsw_k=3.5, dt2_max_btd_k=3.0, dt3_shift_land_k=-10.0, dt3_shift_ocean_k=5.0, dt3_depth_k=50.0))[source]

Eq. 14: like dt1() for BTD = BT8.6 - BT10.4 with MAX = 3.0 K.

shachen.dust_tests.dt3(bt_104, skin_temperature, is_land, constants: DustTestConstants = DustTestConstants(dt1_max_rsw_k=3.5, dt2_max_btd_k=3.0, dt3_shift_land_k=-10.0, dt3_shift_ocean_k=5.0, dt3_depth_k=50.0))[source]

Eq. 15 (magnitude-reversed, see module docstring).

is_land selects the land/ocean surface shift. Array-generic; NaN in bt_104 or skin_temperature propagates.

shachen.dust_tests.dust_tests(scene: Dataset, background: Dataset, skin_temperature: DataArray, is_land: DataArray, constants: DustTestConstants = DustTestConstants(dt1_max_rsw_k=3.5, dt2_max_btd_k=3.0, dt3_shift_land_k=-10.0, dt3_shift_ocean_k=5.0, dt3_depth_k=50.0)) Dataset[source]

Assemble dt1, dt2, dt3 fields on the scene grid.

scene needs bt_tir_86, bt_tir_104, bt_tir_123; background needs rsw_bg, btd_bg (from shachen.background.background_signals()). All 2-D inputs must share one shape (ValueError otherwise). Returns a Dataset with dt1, dt2, dt3 in [0, 1] (NaN where inputs are NaN).