sentinel-hub/sentinelhub-py

[HELP] What is the factor used in plotting and how is it calculated?

jsetty opened this issue · 3 comments

jsetty commented

Question

In examples/data_collections.ipynb, the factor argument for plot_image is given a value of 3.5 / 255. What is this factor and how is it calculated? Is it only used for the sake of visualization?

As you suspected, it is used only for visualization purposes. Without it the images are often darker than what we're used to and it makes it harder to see details. For some lighter areas (deserts) you can probably reduce it a bit.

jsetty commented

Thank you for the clarification. Do you normally clip very high values? For example, ESA suggests that the saturation level of 255 digital counts correspond to a level of 3558 for L1C products or 2000 for L2A products in this document: https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-2-msi/definitions.

Depends on the usecase. For visualizations we often multiply with 3.5 and then clip back down to 255 (or divide by 255 and clip to 0 and 1).