API documentation#
pyMieDiff - Mie + auto-diff
Mie theory for core-shell particles, implemted in pytorch.
API#
Particle class#
The pymiediff.Particle class describes core-shell particles
and provides high-level access to the main functionalities:
|
Spherical particle container used by high-level pymiediff workflows. |
Multishell#
This contains the multishell Mie coefficients and observables like cross sections, angular scattering and near-fields
Vectorized Mie solvers for spherical particles. |
Materials#
pymiediff contains pyTorch autodiff classes to interpolate tabulated material permittivities, compatible with the refractiveindex.info format.
material optical properties |
Special#
pymiediff contains pyTorch autodiff comptible spherical bessel functions and their derivatives.
Helper#
pyMieDiff contains tools e.g. for truncation critera, interpolation, numerical gradients.
Multilayer Mie Coefficients#
pymiediff.multishell.mie_coefficients now accepts optional multilayer inputs:
r_layers: layer outer radii, shape(L,)or(N_part, L)eps_layers: layer permittivities, shape(L,),(N_part, L),(L, N_k0), or(N_part, L, N_k0)backend="pena": Peña/Pal (Yang-recursive) multilayer evaluation
The legacy core-shell arguments (r_c, r_s, eps_c, eps_s) remain
supported and map internally to the layer representation.
The legacy module name pymiediff.coreshell is kept as a compatibility
shim and re-exports pymiediff.multishell.
Current limitation:
for
backend="pena", only external coefficientsa_nandb_nare implemented in this phase;return_internal=Trueis not available yet.