From f74e2946a39498ecc9fabeb7c43b71a84279616e Mon Sep 17 00:00:00 2001 From: Liang Yu Date: Wed, 7 Dec 2022 13:32:52 -0800 Subject: [PATCH] rename complex_backscatter to SLC (#74) --- src/compass/s1_geocode_slc.py | 4 ++-- src/compass/utils/h5_helpers.py | 2 +- src/compass/utils/validate_cslc.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compass/s1_geocode_slc.py b/src/compass/s1_geocode_slc.py index 270247a1..6d3f0188 100755 --- a/src/compass/s1_geocode_slc.py +++ b/src/compass/s1_geocode_slc.py @@ -126,12 +126,12 @@ def run(cfg: GeoRunConfig): ctype = h5py.h5t.py_create(np.complex64) ctype.commit(geo_burst_h5['/'].id, np.string_('complex64')) - backscatter_group = geo_burst_h5.require_group('complex_backscatter') + backscatter_group = geo_burst_h5.require_group('SLC') init_geocoded_dataset(backscatter_group, pol, geo_grid, 'complex64', f'{pol} geocoded SLC image') # access the HDF5 dataset for a given frequency and polarization - dataset_path = f'/complex_backscatter/{pol}' + dataset_path = f'/SLC/{pol}' gslc_dataset = geo_burst_h5[dataset_path] # Construct the output raster directly from HDF5 dataset diff --git a/src/compass/utils/h5_helpers.py b/src/compass/utils/h5_helpers.py index 4896bf54..279c6cc6 100644 --- a/src/compass/utils/h5_helpers.py +++ b/src/compass/utils/h5_helpers.py @@ -405,7 +405,7 @@ def poly1d_to_h5(group, poly1d_name, poly1d): str(burst.burst_id), {'description': 'Unique burst identification string (ESA convention)'}) - dataset_path_template = f'HDF5:%FILE_PATH%://complex_backscatter/{burst.polarization}' + dataset_path_template = f'HDF5:%FILE_PATH%://SLC/{burst.polarization}' geo_boundary = get_boundary_polygon(processing_group.file.filename, np.nan, dataset_path_template) center = geo_boundary.centroid diff --git a/src/compass/utils/validate_cslc.py b/src/compass/utils/validate_cslc.py index ae803feb..d518aa99 100644 --- a/src/compass/utils/validate_cslc.py +++ b/src/compass/utils/validate_cslc.py @@ -45,7 +45,7 @@ def _gdal_nfo_retrieve(path_h5): slc: np.array Array holding geocoded complex backscatter """ - raster_key = 'complex_backscatter' + raster_key = 'SLC' # Extract polarization with h5py with h5py.File(path_h5) as h: