Skip to content

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

Open
xhuang-jpl wants to merge 29 commits intoisce-framework:developfrom
xhuang-jpl:fix_solid_earth_freq
Open

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

Conversation

@xhuang-jpl
Copy link
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
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
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
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.

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.

2 participants