Skip to content

Commit

Permalink
Fixed assignement of polarization for Compressed CSLC outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Collins committed May 30, 2024
1 parent b0f2b24 commit 23cd2da
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/opera/pge/disp_s1/disp_s1_pge.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,22 @@ def _compressed_cslc_filename(self, inter_filename):
# Get the production time
prod_time = f"{get_time_for_filename(self.production_datetime)}Z"

# Polarization should be fixed for all CSLC-derived products
polarization = "VV"
# Polarization: polarization of the input bursts
# derived from product metadata of the input CSLC files
cslc_file_list = self.runconfig.sas_config['input_file_group']['cslc_file_list']

# Search for a CSLC file containing the metadata we expect
for cslc_file in cslc_file_list:
try:
cslc_metadata = get_cslc_s1_product_metadata(abspath(cslc_file))
polarization = cslc_metadata["processing_information"]["input_burst_metadata"]["polarization"]
break
except Exception:
continue
else:
raise RuntimeError(
'No input CSLC file contains the expected polarization information.'
)

# Product version hardcoded to 1.0 for now since CCSLCs are not
# intended for widespread distribution
Expand Down

0 comments on commit 23cd2da

Please sign in to comment.