easysnowdata.processing.stretch_percentile#

easysnowdata.processing.stretch_percentile(composite: DataArray, lower: float = 2, upper: float = 98, *, dim: str = 'band') DataArray[source]#

Percentile contrast stretch per band, clipped to 0–1.

Percentiles are computed over all non-band dimensions (Dask arrays are rechunked along them). Bands with no spread stay 0.