dodal.devices.oav.snapshots.snapshot_image_processing#
Functions
Compute the location of the beam centre in pixels on a reference image. |
|
|
Draw a crosshair at the beam centre coordinates specified. |
- dodal.devices.oav.snapshots.snapshot_image_processing.draw_crosshair(image: Image, beam_x: int, beam_y: int)[source]#
Draw a crosshair at the beam centre coordinates specified.
- dodal.devices.oav.snapshots.snapshot_image_processing.compute_beam_centre_pixel_xy_for_mm_position(sample_pos_mm: tuple[float, float], beam_pos_at_origin_px: tuple[int, int], microns_per_pixel: tuple[float, float]) tuple[int, int][source]#
Compute the location of the beam centre in pixels on a reference image.
- Parameters:
sample_pos_mm (tuple[float, float]) – x, y location of the sample in mm relative to when the reference image was taken.
beam_pos_at_origin_px (Pixel) – x, y position of the beam centre in the reference image (pixels).
microns_per_pixel (tuple[float, float]) – x, y scaling factor relating the sample position to the position in the image.
- Returns:
x, y location of the beam centre (pixels).
- Return type:
Pixel