AnisotropyModel#
jeanspy.model.AnisotropyModel
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.model.AnisotropyModel(show_init=False, submodels=None, **params)#
Bases:
jeanspy.model.ModelSubclassing interface for spherical anisotropy.
Notes
Inputs and units. Implement beta(
r_pc), f(r_pc) and kernel(u,``R_pc``,n) consistently; radii use pc and u=r/R.Returns and shape. Dimensionless beta/kernel and an arbitrary-normalization integrating factor f.
Validity. Steady spherical Jeans closure; beta is distinct from axisymmetric
beta_z.Errors. Abstract methods raise NotImplementedError.
Backend. NumPy/SciPy CPU; stateful components, with no JAX tracing.
Differentiation. No physical-parameter automatic differentiation on this API.
Examples.
examples/docs_profiles.py- abstractmethod beta(r)[source]#
Evaluate dimensionless spherical anisotropy at radius r in pc.
Subclasses must implement this interface; the base method raises NotImplementedError. Concrete models define scalar/array broadcasting.
- abstractmethod f(r)[source]#
Evaluate the Jeans integrating factor at radius r in pc.
Its overall normalization cancels in the Jeans solution. Subclasses must implement this interface; the base method raises NotImplementedError.
- is_required_param_names(param_names_candidates)#
Test a sequence of names against this component’s required parameters.
Returns a list of bool with the same length and order as
param_names_candidates. Submodel requirements are not included.
- abstractmethod kernel(u, R, **kwargs)[source]#
Evaluate the dimensionless LOS kernel for u=r/R and projected radius R.
Use u>=1, R>0 in pc and broadcastable arrays. Subclasses define numerical kwargs; the base method raises NotImplementedError.
- name = 'AnisotropyModel'#
- property params_all#
Return a flattened Parameters copy of this model and its submodels.
Values retain their physical units. Later submodels overwrite duplicate names; use
params_all_with_model_nameto retain role-qualified names.
- property params_all_with_model_name#
Return a new Parameters mapping with submodel-role prefixes.
Nested names use
role:parameternotation. Values retain their physical units; this operation copies the mapping, not nested mutable values.
- property required_param_names_combined#
Return this model’s and all nested submodels’ required parameter names.
The result is a list in traversal order; duplicate names are retained.
- sampling_identity(sampled_names=())#
Configuration and fixed parameters, excluding changing MCMC coordinates.
- update(new_params=None, **kwargs)#
Replace named parameters in the owning components.
Notes
Inputs and units.
new_paramsis an optional mapping/Parameters/Series; keyword values are additional replacements. Names are physical names declared by this model and its components. Unknown names raise ValueError before any parameters are changed.Returns and shape. None; mutates component parameters.
params_allreturns the resulting flattened copy.