pymiediff.special.vsh_pena

Contents

pymiediff.special.vsh_pena#

pymiediff.special.vsh_pena(n_max, k0, n_medium, r, theta, phi, kind, precision='double', epsilon=1e-08)#

Compute VSH terms using Peña log-derivative recurrences.

Parameters:
  • n_max (int) – Maximum multipole order.

  • k0 (torch.Tensor) – Vacuum wavevector.

  • n_medium (torch.Tensor) – Medium refractive index.

  • r (torch.Tensor) – Spherical coordinates.

  • theta (torch.Tensor) – Spherical coordinates.

  • phi (torch.Tensor) – Spherical coordinates.

  • kind (int) – Radial kernel selector: 1 for psi_n and 3 for zeta_n.

  • precision ({"single", "double"}, default="double") – Complex dtype selection.

  • epsilon (float, default=1e-8) – Small origin safeguard.

Returns:

(M_o1n, M_e1n, N_o1n, N_e1n).

Return type:

tuple of torch.Tensor