pymiediff.coreshell.ab#
- pymiediff.coreshell.ab(x, y, n, m1, m2, backend='torch', which_jn='stable', precision='double')#
an and bn scattering coefficients
optimised to call the bessel functions the lowest amount of times
Absorption and scattering of light by small particles. Pg. 183 and Equ. 8.1.
- Parameters:
x (torch.Tensor) – size parameter (core)
y (torch.Tensor) – size parameter (shell)
n (torch.Tensor) – orders to compute
m1 (torch.Tensor) – relative refractive index of core
m2 (torch.Tensor) – relative refractive index of shell
backend (str, optional) – backend to use for spherical bessel functions. Either ‘scipy’ or ‘torch’. Defaults to ‘scipy’.
which_jn (str, optional) – only for “torch” backend. Which algorithm for j_n to use. Either ‘stable’ or ‘fast’. Defaults to ‘stable’.
precision (str, optional) – “single” our “double”. defaults to “double”.
- Returns:
result
- Return type:
torch.Tensor