Repository navigation
fix(shift_variant): restrict partition-of-unity cosine windows to main lobe - #605
Open
chenyangsu wants to merge 1 commit into
Open
chenyangsu wants to merge 1 commit into
chenyangsu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
None
Summary
In
make_partition_of_unity_weights(),cos(pi * (y_um - yc) / width_y_um).clamp(min=0) ** 2repeats positive lobes every2 * width, so on an(8, 8)grid over(128, 128)pixels 75% of the center pixel's weight comes from distant tiles outside their window width. For odd shapes,Ny // 2also places the last pixel on the boundary where every tile weight vanishes.Could we gate each 1D cosine window to
abs(d) < 0.5and center coordinates withNy / 2andNx / 2? Happy to keep the coordinate centering separate if you prefer.Testing
pytest tests/models/test_shift_variant_fluorescent_3d.py tests/test_zernike_seidel.py tests/test_benchmark_simulate.py-> 27 passed (8 new cases fail on main),ruff checkandruff format --checkclean.Checklist