Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt short wavelength filter to use gdal_fillnodata to mitigate edge effects #520

Merged
merged 5 commits into from
Jan 9, 2025

Conversation

scottstanie
Copy link
Collaborator

@scottstanie scottstanie commented Jan 2, 2025

Testing on a horizontal ramp:
image

the main branch leaves an edge effect:
image

This PR gives all zeros, as we would want.

Sanity check on small, real unwrapping interferogram looks okay as well.
image

@scottstanie scottstanie requested a review from seyeonjeon January 2, 2025 18:49
@scottstanie
Copy link
Collaborator Author

CI error is a temporary problem with dependency version mismatches conda-forge/jaxlib-feedstock#296
Likely to be fixed soon

@scottstanie scottstanie marked this pull request as ready for review January 9, 2025 17:06
@scottstanie scottstanie merged commit 5d7b8ff into isce-framework:main Jan 9, 2025
3 of 5 checks passed
@scottstanie scottstanie deleted the fix-filter-edges branch January 9, 2025 17:52

filtered_ifg = unw_ifg_interp - lowpass_filtered * in_bounds_pixels
filtered_ifg = filled_data - lowpass_filtered * in_bounds_pixels
Copy link
Contributor

@seyeonjeon seyeonjeon Jan 10, 2025

Choose a reason for hiding this comment

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

If 'None', it gives:
image

Should we do like this?
filtered_ifg = (filled_data - lowpass_filtered) * in_bounds_pixels

This one gives:
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah good catch! Weird that it ever worked for me...

@@ -42,6 +45,9 @@ def filter_long_wavelength(
Value to place in output pixels which were masked.
If `None`, masked pixels are filled with the ramp value fitted
Copy link
Contributor

Choose a reason for hiding this comment

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

We are not fitting ramp anymore.
Should we say like this?
If 'None', masked pixels are filled with interpolated values using 'gdal_fillnodata'.

scottstanie pushed a commit that referenced this pull request Jan 10, 2025
* Update filtering.py

* Update filtering.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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