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
5 changes: 5 additions & 0 deletions python/packages/nisar/antenna/beamformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,11 @@ def compute_transmit_pattern_weights(tx_trm_info, norm=False):
if np.isclose(abs(tx_weights[bcal_lines_idx]).min(), 0):
raise RuntimeError('Zero-value BCAL data is encountered!')

# handle case where first line isn't BCAL
bcal_rel = (tx_weights[bcal_lines_idx[0]] /
tx_weights[bcal_lines_idx[0], 0])
tx_weights[:bcal_lines_idx[0]] /= bcal_rel

for line_start, line_stop in zip(bcal_lines_idx[:-1],
bcal_lines_idx[1:]):
# normalize BCAL wrt to the first TX channel to get relative
Expand Down
Loading