xopto.pf.mieml module

class MieMl(nlayers: float, nmedium: float, diameters: List[float], wavelength: float)[source]

Bases: xopto.pf.pfbase.PfBase

Constructor of a Mie scattering phase function for multilayered spherical particles.

Parameters
  • nlayers (float, complex, list, tuple, numpy.ndarray vector) – Refractive indices (complex) of the concentric spherical layers, starting with the refractive index of the innermost layer.

  • nmedium (float, complex) – Refractive index (complex) of the surrounding medium.

  • diameters (float, list, tuple, numpy.ndarray vector) – Diameters of the concentric spherical layers (m), starting with the innermost layer.

  • wavelength (float) – Wavelength of light (m).

Examples

Scattering phase function at 550 nm for a hollow SiO2 spherical particle with a wall thickness that matches 5% of the outer diameter. Refractive index of SiO2 is set to 1.45 and refractive index of water to 1.33. The hollow space is given a refractive index of 1.0.

>>> import numpy as np
>>> from matplotlib import pyplot as pp
>>>
>>> cos_theta = np.linspace(-1.0, 1.0, 1000)
>>>
>>> pp.figure()
>>> for d in [0.1, 0.5, 1, 2, 5]:
>>>   pf = MieMl([1.0, 1.45], 1.33, [0.9*d*1e-6, d*1e-6], 550e-9)
>>>   pp.semilogy(cos_theta, pf(cos_theta), label='Hollow d={:1f} um'.format(d))
>>> pp.legend()
acs()float[source]

Returns the absorption cross section.

ecs()float[source]

Returns the extinction cross section.

fastg(n: int, *args, **kwargs)float[source]

Overloads the fastg() method of the base class. .. note:: If n is 1, a precalculated g1 is returned.

g(n: int, **kwargs)float[source]

Overloads the PfBase.g() method of the base class. Computes the n-th Legendre moment of the scattering phase function.

Note

If n is 1, a precalculated g1 is returned.

scs()float[source]

Returns the scattering cross section.