Skip to content

Fix a subtle frequency ID bookkeeping issue#244

Merged
bhawkins merged 1 commit intoisce-framework:developfrom
bhawkins:fix_qd_antpat
Mar 24, 2026
Merged

Fix a subtle frequency ID bookkeeping issue#244
bhawkins merged 1 commit intoisce-framework:developfrom
bhawkins:fix_qd_antpat

Conversation

@bhawkins
Copy link
Copy Markdown
Contributor

In #231 we introduced a freq_band argument to the AntennaPattern constructor. The corresponding modification to focus.py script accidentally used the output frequency label instead of the one for the input file. These can be different for quasi-dual modes or mixed mode cases involving 77 MHz, which can result in an error message like

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/conda/lib/python3.12/site-packages/nisar/workflows/focus.py", line 2234, in <module>
    main(sys.argv[1:])
  File "/opt/conda/lib/python3.12/site-packages/nisar/workflows/focus.py", line 2230, in main
    focus(cfg, args.run_config_path)
  File "/opt/conda/lib/python3.12/site-packages/nisar/workflows/focus.py", line 1972, in focus
    antpat = AntennaPattern(raw, dem, antparser,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.12/site-packages/nisar/antenna/pattern.py", line 194, in __init__
    raise ValueError(
ValueError: freq_band A is out of range ['B']!

This one-line patch just makes sure to use the subband label from the input data.

Copy link
Copy Markdown
Contributor

@rad-eng-59 rad-eng-59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for the fix.

Copy link
Copy Markdown
Contributor

@hfattahi hfattahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @bhawkins.

@bhawkins bhawkins merged commit ff501db into isce-framework:develop Mar 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants