feat: add ellipse visualization integration test#40
Merged
Conversation
Exercises every public path through PlotterEllipse.imaging and PlotterEllipse.fit_ellipse across plain, multipole, scaled-multipole, and masked-dataset scenarios. Step 1 of the ellipse_fitting_jax feature decomposition — locks the numpy reference before later prompts rewrite the 300-iter mask-rejection loop and add JAX paths. Issue #39. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Add an integration test that exercises every public path through the ellipse visualization plotters (
PlotterEllipse.imaging,PlotterEllipse.fit_ellipse) end to end. Step 1 of theellipse_fitting_jaxfeature decomposition (PyAutoPrompt/z_features/ellipse_fitting_jax.md): locks in the numpy reference behaviour so later prompts that rewrite the 300-iteration mask-rejection loop inFitEllipse.points_from_major_axis_fromand add JAX paths can be diff-checked against a stable baseline.Four scenarios — plain
Ellipse,Ellipse + EllipseMultipole(m=4),Ellipse + EllipseMultipoleScaled(m=4), andEllipseover a tight circular mask whose radius is just below the major axis (forces the 300-iteration loop to iterate and trim points). Each scenario runsVisualizerEllipse.visualize_before_fitandVisualizerEllipse.visualize, then asserts the expected PNGs / FITS files exist. The masked scenario additionally asserts the ellipse-point count was reduced (31 → 30 on the jax_test imaging dataset), confirming the mask filter actually fired.Numpy-only — no JAX imports. Issue #39.
Scripts Changed
scripts/ellipse/__init__.py— new empty package marker.scripts/ellipse/config/visualize/plots.yaml— local visualize config; enablessubplot_dataset,data,ellipse_residuals,data_no_ellipse,subplot_fit_ellipsefor ellipse fits.scripts/ellipse/visualization.py— new integration test running four ellipse scenarios end to end throughVisualizerEllipse..gitignore— addscripts/ellipse/images/so generated PNGs aren't checked in.Test Plan
🤖 Generated with Claude Code