feat: cluster tests on the Lenstool-native dPIE default#179
Merged
Conversation
lenstool_parity legs target dPIEMassB0*.from_lenstool + new default-class equivalence leg; csv_api/simulator/likelihood_sanity in sigma-space with rebuild-based perturbations (derived b0 makes setattr a silent no-op); mass/total.py FD sweep covers both parameterizations; test dataset regenerated (PyAutoGalaxy#506). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB
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
Test-suite phase of PyAutoLabs/PyAutoGalaxy#506 (library PR: PyAutoLabs/PyAutoGalaxy#509; workspace PR in
autolens_workspace): migrates the cluster integration scripts onto the Lenstool-native default dPIE (sigma,r_core,r_cut, redshifts) and re-validates the like-with-like Lenstool match after the swap.Scripts Changed
cluster/lenstool_parity.py—from_lenstoolconverter legs now targetdPIEMassB0/dPIEMassB0Sph(where the classmethod lives post-swap); new leg: the defaultdPIEMassSph(sigma, r_core, r_cut)constructor must equaldPIEMassB0Sph.from_lenstoolunder the same flat cosmology. All 6 legs + the new leg pass (deflection/convergence/potential parity at 1e-7..1e-10).cluster/csv_api.py→cluster/simulator.pychain — instances in σ-space (330/210/135 km/s ≙ old b0 3.0/1.2/0.5);dataset/cluster/test/*regenerated through the chain (3 images per source, consistent with the truth tracer).cluster/likelihood_sanity.py— perturbation sweep now over (sigma,r_core,r_cut); perturbations rebuild the profile instead ofsetattr— the Lenstool-parameterized class derives its internalb0in__init__, so attribute mutation would silently not propagate (same property asNFWMCRLudlowSph).mass/total.py— FD sweep entries renamed todPIEMassB0/dPIEMassB0Sphand new default-class entries added (dPIEMass/dPIEMassSphvia the σ constructor). All four dPIE mass rows PASS (med ~1e-4). Note: the pre-existingdPIEPotentialgrad(ψ)=α FAIL (8.3e-2) is untouched by this diff (O'Donnell potential-ellipticity profile; out of scope — see thepiemass_potentialbacklog prompt).Intentionally untouched:
database/scrape/scaling_relation.py— its two-free-parameter compound-prior relation is precisely what that aggregator-scrape test exercises.Test Plan
cluster/lenstool_parity.py— all legs pass.cluster/csv_api.py+cluster/simulator.py— run clean; dataset regenerated.mass/total.py— 44 PASS / 1 pre-existing FAIL (dPIEPotential) / 6 SKIP.py_compileclean.Merge gate
Library-first: merge after PyAutoLabs/PyAutoGalaxy#509 (
pending-release).🤖 Generated with Claude Code
https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB