AFL.automation.instrument.OpticalTurbidity#

Functions

canny(image[, sigma, low_threshold, ...])

Edge filter an image using the Canny algorithm.

hough_circle(image, radius[, normalize, ...])

Perform a circular Hough transform.

hough_circle_peaks(hspaces, radii[, ...])

Return peaks in a circle Hough transform.

img_as_ubyte(image[, force_copy])

Convert an image to 8-bit unsigned integer format.

rgb2gray(rgb, *[, channel_axis])

Compute luminance of an RGB image.

Classes

Driver(name[, defaults, overrides, ...])

Eq(key, value)

Query equality of a given key's value to the specified value.

OpticalTurbidity([camera, overrides])

class AFL.automation.instrument.OpticalTurbidity.OpticalTurbidity(camera=None, overrides=None)[source]#
defaults = {'camera_index': 0, 'camera_interface': 'http', 'camera_url': 'http://afl-video:8081/103/current', 'col_crop': [0, 479], 'empty_uuid': '', 'hough_radii': 98, 'row_crop': [0, 479], 'save_path': '/home/afl642/2305_SINQ_TurbidityImages/'}#
__init__(camera=None, overrides=None)[source]#

Initialize OpticalTurbidity calculator driver

Parameters:#

cameraobject, optional

Camera object (e.g., NetworkCamera instance). If None, will be created based on camera_interface config setting.

overridesdict, optional

Configuration overrides for PersistentConfig

measure(set_empty=False, plotting=False, **kwargs)[source]#

This is an optical turbidity measurement observing the sans cell#

Parameters:#

set_emptybool, optional

If True, sets the current image as the empty reference image

plottingbool, optional

If True, saves diagnostic plots

**kwargsdict

Additional arguments passed to image collection

Configuration:#

The image source is controlled by PersistentConfig settings: - camera_interface: ‘http’ or ‘opencv’ (default: ‘http’) - camera_url: URL for HTTP interface (required when camera_interface=’http’) - camera_index: Device index for OpenCV interface (required when camera_interface=’opencv’)

Returns:#

xarray.Dataset or tuple

If set_empty=True, returns (0, [0,0]) Otherwise returns xarray.Dataset with turbidity measurements and images