Skip to content

Commit 962e84c

Browse files
Virginia Brancatovbrancatyzheng6
authored andcommitted
Optionally run dense offsets in InSAR workflow (#766)
* Add boolean parameters in schemas/default for optional execution of dense_offsets * Check for user preference for dense_offsets execution * Check for user preference for standalone dense offsets execution * Set enable flag fr dense offsets True in insar defaults schema * Remove check on dense offsets enable option in insar_runconfig * Add comment on defaul value of dense offset enable option * Remove check on dense offsets enable option in dense offset runconfig * Consistently change enable flag to enabled in dense_offsets * Turn off dense offsets in InSAR workflow tests and vary gpu_enabled flag to test both CPU and GPU InSAR workflow. Co-authored-by: vbrancat <[email protected]> Co-authored-by: Yang Zheng <[email protected]>
1 parent accbe50 commit 962e84c

File tree

8 files changed

+16
-33
lines changed

8 files changed

+16
-33
lines changed

python/packages/pybind_nisar/workflows/dense_offsets_runconfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ def yaml_check(self):
4848
frequencies, freq_pols)
4949
else:
5050
helpers.check_hdf5_freq_pols(coregistered_slc_path, freq_pols)
51+

python/packages/pybind_nisar/workflows/insar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def run(cfg: dict, out_paths: dict, run_steps: dict):
2828
if run_steps['resample']:
2929
resample_slc.run(cfg)
3030

31-
if run_steps['dense_offsets']:
31+
if (run_steps['dense_offsets']) and \
32+
(cfg['processing']['dense_offsets']['enabled']):
3233
dense_offsets.run(cfg)
3334

3435
if run_steps['crossmul']:

share/nisar/defaults/insar.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ runconfig:
117117
lines_per_tile: 1
118118

119119
dense_offsets:
120+
# Flag to enable/disable dense offsets estimation
121+
enabled: True
120122
# Path to HDF5 file or directory with geometry-coregistered SLCs.
121123
# Not required as we allow the use of intermediate outputs from
122124
# the previous InSAR module, which is not user-specified

share/nisar/schemas/insar.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ icu_options:
162162
phase_variance_threshold: num(min=0, required=False)
163163

164164
dense_offsets_options:
165+
# Flag to enable/disable dense offsets estimation. Default: True
166+
enabled: bool(required=False)
165167
# Path to HDF5 file or directory with geometry-coregistered SLCs.
166168
# Not required as we allow the use of intermediate outputs from
167169
# the previous InSAR module, which is not user-specified

tests/data/insar_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ runconfig:
114114
lines_per_tile: 1
115115

116116
dense_offsets:
117+
enabled: True
117118
window_range: 64 # {optional} Cross-correlation window size in range direction
118119
window_azimuth: 64 # {optional} Cross-correlation window size in azimuth direction
119120
half_search_range: 20 # {optional} Cross-correlation search window size in range direction

tools/imagesets/runconfigs/insar_UAVSAR_NISARP_32039_19049-005_19052-004_129.yaml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,8 @@ runconfig:
102102
lines_per_tile: 100
103103

104104
dense_offsets:
105-
window_range: 64 # {optional} Cross-correlation window size in range direction
106-
window_azimuth: 64 # {optional} Cross-correlation window size in azimuth direction
107-
search_range: 20 # {optional} Cross-correlation search window size in range direction
108-
search_azimuth: 20 # {optional} Cross-correlation search window size in azimuth direction
109-
skip_range: 8 # {optional} Cross-correlation skip window size in range direction
110-
skip_azimuth: 8 # {optional} Cross-correlation skip window in azimuth direction
111-
zoom: 8 # {optional} Zoom in window for cross-correlation surface
112-
correlation_surface_ovs: 32 # {optional} Oversampling factor for the cross-correlation surface
113-
method: amplitude # {optional} Cross-correlation method (complex or amplitude)
114-
algorithm: frequency # {optional} Algorithm for cross-correlation computation (spatial
105+
# OPTIONAL - Flag to enable/disable dense offsets estimation. Default True
106+
enabled: False
115107

116108
crossmul:
117109
flatten: True

tools/imagesets/runconfigs/insar_UAVSAR_SanAnd_05518_12018-000_12128-008_143.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,8 @@ runconfig:
102102
lines_per_tile: 100
103103

104104
dense_offsets:
105-
window_range: 64 # {optional} Cross-correlation window size in range direction
106-
window_azimuth: 64 # {optional} Cross-correlation window size in azimuth direction
107-
search_range: 20 # {optional} Cross-correlation search window size in range direction
108-
search_azimuth: 20 # {optional} Cross-correlation search window size in azimuth direction
109-
skip_range: 8 # {optional} Cross-correlation skip window size in range direction
110-
skip_azimuth: 8 # {optional} Cross-correlation skip window in azimuth direction
111-
zoom: 8 # {optional} Zoom in window for cross-correlation surface
112-
correlation_surface_ovs: 32 # {optional} Oversampling factor for the cross-correlation surface
113-
method: amplitude # {optional} Cross-correlation method (complex or amplitude)
114-
algorithm: frequency # {optional} Algorithm for cross-correlation computation (spatial
105+
# OPTIONAL - Flag to enable/disable dense offsets estimation. Default True
106+
enabled: False
115107

116108
crossmul:
117109
flatten: True
@@ -128,7 +120,7 @@ runconfig:
128120
internet_access: False
129121

130122
# OPTIONAL - To explicitly use GPU capability if available. Default False
131-
gpu_enabled: False
123+
gpu_enabled: True
132124

133125
# OPTIONAL - Location to save logs, use runconfig*_yaml.log if not specified
134126
logging:

tools/imagesets/runconfigs/insar_UAVSAR_Snjoaq_14511_18034-014_18044-015_143.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,8 @@ runconfig:
102102
lines_per_tile: 100
103103

104104
dense_offsets:
105-
window_range: 64 # {optional} Cross-correlation window size in range direction
106-
window_azimuth: 64 # {optional} Cross-correlation window size in azimuth direction
107-
search_range: 20 # {optional} Cross-correlation search window size in range direction
108-
search_azimuth: 20 # {optional} Cross-correlation search window size in azimuth direction
109-
skip_range: 8 # {optional} Cross-correlation skip window size in range direction
110-
skip_azimuth: 8 # {optional} Cross-correlation skip window in azimuth direction
111-
zoom: 8 # {optional} Zoom in window for cross-correlation surface
112-
correlation_surface_ovs: 32 # {optional} Oversampling factor for the cross-correlation surface
113-
method: amplitude # {optional} Cross-correlation method (complex or amplitude)
114-
algorithm: frequency # {optional} Algorithm for cross-correlation computation (spatial
105+
# OPTIONAL - Flag to enable/disable dense offsets estimation. Default True
106+
enabled: False
115107

116108
crossmul:
117109
flatten: True
@@ -128,7 +120,7 @@ runconfig:
128120
internet_access: False
129121

130122
# OPTIONAL - To explicitly use GPU capability if available. Default False
131-
gpu_enabled: False
123+
gpu_enabled: True
132124

133125
# OPTIONAL - Location to save logs, use runconfig*_yaml.log if not specified
134126
logging:

0 commit comments

Comments
 (0)