viz.stretch01
viz.stretch01(a, lo=2, hi=98)Per-band percentile stretch to [0, 1]; NaN stays NaN.
The percentile defaults (2 / 98) clip the brightest 2 % and darkest 2 % of finite pixels before scaling, so a single bright cloud or a dark deep-water column does not collapse the visible range of the rest of the scene.