sentinel-hub / sentinel2-cloud-detector

Sentinel Hub Cloud Detector for Sentinel-2 images in Python
Creative Commons Attribution Share Alike 4.0 International
410 stars 87 forks source link

How to perform the harmonization for products with baseline 0.4? #40

Closed giustiandrea91 closed 1 year ago

giustiandrea91 commented 1 year ago

Hello,

I am using the Cloud-detector on locally stored S2-Images in .SAFE format. However, I am getting not satisfactory results when processing products with a processing baseline 0.4 . As indicated "additional harmonization factors have to be applied to data according to instructions from ESA". Could you please explain how to perform such harmonization? or is something that you are planning to include in the next version?

Thank you for your support. Andrea

batic commented 1 year ago

The harmonisation of Sentinel-2 data (from digital numbers to reflectances) performed within Sentinel-Hub services is described here. The links in the description should hopefully help you.

We currently have no plans to include this, as we rely on retrieving data from Sentinel-Hub service (where this is taken care of). That being said, contributions to the package are always appreciated.

Regards, Matej

ds2268 commented 1 year ago

If I understand correctly, the recent change has only influenced recent L1C products (beyond a specific date). If you produced L2A products (with new Sen2Cor -2.10) locally from an older generation of the L1C products (e.g., 2018), you don't have to implement this. Can you confirm? Thanks!

ds2268 commented 1 year ago

I can confirm that L2A products that are generated offline using the latest Sen2Cor v2.10 do not have BOA_ADD_OFFSET_VALUES_LIST in metadata, thus if you take an older L1C product and create L2A with the latest Sen2Cor, applying the formula: L2A_BOAi = (L2A_DNi + BOA_ADD_OFFSETi) / QUANTIFICATION_VALUEi is not needed, just the usual / QUANTIFICATION_VALUEi (i.e., 10000).