e_near

miepython.field.e_near(lambda0, d_sphere, m_sphere, n_env, r, theta, phi, include_incident=True, n_pole=0, abcd=None)[source]

Calculate the electric field in and around a sphere.

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.

  • r (float or ndarray) – Radial coordinate(s).

  • theta (float or ndarray) – Polar angle(s) in radians.

  • phi (float or ndarray) – Azimuth angle(s) in radians.

  • 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]. If provided, n_pole is ignored.

Returns:

ndarray

Spherical electric components [E_r, E_theta, E_phi] with

shape (3, ...).