Optics#
- class deeptrack.optics.Optics(NA: float | Callable[[...], float] = 0.7, wavelength: float | Callable[[...], float] = 6.6e-07, magnification: float | Callable[[...], float] = 10, resolution: float | Callable[[...], float] = 1e-06, refractive_index_medium: float | Callable[[...], float] = 1.33, padding: Tuple[int, ...] | List[int] | ndarray | Callable[[...], Tuple[int, ...] | List[int] | ndarray] = (10, 10, 10, 10), output_region: Tuple[int, ...] | List[int] | ndarray | Callable[[...], Tuple[int, ...] | List[int] | ndarray] = (0, 0, 128, 128), pupil: Feature | None = None, illumination: Feature | None = None, upscale=1, **kwargs)#
Bases:
Feature
Abstract base optics class.
Provides structure and methods common for most optical devices.
Parameters#
- NAfloat
The NA of the limiting aperature.
- wavelengthfloat
The wavelength of the scattered light in meters.
- magnificationfloat
The magnification of the optical system.
- resolutionarray_like[float (, float, float)]
The distance between pixels in the camera. A third value can be included to define the resolution in the z-direction.
- refractive_index_mediumfloat
The refractive index of the medium.
- paddingarray_like[int, int, int, int]
Pads the sample volume with zeros to avoid edge effects.
- output_regionarray_like[int, int, int, int]
The region of the image to output (x,y,width,height). Default None returns entire image.
- pupilFeature
A feature-set resolving the pupil function at focus. The feature-set receive an unaberrated pupil as input.
Methods Summary
__call__
(sample, **kwargs)Execute the feature or pipeline.
Methods Documentation
- __call__(sample, **kwargs)#
Execute the feature or pipeline.
This method executes the feature or pipeline on the provided input and updates the computation graph if necessary. It handles overriding properties using additional keyword arguments.
The actual computation is performed by calling the parent __call__ method in the DeepTrackNode class, which manages lazy evaluation and caching.
Arguments#
- image_list‘Image’ or List[‘Image’], optional
The input to the feature or pipeline. If None, the feature uses previously set input values or propagates properties.
- **kwargsDict[str, Any]
Additional parameters passed to the pipeline. These override properties with matching names. For example, calling feature(x, value=4) executes feature on the input x while setting the property value to 4. All features in a pipeline are affected by these overrides.
Returns#
- Any
The output of the feature or pipeline after execution.