h_near_cartesian

miepython.field.h_near_cartesian(lambda0, d_sphere, m_sphere, n_env, x, y, z, include_incident=True, n_pole=0, abcd=None)[source]

Calculate magnetic near field in Cartesian coordinates.

Parameters:
  • lambda0 (float) – Vacuum wavelength.

  • d_sphere (float) – Sphere diameter.

  • m_sphere (complex) – Sphere refractive index.

  • n_env (float) – Refractive index of the surrounding medium.

  • x (float or ndarray) – Cartesian x coordinate(s).

  • y (float or ndarray) – Cartesian y coordinate(s).

  • z (float or ndarray) – Cartesian z coordinate(s).

  • include_incident (bool) – Include incident field for points outside sphere.

  • n_pole (int) – Requested multipole order. 0 means automatic truncation.

  • abcd (ndarray or None) – Optional precomputed coefficients [a, b, c, d].

Returns:

ndarray – Cartesian magnetic components [H_x, H_y, H_z].