BaesAnisotropyModel#
jeanspy.model.BaesAnisotropyModel
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.BaesAnisotropyModel(show_init=False, submodels=None, **params)#
Bases:
jeanspy.model.AnisotropyModelBaes–van Hese spherical anisotropy with numerical LOS quadrature.
beta_0andbeta_infare dimensionless inner/outer anisotropies;r_a(pc) andetaare positive radius and sharpness. With t=(r/r_a)**eta, beta(r)=(beta_0+beta_inf*t)/(1+t).betaandfpreserve radius shape. Radii are in pc; f is an arbitrarily normalized Jeans integrating factor satisfying d ln(f)/d ln(r)=2*beta. The kernel is dimensionless and uses u=r/R >= 1 with positive R.kernel(u,R,n=128)flattens u and R and returns a grid with shape (R.size,u.size), including (1,1) for scalar inputs. n controls the double-exponential inner quadrature; increase it to check convergence. Elementary formulas do not uniformly validate physical domains; invalid inputs can produce nonfinite results. An anisotropy below 1 does not alone establish a positive phase-space distribution function. This stateful NumPy/SciPy API does not support JAX differentiation. Seeexamples/docs_profiles.py.- beta(r)[source]#
Evaluate spherical velocity anisotropy.
Notes
Inputs and units. r is a radius or NumPy radius array in pc.
Returns and shape. Dimensionless beta with radius shape.
- f(r)[source]#
Evaluate the radial Jeans integrating factor.
Notes
Inputs and units. r is a radius or NumPy radius array in pc.
Returns and shape. An arbitrarily normalized integrating factor with radius shape.
- integrand_kernel(u_integ, R)[source]#
Evaluate the inner Baes LOS-kernel integrand.
u_integis the dimensionless integration radius r/R and must exceed one; R is the positive projected radius in pc. Broadcasting follows NumPy. The endpoint at one is singular and must be handled by quadrature.
- 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.
- kernel(u, R, **kwargs)[source]#
Evaluate the spherical LOS projection kernel.
Notes
Inputs and units. u=r/R>=1 is dimensionless; R is projected radius in pc; broadcastable arrays. The Baes numerical implementation takes fixed quadrature n through kwargs.
Returns and shape. Dimensionless kernel on the (R.size, u.size) Cartesian grid, after flattening both inputs. Scalar inputs return shape (1,1).
- name = 'BaesAnisotropyModel'#
- 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.
- required_models = {}#
- required_param_names = ['beta_0', 'beta_inf', 'r_a', 'eta']#
- 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.