fix: Align transformed mesh areas with their cell edges - #608
Merged
Merged
Conversation
Collaborator
Author
|
Workspace regression PR: PyAutoLabs/autolens_workspace_test#339. Merge/release the library before merging the dependent workspace regression. |
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.
Summary
Compute rectangular transformed cell areas from the geometry's published transformed edges. Adapt-image weights now use the same slim-grid coordinates for both diagnostics, avoiding the oversampled-grid IndexError and matching the mapper's node-midpoint convention.
Part of #605. The baseline fails on a real 25-pixel adapt-image mapper with sub-size 2 (
IndexError: index 83 ... size 25). The companion workspace regression verifies NumPy and eager/compiled JAX geometry.API Changes
areas_transformedandareas_for_magnificationnow match the outer product of transformed edge spacings. Clamped guard cells can have zero area; live-cell positivity and total area are tested.edges_transformedretains its existing raw NumPy/JAX array contract. See full details below.Test Plan
Full API Changes (for automation & release notes)
Changed Behaviour
MeshGeometryRectangular.areas_transformed: derive per-cell areas from node-midpoint edges, avoiding mismatch between oversampled coordinates and slim adapt weights.MeshGeometryRectangular.areas_for_magnification: inherits those corrected areas.Unchanged
adaptive_rectangular_areas_fromhelper is untouched.Generated by the PyAutoLabs agent workflow.