AxisymmetricJeansLikelihoodModel#
jeanspy.sampler_numpyro.AxisymmetricJeansLikelihoodModel
See methods and properties for individual lookup pages, or the alphabetical API dictionary to search all classes. The full class contract and existing member anchors are retained below.
- class jeanspy.sampler_numpyro.AxisymmetricJeansLikelihoodModel(dsph_model, parameter_specs, *, fixed_params=None, **kwargs)[source]#
Bases:
jeanspy.sampler_numpyro.JeansLikelihoodModelNumPyro likelihood for signed sky coordinates and zero mean streaming.
Uses the same ParameterSpec and NumPyroSampler contracts as the spherical likelihood.
fixed_paramsand sampled physical names must be disjoint; optional postprocessing receives their combined dictionary. All angles in that dictionary are radians. Both q and q_projected parameterizations are supported by the axisymmetric forward model.Parameter names and a named velocity mean are checked at construction. With
parameter_postprocess, its output is checked after the callback instead; construction does not execute user callbacks or sample priors.sigma2_boundsare admissibility limits: variances outside the interval receive zero likelihood, without clipping a finite prediction to a bound.Notes
Inputs and units.
dsph_modelis a JAX AxisymmetricDSphModel;parameter_specsis a sequence of ParameterSpec, andfixed_paramssupplies complementary physical scalars. Calling this model takes matching finite nonempty 1-Dx_pc/y_pc(pc) andvlos_kms/e_vlos_kms(km/s). Signed sky coordinates and the projected center are supported. Velocity mean and static sigmalos2 options are explicit.Returns and shape. __call__ returns None while registering NumPyro sample, deterministic and likelihood sites;
sample_parametersreturns the transformed parameter mapping. Variance includes measurement error squared.Validity. Positions in pc and velocities/errors in km/s, errors>=0. Gaussian LOS closure at fixed positions. The standard class does not add membership mixtures, velocity-cut normalization or binaries.
Errors. Bad schema/shape and sampled/fixed collisions raise; inadmissible forward variances are rejected with minus-infinite density.
Backend. NumPyro with JAX forward model.
Differentiation. Supported continuous physical parameters are traceable. J/D factors are not likelihood sites. Verify derivatives for custom prior transforms.
Examples.
examples/axisymmetric_inference.py- Special-members:
__call__
- sample_parameters()[source]#
Draw named physical parameters inside a NumPyro model execution.
Combines fixed_params with the sampled ParameterSpec values, then applies parameter_postprocess if supplied. Returns a physical-parameter mapping; invalid parameter names raise ValueError. Run under NumPyro inference or a seeded handler, not as an unseeded standalone random-number call.