pymiediff.special.pi_tau#
- pymiediff.special.pi_tau(n: int, mu: Tensor, **kwargs)#
angular functions tau and pi up to order n
calculated by recurrence relation. Returns all orders up to n, add a new “order” dimension (first dim) to the results
- Uses recurrence:
pi_0 = 0, pi_1 = 1 pi_{n+1} = ((2n+1)*mu*pi_n - (n+1)*pi_{n-1}) / n tau_n = n*mu*pi_n - (n+1)*pi_{n-1}
- Parameters:
n (torch.Tensor or int) – order, use max(n) if a tensor.
mu (torch.Tensor) – cosine of the angle
- Returns:
tuple (pi, tau).
- Return type:
turple