ubarsc / python-fmask

A set of command line utilities and Python modules that implement the ‘fmask’ algorithm
https://www.pythonfmask.org
GNU General Public License v3.0
74 stars 21 forks source link

ESA radiometric offsets #48

Closed neilflood closed 2 years ago

neilflood commented 2 years ago

This change allows for the introduction by ESA of radiometric offsets in their Sentinel-2 L1C imagery. This was a breaking change, as any software which is not modified to explicitly take account of the change will give incorrect answers.

The flexibility of python-fmask made this change more complex than it might sound. The package can be used for both Landsat and Sentinel-2, and can be used either with the supplied main scripts for each of these, using data as formatted by USGS and ESA respectively, or with custom main scripts and/or image organisation.

It was felt undesirable to require any changes to existing Landsat-based main scripts, but desirable to require that main scripts for Sentinel-2 to forced to update to account for the change. This avoids running without offsets and silently getting it wrong.

There are currently no "real" ESA data available with this change in place, only a single sample file (which has no cloud), but it has been tested on the following cases:

All cases worked as expected, so I am reasonably happy that it is OK.