module documentation

OpenFlexure Microscope autofocus module.

This module defines a Thing that is responsible for using the stage and camera together to perform an autofocus routine, and for collecting stacks of images (a 'z-stack').

See repository root for licensing information.

Class AutofocusThing The Thing concerned with combinations of z axis movements and the camera.
Class CaptureInfo The information from a capture in a z_stack.
Class JPEGSharpnessMonitor A class with direct access to the CameraThing for monitoring the MJPEG stream.
Class SharpnessDataArrays A BaseModel with the position and sharpness data from JPEGSharpnessMonitor.
Class StackParams A class for holding for stack parameters, and returning computed ones.
Variable SharpnessMonitorDep Undocumented
Function _get_capture_by_id Return the capture from a list of CaptureInfo objects with the matching id.
Function _get_capture_index_by_id Return the index of the capture with the matching id.
SharpnessMonitorDep = (source)

Undocumented

def _get_capture_by_id(captures: list[CaptureInfo], buffer_id: int) -> CaptureInfo: (source)

Return the capture from a list of CaptureInfo objects with the matching id.

Parameters
captures:list[CaptureInfo]A list of capture objects
buffer_id:intThe buffer id of the image to return
Returns
CaptureInfothe CaptureInfo object of the capture with matching id
Raises
ValueErrorif buffer_id does not match the buffer_id of any captures
def _get_capture_index_by_id(captures: list[CaptureInfo], buffer_id: int) -> int: (source)

Return the index of the capture with the matching id.

Parameters
captures:list[CaptureInfo]A list of capture objects
buffer_id:intThe buffer id of the image to return
Returns
intthe list index of the capture with matching id
Raises
ValueErrorif buffer_id does not match the buffer_id of any captures