sigmalos2#

jeanspy.model_jax.DSphModel.sigmalos2

Class and construction: DSphModel.

DSphModel.sigmalos2(R_pc, *, params, solver='auto', jit=None, n_u=None, n_r=None, n_kernel=None, u_max=None, kernel_backend='jax', u_min_eps=1e-06, kernel_outer_transform='sqrtlog', r_min_factor=0.5, dm_mass_method='auto', dm_mass_n_steps=None)[source]#

Compute sigma_los^2(R) via the requested solver.

solver may be 'abel', 'kernel', or 'auto'. When set to 'auto' the choice is made based on the anisotropy model: Baes –> Abel, constant/Osipkov-Merritt –> kernel (see benchmarks).

jit controls whether a cached jax.jit wrapper is used around the selected solver. None defaults to the cached JIT path.

R_pc must be a scalar or a nonempty 1-D array. Results are always 1-D (length one for a scalar). Only finite R_pc > 0 are supported; invalid elements return NaN in eager and JIT execution without contaminating other elements. R=0 needs a model-dependent central-limit solver.

dm_mass_method controls the dark-matter enclosed-mass solver and must be one of "auto", "analytic", or "numeric". The default "auto" follows the DM model’s autodiff-safe choice: analytic for NFW and numeric for Zhao. dm_mass_n_steps sets the numerical mass resolution independently of the outer Jeans grid. Analytic mass methods ignore this resolution.

For the kernel solver, the documented 1e-3 accuracy target applies to the sampled Plummer+NFW stress envelope described in the README. Outside that envelope, test convergence by increasing u_max first and then doubling n_u. The Abel solver has a separate radial-grid convergence control, n_r.

Notes

Inputs and units. Positive R_pc in pc, scalar or nonempty 1-D array; params contains physical scalars. Use the signature’s static numerical/solver options; n_u and n_kernel apply to the kernel route, n_r to the Abel grid, and dm_mass_n_steps to the mass integral. u_max controls the outer radial extent for both solvers.

Returns and shape. Always a one-dimensional array of variances in (km/s)^2, length one for scalar input.

Parameters:
Return type:

jax.Array