clenspy.utils.compute_sigma_grid¶
- clenspy.utils.compute_sigma_grid(xi_func, Rvec, zvec, method='trapz', rmax_integral=1000.0, n_points=100)[source]¶
Dispatch and run the chosen integration method for Sigma(R, z). Returns grid of shape (nR, nz).
The single entry point for the line-of-sight Abel projection of xi(r, z): “leggauss” (Gauss-Legendre, the fast smooth-integrand choice), “trapz” (vectorized trapezoid on the cosh-substituted grid, the robust default), or “quad_vec” (adaptive, the accuracy reference). All three integrate in the substituted variable t = u/(1+u), r = R cosh(u) – do not replace this with np.trapz over a linear r grid, which under-resolves the integrable 1/sqrt(r^2 - R^2) edge.
- Return type: