Skip to content

Fix solid earth tides computation fail when frequencyA is missing#243

Merged
xhuang-jpl merged 29 commits intoisce-framework:developfrom
xhuang-jpl:fix_solid_earth_freq
Apr 14, 2026
Merged

Fix solid earth tides computation fail when frequencyA is missing#243
xhuang-jpl merged 29 commits intoisce-framework:developfrom
xhuang-jpl:fix_solid_earth_freq

Conversation

@xhuang-jpl
Copy link
Copy Markdown
Contributor

This PR fixes a bug where solid earth tides computation fails when frequencyA is missing. The logic now falls back to frequencyB if available, and raises an error if neither exists.

Xiaodong Huang added 27 commits September 19, 2023 20:40
Copy link
Copy Markdown
Contributor

@Tyler-g-hudson Tyler-g-hudson left a comment

Choose a reason for hiding this comment

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

LGTM, just one question for clarification

wavelength = isce3.core.speed_of_light / \
h5_obj[f'{gunw_obj.GridsPath}/frequencyA/centerFrequency'][()]
# Wavelength in meters; fall back to frequencyB if frequencyA is not found
for freq in ('A', 'B'):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we capture first available of A or B instead of calculating a different datacube for each? They would have different values, wouldn't they?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good question @Tyler-g-hudson, for NISAR InSAR processing, we are always processing frequencyA even if the product has both freqA and freqB. This fix is for users who need to process the freqB stand alone.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure, I've understood that part - what I mean to ask is why we have selected to do that when the values might be different between two different data cubes, is it because we only expect people to use it for the primary frequency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We always expect people use the frequencyA as the primary at least for the NISAR.

@hfattahi hfattahi added this to the R05.01.4 milestone Mar 31, 2026
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!

@xhuang-jpl xhuang-jpl merged commit 5b48971 into isce-framework:develop Apr 14, 2026
7 of 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