Skip to content

Commit 544f0a4

Browse files
Fix GCOV polarimetric symmetrization metadata (isce-framework#167)
* disable polarimetric symmetrization by default * revert changes to `symmetrize_cross_pol_channels` * Update GCOV and GSLC specification XMLs * Revert changes to the GCOV and GSLC specification XMLs * fix polarimetric symmetrization metadata * Update python/packages/nisar/products/writers/GcovWriter.py Co-authored-by: Tyler G. Hudson <tyler.g.hudson@gmail.com> --------- Co-authored-by: Tyler G. Hudson <tyler.g.hudson@gmail.com>
1 parent d7883f1 commit 544f0a4

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

python/packages/nisar/products/writers/GcovWriter.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -575,9 +575,21 @@ def populate_processing_information(self):
575575
f'{parameters_group}/shadowMaskingApplied',
576576
False)
577577

578-
self.copy_from_runconfig(
578+
# Add geocoding algorithm reference
579+
flag_symmetrized_runconfig = self.cfg['processing']['input_subset'][
580+
'symmetrize_cross_pol_channels']
581+
582+
flag_has_hv_and_vh = any(
583+
"HV" in pol_list and "VH" in pol_list
584+
for pol_list in self.input_freq_pols_dict.values()
585+
)
586+
587+
flag_symmetrized = (flag_symmetrized_runconfig and
588+
flag_has_hv_and_vh)
589+
590+
self.set_value(
579591
f'{parameters_group}/polarimetricSymmetrizationApplied',
580-
'processing/input_subset/symmetrize_cross_pol_channels')
592+
flag_symmetrized)
581593

582594
# Populate algorithms parameters
583595

@@ -637,22 +649,14 @@ def populate_processing_information(self):
637649
'radiometricTerrainCorrection',
638650
rtc_algorithm_name)
639651

640-
input_pol_list = list(self.input_freq_pols_dict.keys())
641-
flag_hv_and_vh_in_pol_list = ['HV' in input_pol_list and
642-
'VH' in input_pol_list]
643-
644-
flag_symmetrize = (flag_hv_and_vh_in_pol_list and
645-
self.cfg['processing']['input_subset'][
646-
'symmetrize_cross_pol_channels'])
647-
648652
flag_full_covariance = self.cfg['processing']['input_subset'][
649653
'fullcovariance']
650654

651-
if flag_symmetrize and not flag_full_covariance:
655+
if flag_symmetrized and not flag_full_covariance:
652656
symmetrization_algorithm = \
653657
('Cross-Polarimetric Channels HV and VH Backscatter Average'
654658
' (Incoherent Average)')
655-
elif flag_symmetrize:
659+
elif flag_symmetrized:
656660
symmetrization_algorithm = \
657661
('Cross-Polarimetric Channels HV and VH SLCs Average'
658662
' (Coherent Average)')

0 commit comments

Comments
 (0)