Repository navigation
docs: magnification at a point in every source_science.py and the guides (Source & Cluster 5b) - #598
Merged
Conversation
Add a __Magnification At A Point__ section to all eleven source_science.py scripts (LensCalc.magnification_2d_via_hessian_from at chosen coordinates, sign = image parity, distinct from the flux-ratio magnification), to guides/lens_calc.py, a plane_j cross-reference in guides/advanced/multi_plane.py, and the per-image signed/unsigned magnification accessors in point_source/fit.py and modeling.py (PyAutoLens#798, pending release). Notebooks regenerated. Source & Cluster arc phase 5b. Closes #596. Co-Authored-By: Claude Fable 5.1 <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
Closes #596 — Source & Cluster arc phase 5b (epic
cluster-strong-lensing). Users can now find magnification at a point in the workspace: everysource_science.pygets a__Magnification At A Point__section (signedmu = 1/det(A)viaal.LensCalc.from_tracer(tracer).magnification_2d_via_hessian_fromat chosen (y,x) coordinates, sign = image parity, distinct from the flux-ratio / area magnification already computed),guides/lens_calc.pygains the same section,guides/advanced/multi_plane.pycross-references that point fits andResultPointselectplane_jautomatically, and the point-source fit/modeling scripts print the new per-image signed/unsigned accessors from PyAutoLens#798. Coordinates are hand-chosen on the lensed arcs; no forward PointSolver call is added anywhere.Scripts Changed
scripts/imaging/source_science.py,scripts/imaging/features/multi_gaussian_expansion/source_science.py,scripts/imaging/features/pixelization/source_science.py— new__Magnification At A Point__section + contents bullet (pixelization variant also evaluates atpositions.json).scripts/interferometer/source_science.py,scripts/interferometer/features/pixelization/source_science.py— same.scripts/group/source_science.py,scripts/group/features/multi_gaussian_expansion/source_science.py,scripts/group/features/pixelization/source_science.py— same, plus the "every mass profile in the tracer enters the Hessian" comparison againsttracer_main_only.scripts/multi_galaxy/source_science.py,scripts/multi_galaxy/features/multi_gaussian_expansion/source_science.py,scripts/multi_galaxy/features/pixelization/source_science.py— same (both deflectors and shear enter the Hessian; pixelization variant compares againsttracer_lens_0_only).scripts/guides/lens_calc.py—__Magnification At A Point__section after__Magnification__(after__Hessian__), contents bullet, pointer to multi_planeTrap (b).scripts/guides/advanced/multi_plane.py— one paragraph: point fits /ResultPointapplyplane_jautomatically.scripts/point_source/fit.py—__Magnification At The Multiple Images__printingfit.positions.signed_magnifications_at_positions/magnifications_at_positions.scripts/point_source/modeling.py—__Result__paragraph printingresult.signed_magnifications_at_positions/magnifications_at_positions.notebooks/for the 15 scripts;llms-full.txtandworkspace_index.jsonrefreshed by the navigator (check_navigator.pypasses).Upstream PR
PyAutoLabs/PyAutoLens#798 — merged, unreleased: the two
point_source/scripts use its new accessors, so this PR waits for the next PyAutoLens release (release-gate: PyAutoLens). The elevensource_science.pyscripts and both guides use only released API.Test Plan
run_python.pysmoke profile (1.9–8.7 s each).source_science.pyhave the section and themagnification_2d_via_hessian_fromcall;lens_calc.pysection after__Hessian__;point_source/fit.pyprints both accessors.autolens_workspacesmoke list (pyauto-heart smoke autolens): 43/43 PASS against the branch.Validation checklist (--auto run — plan was not pre-approved)
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code