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:
ESA's sample L1C file which has offsets of -1000 for every band
An old ESA L1C zip file, with some cloud
The same file, with manually faked offsets added to each band and given in the XML file
A standard USGS Landsat-8 tar.gz file
The JRSRP imported version of that Landsat-8 file (i.e. using JRSRP's custom Landsat main script, unmodified for this change)
The JRSRP imported version of the ESA image with cloud (i.e. using JRSRP's custom Sentinel-2 main script, which required modifications for this change)
All cases worked as expected, so I am reasonably happy that it is OK.
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.