Skip to content

Commit 1adb321

Browse files
committed
add radargrid decimation option to compute the layover shadow mask
1 parent 29b2c09 commit 1adb321

3 files changed

Lines changed: 17 additions & 5 deletions

File tree

python/packages/nisar/workflows/static.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ def run_static_layers_workflow(config_file: os.PathLike | str) -> None:
117117
radar_grid_spacing_params = radar_grid_params["spacing"]
118118
az_spacing = radar_grid_spacing_params["az_spacing"]
119119
rg_spacing = radar_grid_spacing_params["rg_spacing"]
120+
az_decimation_to_compute_layover_shadow_mask = \
121+
radar_grid_spacing_params[
122+
'az_decimation_to_compute_layover_shadow_mask']
123+
rg_decimation_to_compute_layover_shadow_mask = \
124+
radar_grid_spacing_params[
125+
'rg_decimation_to_compute_layover_shadow_mask']
120126

121127
pts_per_side = radar_grid_spacing_params["pts_per_side"]
122128

@@ -293,11 +299,15 @@ def run_static_layers_workflow(config_file: os.PathLike | str) -> None:
293299
# mask).
294300
# Results are stored as GeoTIFF files in the scratch directory.
295301
logger.info("Compute geocoded layover/shadow mask layer")
302+
radar_grid_multilooked = radar_grid.multilook(
303+
az_decimation_to_compute_layover_shadow_mask,
304+
rg_decimation_to_compute_layover_shadow_mask
305+
)
296306
geocode_params = processing_params["geocode"]
297307
with log_elapsed_time(logger.info,
298308
"Computing geocoded layover/shadow mask"):
299309
layover_shadow_mask = compute_geocoded_layover_shadow_mask(
300-
radar_grid=radar_grid,
310+
radar_grid=radar_grid_multilooked,
301311
orbit=orbit,
302312
img_grid_doppler=img_grid_doppler,
303313
geo_grid=geo_grid,

share/nisar/defaults/static.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,32 +249,32 @@ runconfig:
249249
# Must be >= 2.
250250
# Defaults to 5.
251251
pts_per_side: 5
252+
# [OPTIONAL] Azimuth decimation factor to compute the layover shadow mask.
253+
az_decimation_to_compute_layover_shadow_mask: 1
254+
# [OPTIONAL] Range decimation factor to compute the layover shadow mask.
255+
rg_decimation_to_compute_layover_shadow_mask: 1
252256
bounding_box:
253257
# [OPTIONAL] Azimuth start UTC date and time of the start of the radar
254258
# observation, as a string in ISO 8601 format with up to nanosecond precision.
255259
# If not provided, it will be inferred from the specified geographic grid.
256260
# If provided, must be a valid azimuth time within the observation time
257261
# interval.
258262
start_time:
259-
260263
# [OPTIONAL] Azimuth ending UTC date and time of the end of the radar
261264
# observation, as a string in ISO 8601. format with up to nanosecond precision.
262265
# Must be >= `start_time`.
263266
# If not provided, it will be inferred from the specified geographic grid.
264267
# If provided, must be a valid azimuth time within the observation time
265268
# interval.
266269
end_time:
267-
268270
# [OPTIONAL] Starting range, in meters, of the first column of the radar grid.
269271
# If not provided, it will be inferred from the specified geographic grid.
270272
# If provided, must be a positive value.
271273
start_range:
272-
273274
# [OPTIONAL] Ending range, in meters, of the last column of the radar grid.
274275
# If not provided, it will be inferred from the specified geographic grid.
275276
# If provided, must be a positive value.
276277
end_range:
277-
278278
# [OPTIONAL] Lower bound on the height of targets within the region of interest,
279279
# in meters above the reference ellipsoid of the output product.
280280
# Used to estimate the bounds of a radar grid that spans the region of interest.

share/nisar/schemas/static.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ radar_grid_spacing_options:
9999
az_spacing: num(min=0.0, required=False)
100100
rg_spacing: num(min=0.0, required=False)
101101
pts_per_side: int(min=2, required=False)
102+
az_decimation_to_compute_layover_shadow_mask: int(min=1, required=False)
103+
rg_decimation_to_compute_layover_shadow_mask: int(min=1, required=False)
102104

103105
radar_grid_bounding_box_options:
104106
start_time: any(

0 commit comments

Comments
 (0)