progenax.builders_cluster¶
Auto-generated by scripts/build_api_reference.py from progenax source. Re-run after public-API changes; the script is idempotent.
Module path: progenax/builders_cluster/
Public symbols: 10
Contents¶
builders_cluster.build_cluster¶
function
📇 model card · ∇ gradient-verified — 3 audit cases
build_cluster(profile: 'SpatialProfile', *, key: 'PRNGKeyArray', masses: "Optional[Float[Array, 'N']]" = None, n: 'Optional[int]' = None, imf=None, units=None, Q: 'Optional[float]' = 0.5, anisotropy_radius: "Optional[Float[Array, '']]" = None, tidal_radius: "Optional[Float[Array, '']]" = None, rotation: 'Optional[Union[float, RotationSpec]]' = None, revirialize: 'bool' = False, softening: 'float' = 0.0) -> 'ICResult'Build a single-population cluster IC from a profile object (see design doc).
Q is the target virial ratio Q = T/|V| passed through to build_spatial_ic:
Q=0.5 virial-scales the IC to equilibrium (default); Q=None disables the
rescale entirely, yielding the faithful UNSCALED equilibrium of the matched DF
(the King/EFF/Michie/LIMEPY true-DF samplers are already in detailed equilibrium,
so their measured Q lands near 0.5 with no rescale).
Source: src/progenax/builders_cluster.py#L122
builders_cluster.matched_velocity_df¶
function
matched_velocity_df(profile: 'SpatialProfile', anisotropy_radius: 'Optional[ArrayLike]' = None) -> 'VelocityDF'Return the equilibrium velocity DF whose scale params match profile exactly.
Kills the r_h-desync footgun: the DF reads the profile’s OWN scale fields, so a Plummer profile can never be paired with a mismatched-r_h DF.
anisotropy_radius (Osipkov-Merritt r_a; β(r)=r²/(r²+r_a²)) is valid ONLY for
Plummer/EFF (whose base DFs are isotropic and OM-augmentable). King is isotropic;
Michie/LIMEPY carry their anisotropy intrinsically (set r_a on the profile via
from_W0_rc(..., r_a=...)), so passing anisotropy_radius for those is an ERROR
(no silent ignore).
Caveat: King/Michie/LIMEPY DFs re-solve their ODE at DEFAULT domains (consistent
with the default profile constructors). A profile built with a custom xi_max
cannot round-trip that domain (not stored as a field) — hand-compose for that case.
Source: src/progenax/builders_cluster.py#L53
builders_cluster.RotationSpec¶
class
RotationSpec(kind: 'str' = 'solid', omega: "Optional[Float[Array, '']]" = None, v_peak: "Optional[Float[Array, '']]" = None, R_peak: "Optional[Float[Array, '']]" = None, axis: "Float[Array, '3']" = <factory>) -> NoneRotation overlay spec. kind=‘solid’ uses omega; kind=‘differential’ uses (v_peak, R_peak).
Additive kinematic overlay — injects L_z and raises Q above 0.5 (audit S3, NOT a stationary equilibrium). Differentiable in omega / v_peak / R_peak.
Source: src/progenax/builders_cluster.py#L159
builders_cluster.ClusterParams¶
class
ClusterParams(profile: 'SpatialProfile', anisotropy_radius: "Optional[Float[Array, '']]" = None, tidal_radius: "Optional[Float[Array, '']]" = None, rotation: 'Optional[Union[float, RotationSpec]]' = None, Q: 'Optional[float]' = 0.5) -> NoneDifferentiable θ-PyTree: profile + named modifier knobs (see design doc).
jax.grad over a ClusterParams gives joint gradients over the profile’s float leaves AND
any non-None modifier (the structure declares which params are free). revirialize/
softening are static force-model config -> kwargs of build_cluster_from_params, not fields.
Source: src/progenax/builders_cluster.py#L299
builders_cluster.build_cluster_from_params¶
function
📇 model card · ∇ gradient-verified — 1 audit case
build_cluster_from_params(params: 'ClusterParams', *, key, masses=None, n=None, imf=None, units=None, revirialize: 'bool' = False, softening: 'float' = 0.0) -> 'ICResult'Unpack a ClusterParams θ-PyTree into build_cluster (the inference forward map).
Source: src/progenax/builders_cluster.py#L314
builders_cluster.build_plummer_cluster¶
function
build_plummer_cluster(*, key, masses=None, n=None, r_h=1.0, imf=None, **kw)(no docstring)
Source: src/progenax/builders_cluster.py#L243
builders_cluster.build_king_cluster¶
function
📇 model card · ∇ gradient-verified — 1 audit case
build_king_cluster(*, key, masses=None, n=None, W0=7.0, r_c=1.0, imf=None, **kw)(no docstring)
Source: src/progenax/builders_cluster.py#L249
builders_cluster.build_eff_cluster¶
function
📇 model card · ∇ gradient-verified — 1 audit case
build_eff_cluster(*, key, masses=None, n=None, a=1.0, gamma=3.0, r_t=10.0, imf=None, **kw)(no docstring)
Source: src/progenax/builders_cluster.py#L260
builders_cluster.build_michie_cluster¶
function
📇 model card · ∇ gradient-verified — 1 audit case
build_michie_cluster(*, key, masses=None, n=None, W0=7.0, r_c=1.0, r_a=8.0, imf=None, **kw)(no docstring)
Source: src/progenax/builders_cluster.py#L273
builders_cluster.build_limepy_cluster¶
function
📇 model card · ∇ gradient-verified — 1 audit case
build_limepy_cluster(*, key, masses=None, n=None, W0=5.0, g=1.0, r_c=1.0, r_a=None, imf=None, **kw)(no docstring)