The concept of
units on Sentinel Hub has been revamped and improved. The
units for each band are now well defined in the docs. As a reminder, by specifying the
units parameter in your evalscript, you can choose the physical quantity and corresponding units of measurement for the values of each band. The changes as specified in the docs will be available on Sentinel Hub shortly.
November 1, 2021, November 29, 2021, Sentinel Hub will validate the
units parameter in your evalscripts. This means that requests for bands in unsupported units will be rejected. This should only impact requests which are already producing wrong results, so you should not be too worried about it. We will also use the upcoming month to monitor active requests, to see if there are some problematic use-cases.
This validation is temporarily disabled until then, so you have some time to correct any potential problematic evalscripts which have worked in the past.
For more information, and a list of supported units for each band of each data collection, see our docs. Here is a direct link to the units chapter for Sentinel-2 L2A, for example: https://docs.sentinel-hub.com/api/latest/data/sentinel-2-l2a/#units
In case of trouble, you usually only need to replace the problematic units parameters with the default values given in the documentation for the corresponding bands. Note that for nearly all bands there is only one supported unit so it is just a matter of updating the name; correcting the “units” value will therefore not have any effect on the values in the script. Alternatively, removing “units” from your evalscript will return the default units for each band.
Here is an example error message returned by the service for incorrect requests once validation starts: “Band ‘B10’ of collection ‘LOTL1’ requested in unsupported units ‘REFLECTANCE’! Supported units for this band: [BRIGHTNESS_TEMPERATURE].”
In this example you would need to change the units parameter from REFLECTANCE to BRIGHTNESS_TEMPERATURE. Note in this case there is only one supported unit (BRIGHTNESS_TEMPERATURE). Correcting this will not change any values in the evalscript as brightness temperature values are already returned now. So clearly REFLECTANCE is not the right value and needs to be updated.
Note also that the S2 L2A band AOT had its normalization corrected to 1000 from 10000. This change will also be in effect shortly.