Skip to content

Add regression tests for goldstein edge handling#730

Open
scottstanie wants to merge 1 commit into
isce-framework:mainfrom
scottstanie:goldstein-edge-fix
Open

Add regression tests for goldstein edge handling#730
scottstanie wants to merge 1 commit into
isce-framework:mainfrom
scottstanie:goldstein-edge-fix

Conversation

@scottstanie

@scottstanie scottstanie commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds regression tests for the Goldstein filter's edge handling. The current goldstein.py implementation (reflect-padding + weight normalization + treating only zero-magnitude complex values as empty) is not currently covered by tests.

Tests added (tests/test_filtering.py::TestGoldstein)

  • test_goldstein_non_multiple_dimensions - arrays whose dimensions are not a multiple of the patch size are fully covered to the edges (no empty bottom/right)
  • test_goldstein_edge_normalization - border pixels are weight-normalized (no darkening where fewer windows overlap)
  • test_goldstein_preserves_zero_phase - valid pixels with phase == 0 are not treated as empty
  • test_goldstein_small_array - arrays smaller than the window are handled

No source changes - tests only.

🤖 Generated with Claude Code

Cover the edge cases the reflect-pad + weight-normalization goldstein
implementation is meant to handle, none of which were previously tested:
- non-multiple-of-psize array dimensions (full edge coverage)
- edge weight normalization (no darkening at borders)
- valid phase == 0 preserved (not treated as empty)
- arrays smaller than the window

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

1 participant