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:
1forj_n,2fory_n,3forh_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