opera-adt / DSWX-SAR

Dynamic Surface Water Extent from Synthetic Aperture Radar
Apache License 2.0
9 stars 6 forks source link

Fix bugs/issues in calval point (0.4.1) #81

Closed oberonia78 closed 3 months ago

oberonia78 commented 3 months ago

This PR addresses bugs and minor updates:

  1. dswx_sar_util.py: Previously, when saving the CONF products, the dark land (represented by red color in the product) was overriding the inundated vegetation. We have modified it so that the inundated vegetation takes precedence over the dark land.

  2. metadata.py: In previous versions, the layover/shadow coverage sometimes resulted in NaN values. The spatial coverage, calculated as valid pixels / entire pixels * 100, was used as an input. However, this value could be 0 in cases where there were a small number of pixels in the MGRS tile due to the expression using four floating-point numbers. Instead of using the spatial coverage percentage, we now compute the number of valid pixels and calculate the layover/shadow coverage using layover_shadow / valid_pixels.

  3. refine_with_bimodality.py: Intermediate files generated in debug mode are now renamed to include the iteration. Also, the some of intermediate files was saved in the '.'. So this changed to the scratch directory.

  4. dswx_s1.yaml: The product version has been changed from a number to a string, as requested by SDS.

  5. save_mgrs_tile.py: The pol_mode field saved in the metadata has been modified.