pymiediff.special.vsh

Contents

pymiediff.special.vsh#

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

Compute vector spherical harmonics with standard radial kernels.

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 j_n, 2 for y_n, 3 for h_n^(1).

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

Returns:

(M_o1n, M_e1n, N_o1n, N_e1n).

Return type:

tuple of torch.Tensor