Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions python/packages/nisar/workflows/focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1867,6 +1867,16 @@ def temp(suffix):
channel_in.band.center, fs, raw_grid.shape[1],
raw.isDithered(channel_in.freq_id))

usec2samp = lambda x: round(x * 1e-6 * isce3.core.speed_of_light / (2 * raw_grid.slant_ranges.spacing))
pad_left = usec2samp(cfg.processing.gap_pad_usec.left)
pad_right = usec2samp(cfg.processing.gap_pad_usec.right)
log.info(f"Padding gaps ({-pad_left}, {pad_right})")
valid = swaths[..., 1] > swaths[..., 0]
swaths[valid, 0] += pad_right
ends = swaths[valid, 1]
swaths[valid, 1] = np.where(ends >= pad_left, ends - pad_left,
np.zeros_like(ends))

for i in range(0, raw_grid.shape[0], na):
pulse = i + pulse_begin
nblock = min(na, rawdata.shape[0] - pulse, raw_mm.shape[0] - i)
Expand Down
5 changes: 5 additions & 0 deletions share/nisar/defaults/focus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ runconfig:
# cal pulses.
zero_fill_gaps: True

# Options to enlarge gaps
gap_pad_usec:
left: 0.0
right: 0.0

caltone:
# If "azimuth_mean", subtract the azimuth mean from the raw
# data, which is useful when the caltone is nearly constant in
Expand Down
4 changes: 4 additions & 0 deletions share/nisar/schemas/focus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@ runconfig:
# If true, fill transmit gaps with zeros to remove loop-back cal pulses.
zero_fill_gaps: bool(required=False)

#gap_pad_usec:
# left: 0.0
# right: 0.0

caltone: include('caltone_options', required=False)

# Processing stage switches, mostly for debug.
Expand Down
Loading