feat: cluster + group scaling relations in Lenstool convention (reference-anchored, fixed exponent)#238
Merged
Merged
Conversation
Reference-anchored normalization (b0_ref / einstein_radius_ref = the brightest scaling member's lens strength), exponent fixed at Faber-Jackson 0.5 (b0 ∝ σ², σ ∝ L^¼), truncation radius scaled rs ∝ L^0.5 (cluster dPIE tier) — replacing the free two-parameter scaling_factor * L^exponent form flagged by referee feedback. Tier dimensionality 2→1 (cluster model N=13→12). Bergamini+19 kinematic calibration documented as the refinement; freeing the exponent shown as a one-line systematics test. Cluster dataset regenerated on the new truth (b0_ref=0.12 anchored at L_ref=0.40; both sources still triply imaged); group dataset unchanged (equal member luminosities → ratios 1). Stale prose refs to the long-dropped centre JSONs fixed in start_here/simulator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PUuWXiS23FvmfQPLvMNjeM
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PUuWXiS23FvmfQPLvMNjeM
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
Moves every scaling-relation composition in the workspace to the reference-anchored convention used by Lenstool and standard in published group/cluster analyses (Limousin et al. 2005; Elíasdóttir et al. 2007; Bergamini et al. 2019), replacing the free two-parameter
scaling_factor * L ** scaling_exponentform that referee feedback (assessed in #237) correctly flagged as non-standard:b0_i = b0_ref * (L_i / L_ref) ** 0.5— the free parameter is the reference member's lens strength, physically interpretable with an easy-to-motivate prior range (the oldscaling_factorhad units arcsec/L^β that changed with β).rs_i = rs_ref * (L_i / L_ref) ** 0.5, mirroring Lenstool's r_cut ∝ L^½ (cluster dPIE tier; the group tier uses Isothermal, no truncation radius — prose points at the cluster example).Scripts Changed
scripts/cluster/simulator.py— truth relation → reference-anchored (b0_ref = 0.12, exponent 0.5, rs scaled); regeneratesdataset/cluster/simple/.scripts/cluster/modeling.py— single freeb0_ref(U(0,1)), fixed exponents, rewritten__Scaling Relation__prose (referee/Lenstool rationale, Bergamini refinement).scripts/cluster/start_here.py— mirrors modeling.py.scripts/cluster/likelihood_function.py— truth-tier rebuild matches the new relation (b0 + rs scaled).scripts/cluster/csv_api.py— prose reference updated.scripts/group/features/scaling_relation/{simulator,modeling,fit,likelihood_function,modeling_for_luminosities}.py— same convention for the group three-tier API (einstein_radius_refanchored to the brightest member). The group dataset needs no regeneration: both scaling members share L = 0.45, so luminosity ratios are 1 and the truth radii are unchanged.Not in scope (follow-up noted on the issue):
scripts/imaging/features/scaling_relation/,scripts/group/slam.py,guides/advanced/multi_plane.pystill show the old form.Validation
point_datasets.csvin the diff);scaling_galaxies.csvregenerated.prior_count == 12withb0_refthe tier's only free parameter; instance check confirms the brightest member anchors exactly (b0 = b0_ref, rs = 10.0") and the faintest scales to b0_ref·√(0.05/0.40) (0.354×).tracer.png,galaxies_images.png) are deleted in this commit — the old ones depicted the previous truth model; their regeneration viasubplot_traceron the 14-galaxy multi-plane tracer is pathologically slow with current galaxy-scale plot defaults (the exact problem feat: cluster-scale visualization — per-plane critical curves/caustics aplt helpers PyAutoLens#578 addresses) and will be push-appended to this branch if the background render completes, else they regenerate on any user simulator run.no_run.yaml-parked scripts, pre-existing — see feat: LensTool-native dPIE parameterization (from_lenstool) + parity validation PyAutoGalaxy#485 discussion).Validation checklist (--auto run — in-session directives)
🤖 Generated with Claude Code