glmt

Description

The glmt class implements Mie theory within the Generalized Lorenz-Mie Theory (GLMT) framework to compute scattering coefficients for a spherical scatterer. It calculates the Mie coefficients \(a_j\), \(b_j\), \(c_j\), and \(d_j\) for electric and magnetic multipoles, supporting both one-dimensional and two-dimensional parameter spaces (e.g., refractive index and size parameter). The class precomputes spherical Bessel and Hankel functions for efficiency. Expressions for the Mie coefficients are taken from Ch. 4 in Bohren(Craig F.Bohren 2004).

Initialization

Creating an instance of the glmt class initializes the Mie coefficients and precomputes spherical Bessel and Hankel functions for the specified parameters. The class supports both scalar and array inputs for flexibility in analyzing multiple configurations.

glmt(maxJ, wl, nr, x, mu=1, mu1=1, dim=None)

int — maximum total angular momentum quantum number.

float or array — wavelength of the incident field (in microns).

float or array — relative refractive index of the scatterer.

float or array — size parameter (\(k r\), where \(k = 2\pi / \lambda\) and \(r\) is the scatterer radius).

float — relative permeability of the scatterer (default is 1).

float — relative permeability of the medium (default is 1).

int or None — dimensionality of the parameter space: 1 for coupled nr and wl arrays, None for 2D meshgrid (default is None).

Methods


Computes the Mie scattering coefficient \(a_j\) for electric multipoles up to maxJ. The coefficient is given by: \[a_j = \frac{\mu n_r^2 j_j(n_r x) [x j_j(x)]' - \mu_1 j_j(x) [n_r x j_j(n_r x)]'}{\mu n_r^2 j_j(n_r x) [x h_j(x)]' - \mu_1 h_j(x) [n_r x j_j(n_r x)]'},\] where \(j_j\) is the spherical Bessel function, \(h_j\) is the spherical Hankel function of the first kind, \(n_r\) is the relative refractive index, \(\mu\) and \(\mu_1\) are permeabilities, and \([f(x)]' = f(x) + x f'(x)\). Returns an array of shape (maxJ+1, ...).


Computes the Mie scattering coefficient \(b_j\) for magnetic multipoles up to maxJ. The coefficient is given by: \[b_j = \frac{\mu_1 j_j(n_r x) [x j_j(x)]' - \mu j_j(x) [n_r x j_j(n_r x)]'}{\mu_1 j_j(n_r x) [x h_j(x)]' - \mu h_j(x) [n_r x j_j(n_r x)]'},\] where variables are as defined for \(a_j\). Returns an array of shape (maxJ+1, ...).


Computes the Mie internal coefficient \(c_j\) for magnetic multipoles up to maxJ. The coefficient is given by: \[c_j = \frac{\mu_1 j_j(x) [x h_j(x)]' - \mu_1 h_j(x) [x j_j(x)]'}{\mu_1 j_j(n_r x) [x h_j(x)]' - \mu h_j(x) [n_r x j_j(n_r x)]'},\] where variables are as defined for \(a_j\). Returns an array of shape (maxJ+1, ...).


Computes the Mie internal coefficient \(d_j\) for electric multipoles up to maxJ. The coefficient is given by: \[d_j = \frac{\mu_1 n_r j_j(x) [x h_j(x)]' - \mu_1 n_r h_j(x) [x j_j(x)]'}{\mu n_r^2 j_j(n_r x) [x h_j(x)]' - \mu_1 h_j(x) [n_r x j_j(n_r x)]'},\] where variables are as defined for \(a_j\). Returns an array of shape (maxJ+1, ...).


Computes the spherical Hankel function of the first kind \(h_j(x) = j_j(x) + i y_j(x)\), or its derivative if derivative=True, where \(j_j\) and \(y_j\) are spherical Bessel functions of the first and second kinds, respectively.

Comments

The glmt class efficiently precomputes spherical Bessel and Hankel functions to calculate Mie coefficients for scattering and internal fields. It supports both 1D (coupled wavelength and refractive index) and 2D (meshgrid of size parameter and refractive index) parameter spaces. Ensure that wl, nr, and x are positive to avoid invalid physical configurations.

Craig F.Bohren, Donald R. Huffman. 2004. Absorption and Scattering of Light by Small Particles. Wiley-VCH.