M_odd

miepython.vsh.M_odd(n, lambda0, d_sphere, m_index, r, theta, phi)[source]

Compute the nth odd magnetic vector spherical harmonic (m=1).

This function calculates the odd-parity magnetic vector spherical harmonic, denoted as M_{omn}(rho), for the given multipole order n. The proper Bessel function is chosen based on whether the calculation is performed inside or outside the sphere.

The conventions used follow the “Vector Spherical Harmonics” Wikipedia page and Ladutenko’s paper (DOI: https://doi.org/10.1016/j.cpc.2017.01.017).

Parameters:
  • n (int) – Harmonic (1 for dipole, 2 for quadrupole, etc.).

  • lambda0 (float) – Wavelength in a vacuum.

  • d_sphere (float) – Diameter of the sphere.

  • m_index (complex) – Refractive index at position r.

  • r (float) – Radial distance from center of sphere.

  • theta (float) – Polar angle in radians (angle from z-axis).

  • phi (float) – Azimuthal angle in radians. (angle from x-axis).

Returns:

tuple – A tuple (M_r, M_theta, M_phi) representing the radial, polar, and azimuthal components of the odd magnetic vector spherical harmonic.