FourierTransformTransformation#

class deeptrack.holography.FourierTransformTransformation(Tz, Tzinv, i, **kwargs)#

Bases: Feature

Applies a power of the forward or inverse propagation matrix to an optical field.

Parameters#

Tz: ndarray

Forward propagation matrix.

Tzinv: ndarray

Inverse propagation matrix.

i: int

Power of the propagation matrix to apply. Negative values apply the inverse.

Methods#

get(image: Image | np.ndarray, Tz: np.ndarray, Tzinv: np.ndarray, i: int, **kwargs: dict[str, Any]) -> Image | np.ndarray

Applies the power of the propagation matrix to the image.

Returns#

Image | np.ndarray

The transformed image.

Examples#

>>> import deeptrack as dt
>>> import numpy as np
>>> Tz = np.random.rand(128, 128) + 1j * np.random.rand(128, 128)
>>> Tzinv = 1 / Tz
>>> field = np.random.rand(128, 128, 2)
>>> transformed_field = dt.holography.FourierTransformTransformation(
>>>     Tz, Tzinv, i=2,
>>> )(field)

Methods Summary

get(image, Tz, Tzinv, i, **kwargs)

Applies the power of the propagation matrix to the image.

Methods Documentation

get(image: Image | np.ndarray, Tz: np.ndarray, Tzinv: np.ndarray, i: int, **kwargs: dict[str, Any]) Image | np.ndarray#

Applies the power of the propagation matrix to the image.

Parameters#

image: Image or ndarray

The image to transform.

Tz: np.ndarray

Forward propagation matrix.

Tzinv: np.ndarray

Inverse propagation matrix.

i: int

Power of the propagation matrix to apply. Negative values apply the inverse.

**kwargs: dict of str to Any

Additional keyword arguments.

Returns#

Image or ndarray

The transformed image.