desc.integrals.Bounce2D.pitch_quad
- static Bounce2D.pitch_quad(min_B, max_B, num_pitch, **kwargs)Source
Return 1/λ values and weights for quadrature between
min_Bandmax_B.- Parameters:
min_B (jnp.ndarray) – Minimum B value.
max_B (jnp.ndarray) – Maximum B value.
num_pitch (int or tuple[jnp.ndarray]) – If given an integer, this is interpreted as the resolution for a quadrature using Simpson’s 1/3 in the interior completed by an open midpoint scheme near the boundary. If given a tuple, then this is interpreted as the quadrature points xₖ and weights wₖ for the approximation of the integral ∫₋₁¹ f(x) dx ≈ ∑ₖ wₖ f(xₖ). Then this method simply rescales the quadrature for integration between
min_Bandmax_B.
- Returns:
pitch_inv, weight (tuple[jnp.ndarray]) – Shape (min_B.shape, num pitch). 1/λ values and weights.