AFL.automation.shared.samplecells#

Geometry and diagnostic plotting for shared sample-cell image pipelines.

Classes

ImageProcessing()

Provide circular ROI, RGB, background, and turbidity processing.

NeutronSampleCell()

Describe the circular optical region of a neutron sample cell.

Path(*args, **kwargs)

PurePath subclass that can make system calls.

class AFL.automation.shared.samplecells.NeutronSampleCell[source]#

Describe the circular optical region of a neutron sample cell.

This is deliberately not a Driver. Instrument drivers inherit it alongside Driver to share the cell’s crop, circular ROI, and geometry plots while retaining their own camera acquisition and measurement logic.

geometry_defaults = {'col_crop': [0, 479], 'hough_radii': 98, 'row_crop': [0, 479]}#
extract_sample_image(image, *, row_crop=None, col_crop=None, hough_radii=None, color_order='RGB')[source]#

Crop image to the cell and locate its circular sample region.

save_geometry_plot(raw_image, sample_image, *, save_path, filename, title='Detected neutron sample-cell region', color_order='RGB', overlay_mask=None, show_full_image_axes=True, full_image_x_label='px', full_image_y_label='py')[source]#

Save a raw-frame crop and circular-ROI diagnostic plot.

When show_full_image_axes is true, retain the full-frame pixel coordinate ticks and label its x/y axes with the supplied labels.

save_mask_comparison_plot(reference_image, measurement_image, mask, *, save_path, filename, title, invert_mask=False)[source]#

Save a shared reference/measurement mask diagnostic plot.