Skip to content

Commit d6ea7eb

Browse files
Virginia BrancatoGitHub Enterprise
authored andcommitted
Change Input files in InSAR schema (#1010)
* Expose offsets processing options * Generate standalone ROFF product * Include offsets product computation in InSAR workflow * Revert "Expose offsets processing options" This reverts commit e3ce076edde8eaf0cba2c3a19b291380224c7ea4. * Revert "Generate standalone ROFF product" This reverts commit 96b46d8e00362a9ed00ed5541adbc704a49a144d. * Revert "Include offsets product computation in InSAR workflow" This reverts commit ba7986d5f5f2c0805fe66b00cd720d2543c06fd9. * Change input file group to include ref/sec RSLC paths * Change input_file_grup/path RSLC ref/secondary * Change input_file_path to one list element * Change runconfig test cases * Modify test cases runconfig * Fix bug due to merge with develop * input_file_group as string (instead of list) for GSLC and GCOV * Modify input_file_group to string for GSLC and GCOV workflow * Modify GSLC/GCOV test cases to have string (not list) as input_file_group * Remove spacing within function
1 parent 7ad3ee8 commit d6ea7eb

File tree

45 files changed

+104
-248
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+104
-248
lines changed

python/packages/nisar/workflows/bandpass_insar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def run(cfg: dict):
2020
run bandpass
2121
'''
2222
# pull parameters from cfg
23-
ref_hdf5 = cfg['input_file_group']['input_file_path']
24-
sec_hdf5 = cfg['input_file_group']['secondary_file_path']
23+
ref_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
24+
sec_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
2525
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
2626
blocksize = cfg['processing']['bandpass']['lines_per_block']
2727
window_function = cfg['processing']['bandpass']['window_function']
@@ -67,7 +67,7 @@ def run(cfg: dict):
6767
base_slc = sec_slc
6868

6969
# update reference SLC path
70-
cfg['input_file_group']['input_file_path'] = ref_slc_output
70+
cfg['input_file_group']['reference_rslc_file_path'] = ref_slc_output
7171
target_output = ref_slc_output
7272

7373
elif target == 'sec':
@@ -76,7 +76,7 @@ def run(cfg: dict):
7676
base_slc = ref_slc
7777

7878
# update secondary SLC path
79-
cfg['input_file_group']['secondary_file_path'] = sec_slc_output
79+
cfg['input_file_group']['secondary_rslc_file_path'] = sec_slc_output
8080
target_output = sec_slc_output
8181

8282
if os.path.exists(target_output):

python/packages/nisar/workflows/crossmul.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def run(cfg: dict, output_hdf5: str = None, resample_type='coarse'):
2323
run crossmul
2424
'''
2525
# pull parameters from cfg
26-
ref_hdf5 = cfg['input_file_group']['input_file_path']
27-
sec_hdf5 = cfg['input_file_group']['secondary_file_path']
26+
ref_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
27+
sec_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
2828
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
2929
flatten = cfg['processing']['crossmul']['flatten']
3030

python/packages/nisar/workflows/dense_offsets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def run(cfg: dict):
2222
'''
2323

2424
# Pull parameters from cfg
25-
ref_hdf5 = cfg['input_file_group']['input_file_path']
26-
sec_hdf5 = cfg['input_file_group']['secondary_file_path']
25+
ref_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
26+
sec_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
2727
scratch_path = pathlib.Path(cfg['product_path_group']['scratch_path'])
2828
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
2929
offset_params = cfg['processing']['dense_offsets']

python/packages/nisar/workflows/geo2rdr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def run(cfg):
2121
'''
2222

2323
# Pull parameters from cfg dict
24-
sec_hdf5 = cfg['input_file_group']['secondary_file_path']
24+
sec_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
2525
dem_file = cfg['dynamic_ancillary_file_group']['dem_file']
2626
scratch_path = pathlib.Path(cfg['product_path_group']['scratch_path'])
2727
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']

python/packages/nisar/workflows/geocode_insar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def add_radar_grid_cube(cfg, freq, radar_grid, orbit, dst_h5):
188188
threshold_geo2rdr = cfg["processing"]["geo2rdr"]["threshold"]
189189
iteration_geo2rdr = cfg["processing"]["geo2rdr"]["maxiter"]
190190

191-
ref_hdf5 = cfg["input_file_group"]["input_file_path"]
191+
ref_hdf5 = cfg["input_file_group"]["reference_rslc_file_path"]
192192
slc = SLC(hdf5file=ref_hdf5)
193193

194194
# get doppler centroid
@@ -323,7 +323,7 @@ def cpu_run(cfg, runw_hdf5, output_hdf5):
323323
Path to output GUNW HDF5
324324
"""
325325
# pull parameters from cfg
326-
ref_hdf5 = cfg["input_file_group"]["input_file_path"]
326+
ref_hdf5 = cfg["input_file_group"]["reference_rslc_file_path"]
327327
freq_pols = cfg["processing"]["input_subset"]["list_of_frequencies"]
328328
geogrids = cfg["processing"]["geocode"]["geogrids"]
329329
dem_file = cfg["dynamic_ancillary_file_group"]["dem_file"]
@@ -453,7 +453,7 @@ def gpu_run(cfg, runw_hdf5, output_hdf5):
453453

454454
# Extract parameters from cfg dictionary
455455
dem_block_margin = cfg["processing"]["dem_margin"]
456-
ref_hdf5 = cfg["input_file_group"]["input_file_path"]
456+
ref_hdf5 = cfg["input_file_group"]["reference_rslc_file_path"]
457457
dem_file = cfg["dynamic_ancillary_file_group"]["dem_file"]
458458
freq_pols = cfg["processing"]["input_subset"]["list_of_frequencies"]
459459
geogrids = cfg["processing"]["geocode"]["geogrids"]

python/packages/nisar/workflows/geogrid.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def _grid_size(stop, start, sz):
2323
return int(np.ceil(np.abs((stop-start)/sz)))
2424

2525

26-
def create(cfg, frequency_group = None, frequency = None,
27-
geocode_dict = None,
28-
default_spacing_x = None, default_spacing_y = None):
26+
def create(cfg, workflow_name=None, frequency_group=None,
27+
frequency=None, geocode_dict=None,
28+
default_spacing_x=None, default_spacing_y=None):
2929
'''
3030
- frequency_group is the name of the sub-group that
3131
holds the fields x_posting and y_posting, which is usually
@@ -53,7 +53,10 @@ def create(cfg, frequency_group = None, frequency = None,
5353
if geocode_dict is None:
5454
geocode_dict = cfg['processing']['geocode']
5555

56-
input_hdf5 = cfg['input_file_group']['input_file_path']
56+
if workflow_name == 'insar':
57+
input_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
58+
else:
59+
input_hdf5 = cfg['input_file_group']['input_file_path']
5760
dem_file = cfg['dynamic_ancillary_file_group']['dem_file']
5861
slc = SLC(hdf5file=input_hdf5)
5962

python/packages/nisar/workflows/h5_prep.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ def cp_geocode_meta(cfg, output_hdf5, dst):
101101

102102
# unpack info
103103
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
104-
input_hdf5 = cfg['input_file_group']['input_file_path']
105104
if is_insar:
106-
secondary_hdf5 = cfg['input_file_group']['secondary_file_path']
105+
input_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
106+
secondary_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
107+
else:
108+
input_hdf5 = cfg['input_file_group']['input_file_path']
107109

108110
if dst == "GCOV":
109111
dem_interp_method = cfg['processing']['dem_interpolation_method']
@@ -336,7 +338,7 @@ def copy_insar_meta(cfg, dst, src_h5, dst_h5, src_meta_path):
336338
common_path = 'science/LSAR'
337339
dst_meta_path = f'{common_path}/{dst}/metadata'
338340

339-
secondary_hdf5 = cfg['input_file_group']['secondary_file_path']
341+
secondary_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
340342
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
341343

342344
# Open secondary SLC
@@ -456,7 +458,7 @@ def prep_ds_insar(pcfg, dst, dst_h5):
456458
dset.attrs["description"] = descr
457459

458460
# Open reference SLC
459-
ref_path = pcfg['input_file_group']['input_file_path']
461+
ref_path = pcfg['input_file_group']['reference_rslc_file_path']
460462
ref_slc = SLC(hdf5file=ref_path)
461463
with h5py.File(ref_path, 'r', libver='latest', swmr=True) as src_h5:
462464
for freq, pol_list in freq_pols.items():

python/packages/nisar/workflows/insar_runconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ def yaml_check(self):
164164
iono_method = iono_cfg['spectral_diversity']
165165

166166
# Extract main range bandwidth from reference SLC
167-
ref_slc_path = self.cfg['input_file_group']['input_file_path']
168-
sec_slc_path = self.cfg['input_file_group']['secondary_file_path']
167+
ref_slc_path = self.cfg['input_file_group']['reference_rslc_file_path']
168+
sec_slc_path = self.cfg['input_file_group']['secondary_rslc_file_path']
169169

170170
ref_slc = SLC(hdf5file=ref_slc_path)
171171
sec_slc = SLC(hdf5file=sec_slc_path)

python/packages/nisar/workflows/rdr2geo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run(cfg):
3333
run rdr2geo
3434
'''
3535
# pull parameters from cfg
36-
input_hdf5 = cfg['input_file_group']['input_file_path']
36+
input_hdf5 = cfg['input_file_group']['reference_rslc_file_path']
3737
dem_file = cfg['dynamic_ancillary_file_group']['dem_file']
3838
scratch_path = pathlib.Path(cfg['product_path_group']['scratch_path'])
3939
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']

python/packages/nisar/workflows/resample_slc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def run(cfg, resample_type):
2121
'''
2222
run resample_slc
2323
'''
24-
input_hdf5 = cfg['input_file_group']['secondary_file_path']
24+
input_hdf5 = cfg['input_file_group']['secondary_rslc_file_path']
2525
scratch_path = pathlib.Path(cfg['product_path_group']['scratch_path'])
2626
freq_pols = cfg['processing']['input_subset']['list_of_frequencies']
2727

0 commit comments

Comments
 (0)