config: default critical_curves_method to zero_contour#355
Merged
Conversation
marching_squares fabricates a noisy polygonal radial caustic for slope=2 isothermal profiles where the radial eigenvalue never cleanly crosses zero. zero_contour correctly omits the degenerate radial caustic and renders clean smooth ovals when one physically exists. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Merged
2 tasks
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace_test#29 |
Now the default critical_curves_method, so it must be installed on all supported Python versions (including 3.13 CI which skips optional extras).
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
Flip
autogalaxy/config/visualize/general.yamldefaultcritical_curves_methodfrommarching_squarestozero_contour.Motivation
For slope=2 isothermal lens profiles,
marching_squaresfabricates a noisy polygonal radial caustic where the radial eigenvalue never cleanly crosses zero (analytically it stays at 1; numerically ellipticity makes it dip near zero, which marching squares picks up as spurious contours). The resulting jagged octagon is not at the physically meaningful 2→1 image transition — it's a sampling artifact.zero_contourcorrectly omits the degenerate radial caustic for isothermal profiles and renders clean smooth ovals when one physically exists (verified with slope=1.8).Runtime: ~2–3× slower per
visualizecall for the small integration-test dataset, but this is plot-only code — not hit per likelihood evaluation.API Changes
None — internal config default only. Users who explicitly override
critical_curves_methodin their ownvisualize/general.yamlare unaffected. Default behavior changes: caustics/critical curves are now computed via the JAX zero-contour method instead of marching squares.See full details below.
Test Plan
pytest test_autogalaxy/passes (834/834)autolens_workspace_test/scripts/imaging/visualization.pyruns end-to-end; all assertions pass; radial caustic cleanly omitted for slope=2, smooth oval shown for slope=1.8.Full API Changes (for automation & release notes)
Removed
None.
Added
None.
Changed Behaviour
visualize/general.yaml::general.critical_curves_methodchanged from"marching_squares"to"zero_contour"._caustics_from,_critical_curves_frominautogalaxy/util/plot_utils.pyandautogalaxy/plot/plot_utils.py): they now calltangential_caustic_list_via_zero_contour_from()/radial_caustic_list_via_zero_contour_from()and the corresponding*_critical_curve_list_via_zero_contour_from()methods by default, instead of the marching-squares grid-based variants.Migration
critical_curves_method: marching_squaresin a project-localconfig/visualize/general.yaml.🤖 Generated with Claude Code