sertit / eoreader

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and spectral indices in a sensor-agnostic way.
https://eoreader.readthedocs.io/en/latest/
Apache License 2.0
271 stars 22 forks source link

BUG: Clip negative reflectances to 0 #79

Closed remi-braun closed 1 year ago

remi-braun commented 1 year ago

Sentinel-2 data (but surely others) can have negative reflectance values, which are meaningless and therefore should be discarded as they will affect spectral indices.

The reflectance arrays will be clipped to 0.

NB: reflectances values over 1 are allowed.