easysnowdata.processing.harmonize_s2_baseline#
- easysnowdata.processing.harmonize_s2_baseline(obj: Dataset | DataArray, *, cutoff: str | Timestamp = '2022-01-25', offset: int | float = 1000, bands: Sequence[str] | None = None, dim: str = 'time') Dataset | DataArray[source]#
Undo the post-2022-01-25 Sentinel-2 L2A offset so all dates share one baseline.
Values acquired on or after cutoff become
clip(min=offset) - offset; earlier values are untouched. On a Dataset only bands (default: the reflectance band names present) are changed; the SCL and other layers are left alone. Where the catalog already providesraster:bandsoffsets (Earth Search), preferscale_offset()instead of this date rule.