harmonics#

deeptrack.backend.mie.harmonics(x: ndarray, L: int) Tuple[ndarray, ndarray]#

Calculate the spherical harmonics of the Mie field.

The harmonics are calculated up to order L using an iterative method.

Parameters#

xnp.ndarray

An array representing the cosine of the polar angle (theta) for each evaluation point relative to the scattering particle’s center (the origin). The polar angle is the angle between the z-axis (aligned with the direction of wave propagation) and the vector from the particle’s center to the evaluation point.

Values in x should lie in the range [-1, 1], where x = 1 corresponds to theta = 0° (point directly forward along the z-axis), x = -1 corresponds to theta = 180° (point directly backward along the z-axis), and x = 0 corresponds to theta = 90° (point perpendicular to the z-axis).

Lint

The order up to which to evaluate the harmonics.

Returns#

Tuple[np.ndarray, np.ndarray]

A tuple containing arrays of harmonics PI and TAU of shape (L, *x.shape).