enclosed_mass#

jeanspy.model_jax.NFWModel.enclosed_mass

Class and construction: NFWModel.

NFWModel.enclosed_mass(r_pc, method='auto', *, params, n_steps=None)#

Return enclosed mass with a selectable analytic/numeric method.

The default auto method uses each model’s autodiff-safe default: analytic for NFW and numeric for Zhao. Pass method="analytic" to request a closed form explicitly, or method="numeric" for the autodiff-friendly numerical integral.

n_steps sets numerical mass resolution (Zhao: Gauss nodes per segment). None uses the model default; analytic methods ignore it.

Notes

Inputs and units. r_pc is scalar/array in pc; params is the physical dictionary. enclosed_mass accepts method=auto/analytic/numeric; numerical methods accept n_steps.

Returns and shape. Mass in Msun within min(r_pc, r_t_pc), matching radius shape. Invalid dynamic proposals yield NaN.

Parameters:
Return type:

jax.Array