efficiencies_mx
- miepython.core.efficiencies_mx(m, x, n_pole=0, field='Electric')[source]
Computes scattering and extinction efficiencies for a spherical particle using Mie theory.
Supports array inputs for wavelength-dependent calculations of the refractive index and size parameter.
- Parameters:
m (complex or array-like) – Complex refractive index of the sphere, defined as m = n - ik, where n is the real part (phase velocity) and k is the imaginary part (absorption). Can be a scalar or an array.
x (float or array-like) – Size parameter of the sphere, defined as x = π d / λ, where d is the diameter of the sphere and λ is the wavelength in the surrounding medium. Can be a scalar or an array.
n_pole (int) – Multipole order to compute: - If 0 (default), computes contributions from all multipoles. - If non-zero, computes contributions from the specified multipole order.
field (str) – If “Electric” (default) If n_pole>0, then True value returns the electric multipole contribution otherwise the Magnetic field contribution
- Returns:
tuple –
- qext (float or array-like):
Extinction efficiency, representing the total attenuation of light (scattering plus absorption) by the particle.
- qsca (float or array-like):
Scattering efficiency, representing the fraction of incident light scattered by the particle.
- qback (float or array-like):
Backscattering efficiency, describing the fraction of incident light scattered in the exact backward direction (theta = 180 degrees).
- g (float or array-like):
Asymmetry parameter, representing the average cosine of the scattering angle over all angles.
Notes
Ensure m and x have compatible dimensions if passed as arrays.
For accurate results, n_pole should be within the range of significant multipole contributions, typically n ~ x + 4*x**(1/3).
This implementation assumes spherical, homogeneous particles in a non-absorbing medium.
Examples
Compute efficiencies for a sphere with fixed parameters:
>>> import miepython as mie >>> mie.efficiencies(1.5 - 0.01j, 2.0, 0) (qext: 1.81, qsca: 1.72, qback: 0.27, g: 0.63)
Compute efficiencies for wavelength-dependent refractive indices:
>>> import miepython as mie >>> m_array = np.array([1.5 - 0.01j, 1.45 - 0.02j]) >>> x_array = np.array([2.0, 2.5]) >>> mie.efficiencies(m_array, x_array, 0) (qext: [1.81, 2.15], qsca: [1.72, 1.95], qback: [0.27, 0.31], g: [0.63, 0.70])