Skip to content
Open
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
8 changes: 7 additions & 1 deletion python/packages/nisar/products/readers/Raw/Raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,14 @@ def getSubSwathBboxes(self, frequency, polarization=None, epoch=None, num_ignore

changes = get_dwp_change_indices(rd, wd, wl)

# Skip any blocks of bad data at the beginning (e.g., first 12 pulses
# of SSAR). Note that argmax returns the first occurence of the max
# value, in this case the first index where any subswath is not empty.
i0 = np.argmax(np.any(subswaths[..., 1] > subswaths[..., 0], axis=0))

# Append first and last pulses to generate pairs of constant DWP.
breaks = np.hstack(([0], changes, [grid.shape[0] - 1]))
# Sort this in case i0 is after first change.
breaks = np.sort(np.hstack(([i0], changes, [grid.shape[0] - 1])))
bbox_lists = []
for ibreak in range(len(breaks) - 1):
ipulse0, ipulse1 = breaks[ibreak], breaks[ibreak + 1]
Expand Down
Loading