Confidence factor

Day / terminator / night blend into CF_comb, Eqs. 16-22.

DEBRA confidence factor, Eqs. 16-22 (Eqs. 21-22 per the 2020 erratum).

Combines the dust tests under cloud-mask suppression into day / terminator / night confidence factors (Eqs. 16-18), normalizes each with the (0.25, 2.50) bounds (Eq. 19), and blends them across the terminator with solar-zenith weights B_ngt_trm and B_trm_day (Eqs. 20-21, exponent 1.5) into the final CF_comb in [0, 1] (Eq. 22).

shachen.confidence.confidence(tests: Dataset, cloud: Dataset, zenith_deg: DataArray, constants: ConfidenceConstants = ConfidenceConstants(dt3_weight_trm=0.5, dt3_weight_ngt=0.5, cf_norm=Bounds(min=0.25, max=2.5), blend_exponent=1.5, ngt_trm_zenith_deg=Bounds(min=105.0, max=90.0), trm_day_zenith_deg=Bounds(min=90.0, max=75.0))) Dataset[source]

Confidence factors and blend weights on the scene grid.

tests needs dt1, dt2, dt3 (from shachen.dust_tests.dust_tests()); cloud needs cm_norm_day, cm_norm_ngt (from shachen.cloudmask.cloud_mask()); zenith_deg is the solar zenith angle in degrees. All 2-D inputs must share one shape (ValueError otherwise); NaN propagates.

Returns a Dataset with cf_day, cf_trm, cf_ngt (each already normalized per Eq. 19; CF_trm and CF_ngt use cm_norm_day and cm_norm_ngt respectively, CF_ngt takes max(DT1, DT2)), the blend weights b_ngt_trm, b_trm_day (via shachen.norm.normalize_cos_zenith()), and cf_comb (Eq. 22).