Normalization¶
The Eq. 3 primitive shared by every test.
The Eq. 3 normalization primitive used by every DEBRA test.
- shachen.norm.normalize(x, bounds: Bounds)[source]¶
N(x) = clip((x - MIN) / (MAX - MIN), 0, 1) (Miller et al. 2017, Eq. 3).
Works on scalars, numpy arrays, and xarray DataArrays.
bounds.minmay exceedbounds.max(used for the cos-zenith blends specified in zenith-angle space): the sense of the ramp reverses.
- shachen.norm.normalize_interp(x, day: Bounds, ngt: Bounds, weight)[source]¶
N(x) with the interval linearly interpolated between two sets.
weightis per-pixel and selectsdayat 1,ngtat 0. Used for the Eq. 19 normalization of the terminator confidence factor, whose raw ceiling sits between the day and night ones; the weight is Eq. 20’sB_ngt_trm, so CF_trm is on the day scale where Eq. 22 blends it into CF_day and on the night scale where it blends into CF_ngt.