MieStratifiedSphere#

class deeptrack.scatterers.MieStratifiedSphere(radius: Tuple[float, ...] | List[float] | ndarray | Callable[[...], Tuple[float, ...] | List[float] | ndarray] = [1e-06], refractive_index: Tuple[float, ...] | List[float] | ndarray | Callable[[...], Tuple[float, ...] | List[float] | ndarray] = [1.45], **kwargs)#

Bases: MieScatterer

Scattered field by a stratified sphere

A stratified sphere is a sphere with several concentric shells of uniform refractive index.

Should be calculated on at least a 64 by 64 grid. Use padding in the optics if necessary

Calculates the scattered field in a homogenous medium, as predicted by Mie theory. Note that the induced phase shift is calculated in comparison to the refractive_index_medium property of the optical device.

Parameters#

radius: list of float

The radius of each cell in increasing order.

refractive_index: list of float

Refractive index of each cell in the same order as radius.

L: int or str

The number of terms used to evaluate the mie theory. If “auto”, it determines the number of terms automatically.

position: array_like[float, float (, float)]

The position of the particle. Third index is optional, and represents the position in the direction normal to the camera plane.

z: float

The position in the direction normal to the camera plane. Used if position is of length 2.

offset_z: “auto” or float

Distance from the particle in the z direction the field is evaluated. If “auto”, this is calculated from the pixel size and collection_angle.

collection_angle: “auto” or float

The maximum collection angle in radians. If “auto”, this is calculated from the objective NA (which is true if the objective is the limiting aperature).

input_polarization: float or Quantity

Defines the polarization angle of the input. For simulating circularly polarized light we recommend a coherent sum of two simulated fields. For unpolarized light we recommend a incoherent sum of two simulated fields.

output_polarization: float or Quantity or None

If None, the output light is not polarized. Otherwise defines the angle of the polarization filter after the sample. For off-axis, keep the same as input_polarization.