Darkfield#

class deeptrack.optics.Darkfield(illumination_angle: float = 1.5707963267948966, **kwargs: Dict[str, Any])#

Bases: Brightfield

Images coherently illuminated samples using Darkfield microscopy.

This class models Darkfield microscopy by creating a discretized volume where each pixel represents the effective refractive index of the sample. Light is propagated through the sample iteratively, first in the Fourier space and then corrected in the real space for refractive index.

Parameters#

illumination: Feature

Feature-set defining the complex field entering the sample. Default is a field with all values set to 1.

NA: float

Numerical aperture (NA) of the limiting aperture.

wavelength: float

Wavelength of the scattered light, in meters.

magnification: float

Magnification factor of the optical system.

resolution: array_like of float

Pixel spacing in the camera. Optionally includes a third value for z-direction resolution.

refractive_index_medium: float

Refractive index of the medium surrounding the sample.

padding: array_like of int

Padding for the sample volume to minimize edge effects. Format: (left, right, top, bottom).

output_region: array_like of int

Region of the image to output as (x, y, width, height). If None (default), the entire image is returned.

pupil: Feature

Feature-set defining the pupil function at focus. The feature-set takes an unaberrated pupil as input.

illumination_angle: float, optional

Angle of illumination relative to the optical axis, in radians. Default is π/2 radians.

Attributes#

illumination_angle: float

The angle of illumination, stored for reference.

Methods#

get(illuminated_volume, limits, fields, **kwargs)

Retrieves the darkfield image of the illuminated volume.

Examples#

Creating a Darkfield instance:

>>> import deeptrack as dt
>>> darkfield = dt.Darkfield(NA=0.9, wavelength=0.532e-6)
>>> print(darkfield.illumination_angle())
1.5707963267948966

Methods Summary

get(illuminated_volume, limits, fields, **kwargs)

Retrieve the darkfield image of the illuminated volume.

Methods Documentation

get(illuminated_volume: Tuple[complex, ...] | List[complex] | ndarray, limits: Tuple[int, ...] | List[int] | ndarray, fields: Tuple[complex, ...] | List[complex] | ndarray, **kwargs: Dict[str, Any]) Image#

Retrieve the darkfield image of the illuminated volume.

Parameters#

illuminated_volume: array_like

The volume of the sample being illuminated.

limits: array_like

The spatial limits of the volume.

fields: array_like

The fields interacting with the sample.

**kwargs: Dict[str, Any]

Additional parameters passed to the super class’s get method.

Returns#

numpy.ndarray

The darkfield image obtained by calculating the squared absolute difference from 1.