Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

King concentration from star counts (B11)

San Diego State University

Every other demo in this series recovers structure from the velocity channel σ(r)\sigma(r). This one recovers a King King, 1966 cluster’s concentration from the observable a photometric survey actually delivers — the radial star counts — and nothing else. It is the methods showcase for the Poisson number-density channel (binned_number_density / poisson_loglike / poisson_fisher_information).

The physics being recovered

A King lowered-isothermal model is fixed by two structural parameters:

So binned counts NkN_k constrain both: the profile shape pins W0W_0, the physical break radius pins rcr_c. The forward model is Engine A — a single King-limit LIMEPY component Gieles & Zocchi, 2015 (g=1g=1): the coupled Poisson ODE gives ψ(r/rc)\psi(r/r_c), and the King volume density is the closed form

n^(r)=Eγ ⁣(g+32,W(r)),W(r)=ψ(r/rc),\hat n(r) = E_\gamma\!\left(g + \tfrac32,\, W(r)\right), \qquad W(r) = \psi(r/r_c),

(limepy_density_hat), differentiable in (W0,rc)(W_0, r_c) through psi_grid. Beyond rtr_t the potential W0W\le 0 and the density is exactly zero — the hard truncation that pins the outer profile, and the regime where the Poisson model (honest counting errors on low-occupancy bins) matters most.

The likelihood

The expected counts are μk(W0,rc)=Nobspk\mu_k(W_0, r_c) = N_{\rm obs}\, p_k, with pkp_k the fraction of the model’s enclosed number in radial bin kk (the number-weighted integral of 4πr2n^(r)4\pi r^2\,\hat n(r) over the bin). The data are the frozen counts; gradients flow through the model only. The per-bin Poisson log-likelihood is k(Nklogμkμk)\sum_k\left(N_k\log\mu_k - \mu_k\right). The Fisher information is the reverse-mode Poisson form Jdiag(1/μ)JJ^\top\mathrm{diag}(1/\mu)\,J (poisson_fisher_information): the Engine A diffrax solve carries a custom_vjp, so jax.hessian would crash — exactly the constraint that makes the B2 demo use Gauss–Newton.

Inputs and assumptions

The fit recovers two parameters (W0,rc)(W_0, r_c) from star counts alone; the concentration c=log10(rt/rc)c=\log_{10}(r_t/r_c) is derived at the solution, not separately fit. Everything else is an assumed-known input or a numerical choice.

Table 1:Model inputs

Input

Meaning and role

Status (fiducial)

W0W_0

Dimensionless central potential (concentration); sets the profile shape and rt/rcr_t/r_c. A science target.

recovered (6.0)

rcr_c

Core radius — the physical break scale. The second science target.

recovered (1.0 pc)

c=log10(rt/rc)c=\log_{10}(r_t/r_c)

King concentration — reported at the MLE, derived from (W0,rc)(W_0,r_c), not independently fit.

derived

gg

LIMEPY truncation index fixed to the King limit.

known / fixed (1.0)

NN, GG

Stars sampled / Poisson normalization (3×1043\times10^4); gravitational constant (STELLAR) for the sampling.

known / fixed

bins, rlor_{\rm lo}, NfineN_{\rm fine}, boxes

20 log-spaced count bins; inner edge 0.10 pc (excludes the flat core); 3000-pt enclosed-number integration grid; sigmoid boxes W0(3.5,7.5)W_0\in(3.5,7.5) (capped — the ODE hits max_steps above \sim8), rc(0.3,3.0)r_c\in(0.3,3.0).

numerical choices

NinitsN_{\rm inits}, Adam, gates, seeds

3 dispersed Adam starts (400 steps, lr 3e-2); gates self-consistency 4σ4\sigma, recovery 3σ3\sigma; seeds (data / inits).

numerical choices

Result — freshly run, ALL PASS

Measured 2026-06-12 (N=3×104N=3\times10^4 stars, K=20K=20 log-spaced bins over [0.10,16.8][0.10, 16.8] pc, three dispersed Adam starts; wall 29\approx 29 s; exit 0).

Parameter

Truth

θ^±σ^\hat\theta \pm \hat\sigma

Pull

W0W_0 (concentration)

6.000

6.028±0.0246.028 \pm 0.024

+1.15

rcr_c (core radius)

1.000 pc

0.995±0.0100.995 \pm 0.010 pc

-0.47

Both within 1.2σ1.2\sigma. Supporting diagnostics, same run:

The honest catch: counts alone are degenerate

The Gauss–Newton Fisher correlation is ρ(W0,rc)=0.91\rho(W_0, r_c) = -0.91. The number-density profile alone leaves a strong W0W_0rcr_c degeneracy: a more concentrated model (W0 ⁣W_0\!\uparrow) with a smaller core (rc ⁣r_c\!\downarrow) reproduces almost the same count profile over the binned range. Both marginals are still tight (the demo recovers each to 2%\lesssim 2\%), but the parameters are far from independent — the 2σ2\sigma Fisher ellipse is a thin diagonal sliver (panel b). This is precisely the degeneracy the velocity channel breaks: σ(r)\sigma(r) adds the gravitational-mass / velocity-scale information that counts cannot supply, which is why the multi-channel demos (B2, B3) pin their parameters far more tightly. B11 isolates what the count channel can and cannot do on its own.

Figure

King concentration from star counts (scripts/demo_king_concentration.py,
ALL PASS). (a) The radial number-density profile: binned counts per shell
volume (points, \sqrt N errors) with the best-fit (vermilion) and truth (blue
dashed) King profiles, across the core-to-truncation dynamic range. (b) The
2\sigma Fisher ellipse in (W_0, r_c): a thin diagonal sliver
(\rho=-0.91) — the strong count-channel degeneracy — with the truth ★ inside,
near the MLE.

Figure 1:King concentration from star counts (scripts/demo_king_concentration.py, ALL PASS). (a) The radial number-density profile: binned counts per shell volume (points, N\sqrt N errors) with the best-fit (vermilion) and truth (blue dashed) King profiles, across the core-to-truncation dynamic range. (b) The 2σ2\sigma Fisher ellipse in (W0,rc)(W_0, r_c): a thin diagonal sliver (ρ=0.91\rho=-0.91) — the strong count-channel degeneracy — with the truth ★ inside, near the MLE.

Caveats

How to run

env -u VIRTUAL_ENV uv run --no-sync python scripts/demo_king_concentration.py

References

The King lowered-isothermal model is King (1966); the LIMEPY family and the g=1g=1 King limit are Gieles & Zocchi (2015). The Engine A construction and its c(W0)c(W_0) validation against King (1966) Table II are documented on the populations and physics-tests pages.

References
  1. King, I. R. (1966). The structure of star clusters. III. Some simple dynamical models. The Astronomical Journal, 71, 64–75. 10.1086/109857
  2. Gieles, M., & Zocchi, A. (2015). A family of lowered isothermal models. Monthly Notices of the Royal Astronomical Society, 454, 576–592. 10.1093/mnras/stv1848