Skip to content

docs: add stellar + dark + lmp light-and-mass profiles guide - #181

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/light-mass-profiles-guide
May 18, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/light-mass-profiles-guide

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds scripts/guides/profiles/light_and_mass_profiles.py to autolens_workspace — the
third and final guide in the profiles/ folder, paired with light.py (#86 / #87) and
mass.py (#179). Where those two cover pure light and parametric lens mass
respectively, this guide covers the stellar + dark + combined light-and-mass profiles
that decompose a lens galaxy into its constituent matter components.

Scope:

  • Stellar mass profiles in al.mp.* (Sersic, Chameleon, Gaussian, GaussianGradient,
    SersicCore, SersicGradient, DevVaucouleurs, Exponential + *Sph variants).
  • Dark-matter mass profiles in al.mp.* — the NFW family (NFW, gNFW, cNFW,
    NFWTruncated) plus their MCR (mass-concentration), Virial-mass, and Scatter variants
    in a single dedicated section explaining when to reach for each.
  • Combined light-and-mass profiles in al.lmp.* — the headline section demonstrates
    that one al.lmp.Sersic emits BOTH image_2d_from (light) AND convergence_2d_from
    (mass) via a shared mass_to_light_ratio.
  • Linear combined light-and-mass profiles in al.lmp_linear.* — the inversion-aware
    variant; intensity solved analytically at fit time.

Includes a Composing a Decomposed Bulge+Halo Model section that shows the canonical
recipe: attach a stellar Sersic mass + NFW halo to one lens galaxy so their convergences
sum, with one source galaxy on a second redshift plane. Closes #180.

Scripts Changed

  • scripts/guides/profiles/light_and_mass_profiles.py — new ~751-line guide (11 sections
    mirroring light.py / mass.py flow)
  • .script_sizes.json — refreshed to record the new file

Test Plan

  • Smoke run: PYAUTO_TEST_MODE=2 ... python scripts/guides/profiles/light_and_mass_profiles.py exits 0 (verified locally before this PR)
  • Workspace smoke_tests.txt curated set still passes (verified locally; new file is intentionally NOT added to the curated list per the small-subset policy)
  • scripts/check_sizes.sh passes (snapshot refreshed)
  • Notebooks regenerated by /generate_and_merge after merge (separate step)

🤖 Generated with Claude Code

Adds scripts/guides/profiles/light_and_mass_profiles.py to
autolens_workspace, the third guide in the profiles/ folder paired
with light.py and mass.py. Covers stellar mass profiles (al.mp.Sersic,
Chameleon, Gaussian, GaussianGradient, SersicCore, SersicGradient,
DevVaucouleurs, Exponential + *Sph variants), the dark-matter NFW
family (NFW, gNFW, cNFW, NFWTruncated, plus MCR / Virial / Scatter
variants), the combined light-and-mass al.lmp.* namespace, and the
linear variant al.lmp_linear.*.

Headline section demonstrates the combined-light-and-mass property of
al.lmp.Sersic: one object emits both image_2d_from (light) and
convergence_2d_from (mass) via a shared mass_to_light_ratio. Composing
a decomposed bulge+halo model section shows the standard recipe of
attaching a stellar Sersic mass + an NFW halo to one lens galaxy so
their convergences sum.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 18, 2026
@Jammy2211
Jammy2211 merged commit 391ea19 into main May 18, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/light-mass-profiles-guide branch May 18, 2026 16:25
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add stellar + dark + lmp light-and-mass profiles guide

1 participant