AWI Bremerhaven is developing an atmospheric correction for water surfaces based on Polymer. This has to be implemented into EnPT. So far, SICOR is running for all pixels of the input image, regardless of whether they contain land or water surfaces.
Steps to be done:
implement water AC provided as an external Python package
check ability of SICOR / water-AC to apply the algorithm only to pixels selected by a binary mask
use water masks provided by the ground segment to decide which AC has to be applied where
implement an algorithm to fuse the results of SICOR and the water AC to a single reflectance product
provide config parameters to run EnPT in 3 modes: water+land, land-only, water-only
include the new config parameters into the EnPT GUI
decide which radiometric unit will be contained in the L2A product for water surfaces (water leaving radiance/reflectance, surface reflectance) -> ground segment L2A product contains surface reflectance but this is not a commonly used rad. unit in the water community
add documentation on water AC (and possibly a radiometric output unit different to the L2A product of the ground segment)
After running test, the AC with Polymer integrated to EnPT seems to work well, currently for VNIR only.
The issue with the VNIR to SWIR array is on my list, but before that, I am preparing the git-page with the scripts,
currently: https://gitlab.awi.de/phytooptics/acenmap
Sounds good, if you have a version ready where your code is imported and called within atmospheric_correction.py, feel free to push it into a new branch of EnPT. The unittests in test_controller.py should be running properly.
@nbohn Does SICOR already support to apply the AC only to some selected areas of the input image? If yes, what is the correct way to pass a mask to SICOR?
Currently, SICOR does not support to apply the AC only to some selected areas of the input image. The best way to implement this would be to provide a water mask array as an attribute of the L1B object which is passed to the AC. SICOR could then easily handle this by applying the AC only to land pixel.
The EnMAP object passed to SICOR now contains a new 'mask_landwater' attribute (latest master branch):
Used pixel values:
0: background
1: land
2: water
The mask is currently generated by nearest neighbor resampling from the land/water mask provided in VNIR sensor geometry in the L1B input data. The resampling algorithm should be improved in future which would improve the accuracy of the mask at the coastline.
Great! I'm currently working on the implementation of David's AC approach (retrieving water vapor, aot, and surface reflectance simultaneously) as well as on the segmentation prior to the optimization. At the same time, I'll add the option to only process land pixels based on the mask.
@danschef I just resumed the implementation of the water mask into SICOR and noticed that, e.g., the mask for the Arcachon tile (subset rows 700-799) also contains the pixel value 3 at the edges of the image:
Do you know for which category this value stands for?
There should be only 3 different pixel values: 0=background, 1=land, 2=water. The pixel value 3 might be a resampling artifact. I will look into this soon and opened an issue here: #73 (closed).
@danschef ist that feature only in the master branch? what about feature/separate_ac_land_water? For now, AC-water runs, but the issue on how to mask processing to water areas persists.
I recently merged the master branch into feature/separate_ac_land_water because this is the branch where we want to implement the water AC. So feature/separate_ac_land_water is pretty up-to-date with the master branch. Which feature are you missing in feature/separate_ac_land_water?
I had a bug in acwater solved.
Now, I have tried to push a small amendment in EnPT, but it did not work:
via ssh:
remote: ======remote: This deploy key does not have write access to this project.remote: ======
or via http:
Locking support detected on remote "origin_http". Consider enabling it with: $ git config lfs.https://gitext.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT.git/info/lfs.locksverify trueUnable to find source for object 414187f15426150478da2932cebf45570f5926a4f9f06a1bfce2340687d80154 (try running git lfs fetch --all): open /home/bsilva/PycharmProjects/EnPT/tests/data/EnMAP_Level_1B/ENMAP01-____L1B-DT000000987_20130205T105307Z_001_V000003_20181214T160003Z__rows0-99.zip: no such file or directoryerror: Fehler beim Versenden einiger Referenzen nach 'https://gitext.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT.git'
and via http after trying git lfs fetch --all:
Locking support detected on remote "origin_http". Consider enabling it with: $ git config lfs.https://gitext.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT.git/info/lfs.locksverify truebatch response: Your push has been rejected, because this repository has exceeded its size limit of 1 GB by 460 MB. Please contact your GitLab administrator for more information.error: Fehler beim Versenden einiger Referenzen nach 'https://gitext.gfz-potsdam.de/EnMAP/GFZ_Tools_EnMAP_BOX/EnPT.git'
I am sorry that I could not yet provide your access to the gitlab at awi, but the request is active.
Although there are still some improvements/issues in AC water to do, it is already possible to address the questions above. I will start by checking how to set specific configurations for AC on water.
Is that possible using the GUI? What setup parameters are there?
How could specific parameters be included?