Skip to content

feat: add ellipse visualization integration test#40

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ellipse-visualization-test
May 10, 2026
Merged

feat: add ellipse visualization integration test#40
Jammy2211 merged 1 commit into
mainfrom
feature/ellipse-visualization-test

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

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 the ellipse_fitting_jax feature 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 in FitEllipse.points_from_major_axis_from and add JAX paths can be diff-checked against a stable baseline.

Four scenarios — plain Ellipse, Ellipse + EllipseMultipole(m=4), Ellipse + EllipseMultipoleScaled(m=4), and Ellipse over a tight circular mask whose radius is just below the major axis (forces the 300-iteration loop to iterate and trim points). Each scenario runs VisualizerEllipse.visualize_before_fit and VisualizerEllipse.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; enables subplot_dataset, data, ellipse_residuals, data_no_ellipse, subplot_fit_ellipse for ellipse fits.
  • scripts/ellipse/visualization.py — new integration test running four ellipse scenarios end to end through VisualizerEllipse.
  • .gitignore — add scripts/ellipse/images/ so generated PNGs aren't checked in.

Test Plan

  • Smoke tests pass for autogalaxy_workspace_test

🤖 Generated with Claude Code

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>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 10, 2026
@Jammy2211 Jammy2211 merged commit 7219307 into main May 10, 2026
4 checks passed
@Jammy2211 Jammy2211 deleted the feature/ellipse-visualization-test branch May 10, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant