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.

Substructure (CW04 Q) validation

San Diego State University

The Cartwright & Whitworth (2004) Q = m̄/s̄ parameter separates centrally concentrated clusters (Q>0.8Q>0.8) from fractal/substructured ones (Q<0.8Q<0.8). Test file: tests/validation/test_substructure_q_physics.py (see the test dashboard for the live per-suite count); figures: scripts/validate_substructure_q.py.

What is verified

Each row maps to assertions in test_substructure_q_physics.py. Measured values are regenerated by scripts/validate_substructure_q.py. The exact estimator uses the CW04 area convention A=πR2A=\pi R^2 (convex-hull area biases QQ high by 0.1\sim0.1).

Property

Tolerance (as tested)

Measured

Anchor

Uniform sphere QQ (CW04 ‘3D0’)

0.75<Q<0.850.75<Q<0.85

0.78

Cartwright & Whitworth (2004) Table 1 (0.79)

r1r^{-1} profile (3D1)

Q>Q> uniform

0.82

CW04 Table 1 (0.84)

r2r^{-2} profile (3D2)

concentrated, Q>0.8Q>0.8

0.92

CW04 Table 1 (0.93)

Substructure lowers QQ (clumpy)

Q<0.80Q<0.80

0.42 (clumpy), 0.25 (clumpier)

fractal/clumpy regime

Regime ordering

clumpy << uniform << concentrated

0.25<0.42<0.78<0.82<0.920.25<0.42<0.78<0.82<0.92

monotone QQ

QQ is NN-independent (N>100N>100)

spread <25%<25\%

0.9%0.9\% (uniform), 10%10\% (clumpy)

CW04 §3

Differentiable qapproxq_{\rm approx} vs exact (substructure regime Q0.85Q\le0.85)

<0.06<0.06

clumpy +0.004, uniform +0.045

kNN approximation

qapproxq_{\rm approx} ordering preserved (all regimes)

monotone

clumpy << uniform << concentrated

monotone surrogate

qapproxq_{\rm approx} differentiability

finite, correct sign, median AD==FD few %

median rel 0.9%0.9\% (all q/p>0\partial q/\partial p>0)

kNN soft surrogate

Figures

Generated by scripts/validate_substructure_q.py (PASS/FAIL per panel).

The CW04 (\bar s,\bar m) plane. The Q=0.8 line divides centrally
concentrated (r^{-1}, r^{-2}; above) from substructured (clumpy, clumpier;
below) configurations, with the uniform sphere on the divide (Q=0.78). This is
the diagnostic’s defining diagram.

Figure 1:The CW04 (sˉ,mˉ)(\bar s,\bar m) plane. The Q=0.8Q=0.8 line divides centrally concentrated (r1r^{-1}, r2r^{-2}; above) from substructured (clumpy, clumpier; below) configurations, with the uniform sphere on the divide (Q=0.78Q=0.78). This is the diagnostic’s defining diagram.

Q ladder vs CW04 Table 1. The exact estimator reproduces CW04 ‘3D0/3D1/3D2’
(stars: 0.79/0.84/0.93; measured 0.78/0.82/0.92) and places clumpy/clumpier
well below the Q=0.8 divide.

Figure 2:Q ladder vs CW04 Table 1. The exact estimator reproduces CW04 ‘3D0/3D1/3D2’ (stars: 0.79/0.84/0.930.79/0.84/0.93; measured 0.78/0.82/0.920.78/0.82/0.92) and places clumpy/clumpier well below the Q=0.8Q=0.8 divide.

Differentiable q_{\rm approx} vs exact Q. In the substructure regime
(Q\le0.85, shaded) — where q_{\rm approx} is used for inference — the JAX kNN
estimator tracks the exact scipy MST Q on the 1:1 line (clumpy +0.004, uniform
+0.045). For concentrated profiles (Q>0.85) it over-reads by \sim0.1 (shown
honestly); ordering is preserved throughout.

Figure 3:Differentiable qapproxq_{\rm approx} vs exact QQ. In the substructure regime (Q0.85Q\le0.85, shaded) — where qapproxq_{\rm approx} is used for inference — the JAX kNN estimator tracks the exact scipy MST QQ on the 1:1 line (clumpy +0.004, uniform +0.045). For concentrated profiles (Q>0.85Q>0.85) it over-reads by 0.1\sim0.1 (shown honestly); ordering is preserved throughout.

N-independence. Q is approximately independent of N for N>100 (CW04):
the uniform sphere varies by 0.9\%, the clumpy distribution by 10\% across
N=150–2400.

Figure 4:NN-independence. QQ is approximately independent of NN for N>100N>100 (CW04): the uniform sphere varies by 0.9%0.9\%, the clumpy distribution by 10%10\% across N=150N=1502400.

Differentiability

q_{\rm approx} gradient. \partial q_{\rm approx}/\partial p for a radial
concentration parameter p (r=u^p): autodiff and finite difference agree to a
median 0.9\%. As a kNN estimator, the gradient is exact within a neighbour-set
cell and the finite difference picks up cell-boundary truncation (worst-case
\sim20\% at a boundary); the autodiff gradient is finite and correct-signed
everywhere — usable for gradient-based substructure inference (the reason
q_approx exists alongside the non-differentiable exact compute_q_parameter).

Figure 5:qapproxq_{\rm approx} gradient. qapprox/p\partial q_{\rm approx}/\partial p for a radial concentration parameter pp (r=upr=u^p): autodiff and finite difference agree to a median 0.9%0.9\%. As a kNN estimator, the gradient is exact within a neighbour-set cell and the finite difference picks up cell-boundary truncation (worst-case 20%\sim20\% at a boundary); the autodiff gradient is finite and correct-signed everywhere — usable for gradient-based substructure inference (the reason q_approx exists alongside the non-differentiable exact compute_q_parameter).

Azimuthal-variation diagnostic (Küpper+2011)

compute_azimuthal_variation returns σΣ/Σ\sigma_\Sigma/\langle\Sigma\rangle, the relative scatter of star counts in azimuthal sectors — a cheap O(N)O(N) substructure proxy. Test file: tests/validation/test_azimuthal_variation_physics.py (see the test dashboard for the live per-suite count); figures: scripts/validate_azimuthal_variation.py.

Property

Tolerance (as tested)

Measured

Anchor

Smooth axisymmetric → Poisson floor

<3nb/N< 3\sqrt{n_b/N}

0.059 (floor 0.069)

Poisson counts

Monotonic rise with clump fraction

monotone

0.061.250.06\to1.25

more clumps ⇒ larger σΣ\sigma_\Sigma

Spans the Küpper range

smooth <0.2<0.2, clumpy >0.5>0.5

0.06 / 0.9

Küpper et al. (2011) [0.07,0.76][0.07,0.76]

Anti-correlates with CW04 QQ

ρ<0.5\rho < -0.5

ρ=0.83\rho = -0.83

both detect substructure

Sector-count histograms. A smooth axisymmetric cluster (left) has nearly flat
azimuthal counts (\sigma_\Sigma/\langle\Sigma\rangle=0.06, the Poisson floor);
azimuthal clumps (right) give spiky sectors (\sigma_\Sigma/\langle\Sigma\rangle=1.04).

Figure 6:Sector-count histograms. A smooth axisymmetric cluster (left) has nearly flat azimuthal counts (σΣ/Σ=0.06\sigma_\Sigma/\langle\Sigma\rangle=0.06, the Poisson floor); azimuthal clumps (right) give spiky sectors (σΣ/Σ=1.04\sigma_\Sigma/\langle\Sigma\rangle=1.04).

Response to clumpiness. \sigma_\Sigma/\langle\Sigma\rangle rises monotonically
from the Poisson floor through the  range ([0.07,0.76], shaded)
as the azimuthal clump fraction increases. The fractal generator was removed, so the
specific \sigma_\Sigma\!-\!D slope is not reproduced here — only the floor, span, and
monotonic behaviour.

Figure 7:Response to clumpiness. σΣ/Σ\sigma_\Sigma/\langle\Sigma\rangle rises monotonically from the Poisson floor through the Küpper et al. (2011) range ([0.07,0.76][0.07,0.76], shaded) as the azimuthal clump fraction increases. The fractal generator was removed, so the specific σΣ ⁣ ⁣D\sigma_\Sigma\!-\!D slope is not reproduced here — only the floor, span, and monotonic behaviour.

Cross-check vs CW04 Q. Across a smooth→clumpy sequence the two independent
substructure diagnostics anti-correlate (\rho=-0.83): higher
\sigma_\Sigma/\langle\Sigma\rangle tracks lower Q.

Figure 8:Cross-check vs CW04 QQ. Across a smooth→clumpy sequence the two independent substructure diagnostics anti-correlate (ρ=0.83\rho=-0.83): higher σΣ/Σ\sigma_\Sigma/\langle\Sigma\rangle tracks lower QQ.

How to run

pytest tests/validation/test_substructure_q_physics.py -q          # ~5 s
pytest tests/validation/test_azimuthal_variation_physics.py -q     # ~1 s
python scripts/validate_substructure_q.py                          # 5 Q figures
python scripts/validate_azimuthal_variation.py                     # 3 azimuthal figures

What this suite does not test

References

The Q diagnostic is Cartwright & Whitworth (2004); the GW04 fractal baseline is Goodwin & Whitworth (2004); the dynamical context is Allison et al. (2009). Theory at Fractal substructure and JAX-native CW04 substructure Q parameter.

References
  1. Cartwright, A., & Whitworth, A. P. (2004). The statistical analysis of star clusters. Monthly Notices of the Royal Astronomical Society, 348, 589–598. 10.1111/j.1365-2966.2004.07360.x
  2. Küpper, A. H. W., Maschberger, T., Kroupa, P., & Baumgardt, H. (2011). Mass segregation and fractal substructure in young massive clusters. Monthly Notices of the Royal Astronomical Society, 417, 2300–2317. 10.1111/j.1365-2966.2011.19412.x
  3. Goodwin, S. P., & Whitworth, A. P. (2004). The dynamical evolution of fractal star clusters: The survival of substructure. Astronomy and Astrophysics, 413, 929–937. 10.1051/0004-6361:20031529
  4. Allison, R. J., Goodwin, S. P., Parker, R. J., Portegies Zwart, S. F., de Grijs, R., & Kouwenhoven, M. B. N. (2009). Using the minimum spanning tree to trace mass segregation. Monthly Notices of the Royal Astronomical Society, 395, 1449–1454. 10.1111/j.1365-2966.2009.14508.x