Skip to content

feat: cluster/group examples on Lenstool-native dPIE default + reference-anchored SLaM scaling - #287

Merged
Jammy2211 merged 5 commits into
mainfrom
feature/dpie-lenstool-default
Jul 17, 2026
Merged

feat: cluster/group examples on Lenstool-native dPIE default + reference-anchored SLaM scaling#287
Jammy2211 merged 5 commits into
mainfrom
feature/dpie-lenstool-default

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Workspace phase of PyAutoLabs/PyAutoGalaxy#506 (library PR: PyAutoLabs/PyAutoGalaxy#509, pending-release): migrates every cluster/group example onto the Lenstool-native default dPIE and expresses all scaling-relation tiers in the reference-anchored convention of published analyses (Limousin+05, Elíasdóttir+07, Bergamini+19), so a reader of those papers knows exactly what the model is doing. Also absorbs the deferred lenstool-scaling-slam (PR3 of #265): the group SLaM pipelines drop the non-standard scaling_factor * L^scaling_relation (both free) parameterization for the reference-anchored form.

Scripts Changed

Cluster suite — modeled in σ_LT-space (Lenstool .par parameters, priors in km/s / arcsec):

  • cluster/simulator.py — truths now sigma (330/210 km/s mains; sigma_ref = 85 km/s tier), r_core/r_cut, redshift_object/redshift_source (final-plane anchored, same convention as NFWMCRLudlowSph); scaling relation sigma ∝ L^0.25, radii ∝ L^0.5 (Lenstool potfile vdslope/slope = 4).
  • cluster/modeling.py — main lenses free (sigma, r_core, r_cut); tier's single free parameter is sigma_ref (interpretable prior in km/s — the referee's point); N=12 unchanged (validated end-to-end in TEST_MODE).
  • cluster/start_here.py (Abell 2744) + dataset/cluster/a2744/{mass.csv,prep.py} — BCG rows converted to σ-space (290 km/s ≙ b0≈3.0" at z=0.308→5.662); 188-member tier on sigma_ref.
  • cluster/csv_api.pymass.csv rows for the default dPIE now carry the .par keywords verbatim; internal rows remain possible via dPIEMassB0*.
  • cluster/likelihood_function.py — truth reconstruction in σ-space.
  • cluster/lenstool/{data,modeling}.py + README — dPIEMassLenstooldPIEMass (the default class is the Lenstool parameterization now).
  • dataset/cluster/simple/* — regenerated with the σ-space truths (b0 values preserved to ~0.5%).
  • weak/features/strong_lensing/a2744.py — same σ-space model as cluster/start_here.py.
  • guides/profiles/mass.py — default-class construction demos + dPIEMassB0 mention.

SLaM pipelines (absorbs lenstool-scaling-slam, PR3 of #265):

  • group/slam.py, group/features/linear_light_profiles/slam.py (both scaling sites each) — einstein_radius = einstein_radius_ref * (L/L_ref)^0.5, exponent fixed at Faber–Jackson, single free einstein_radius_ref, reference luminosity anchored to the brightest main lens (BGG) from the preceding light fit. Only the BGG's luminosity anchors the relation — its (free) mass is deliberately not coupled to the tier.
  • group/features/scaling_relation/modeling.py — cluster-analogue prose updated to the σ-space form.

Notebooks regenerated for every changed script (pre-existing potential-correction catalogue drift excluded per #265's precedent).

Test Plan

  • scripts/check_sizes.sh — all scripts within tolerance.
  • cluster/csv_api.py, guides/profiles/mass.py run clean.
  • cluster/modeling.py + cluster/likelihood_function.py end-to-end in TEST_MODE (N=12; composition validated).
  • Dataset regeneration verified: solved multiple images ray-trace back to the source coordinate in the final plane (RMS ~3e-4", matching the pre-swap dataset's behaviour).
  • Companion autolens_workspace_test PR re-validates the 6-leg Lenstool parity + FD sweeps.

Merge gate

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB

…ference-anchored SLaM scaling

Cluster suite modeled in sigma_LT-space (Lenstool .par parameters: sigma,
r_core, r_cut, redshifts) with the scaling tier's single free parameter
sigma_ref (km/s); simple + a2744 datasets converted/regenerated. Group SLaM
pipelines drop scaling_factor * L^exp (both free) for the reference-anchored
einstein_radius_ref * (L/L_BGG)^0.5 convention (absorbs lenstool-scaling-slam,
PR3 of autolens_workspace#265). Lenstool ingestion examples use the default
dPIEMass directly. Notebooks regenerated (PyAutoGalaxy#506).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB
Jammy2211 and others added 4 commits July 17, 2026 17:03
…notebooks

Brings llms-full.txt / workspace_index.json current (navigator gate) after the
dPIE cluster/scaling script changes, and commits the potential-correction
notebooks that #285/#286 landed without regenerating.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB
…mposition

The default dPIEMass config carries H0/Om0 priors, so a main-lens mass composed
from a CSV that omits those columns floated them as free parameters (a2744
start_here went N=22 -> N=26). Pin H0/Om0 in the main-lens loops and add the
columns to the a2744 mass.csv + prep.py writer. Simulator-written CSVs (simple)
already carried them; no dataset regeneration needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K5MpYSYekRWVtoUmExAgKB
@Jammy2211
Jammy2211 merged commit 35d46bd into main Jul 17, 2026
8 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