Skip to content

feat: cluster tests on the Lenstool-native dPIE default#179

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/dpie-lenstool-default
Jul 17, 2026
Merged

feat: cluster tests on the Lenstool-native dPIE default#179
Jammy2211 merged 1 commit into
mainfrom
feature/dpie-lenstool-default

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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.pyfrom_lenstool converter legs now target dPIEMassB0/dPIEMassB0Sph (where the classmethod lives post-swap); new leg: the default dPIEMassSph(sigma, r_core, r_cut) constructor must equal dPIEMassB0Sph.from_lenstool under the same flat cosmology. All 6 legs + the new leg pass (deflection/convergence/potential parity at 1e-7..1e-10).
  • cluster/csv_api.pycluster/simulator.py chain — 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 of setattr — the Lenstool-parameterized class derives its internal b0 in __init__, so attribute mutation would silently not propagate (same property as NFWMCRLudlowSph).
  • mass/total.py — FD sweep entries renamed to dPIEMassB0/dPIEMassB0Sph and new default-class entries added (dPIEMass/dPIEMassSph via the σ constructor). All four dPIE mass rows PASS (med ~1e-4). Note: the pre-existing dPIEPotential grad(ψ)=α FAIL (8.3e-2) is untouched by this diff (O'Donnell potential-ellipticity profile; out of scope — see the piemass_potential backlog 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.
  • All edited scripts py_compile clean.

Merge gate

Library-first: merge after PyAutoLabs/PyAutoGalaxy#509 (pending-release).

🤖 Generated with Claude Code

https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB

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
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit c410806 into main Jul 17, 2026
0 of 4 checks passed
@Jammy2211
Jammy2211 deleted the feature/dpie-lenstool-default branch July 17, 2026 16:49
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