dodal.devices.oav.utils#

Classes

ColorMode

Enum to store the various color modes of the camera.

EdgeOutputArrayImageType

Enum to store the types of image to tweak the output array.

Functions

bottom_right_from_top_left(top_left, ...)

param top_left:

calculate_x_y_z_of_pixel(current_x_y_z, ...)

param pixel:

get_move_required_so_that_beam_is_at_pixel(...)

Calculate the required move so that the given pixel is in the centre of the beam.

save_thumbnail(full_file_path, full_image[, ...])

Scales an image down to have the height specified in new_height and saves it to the same location as the full image with a t appended to the filename

wait_for_tip_to_be_found(ophyd_pin_tip_detection)

param ophyd_pin_tip_detection:

Exceptions

PinNotFoundException

dodal.devices.oav.utils.bottom_right_from_top_left(top_left: ndarray, steps_x: int, steps_y: int, step_size_x: float, step_size_y: float, um_per_pix_x: float, um_per_pix_y: float) ndarray[source]#
Parameters:
  • top_left (ndarray)

  • steps_x (int)

  • steps_y (int)

  • step_size_x (float)

  • step_size_y (float)

  • um_per_pix_x (float)

  • um_per_pix_y (float)

Return type:

ndarray

dodal.devices.oav.utils.get_move_required_so_that_beam_is_at_pixel(smargon: Smargon, pixel: Tuple[int, int], oav_params: OAVConfigParams) Generator[Msg, None, ndarray][source]#

Calculate the required move so that the given pixel is in the centre of the beam.

Parameters:
Return type:

Generator[Msg, None, ndarray]

dodal.devices.oav.utils.calculate_x_y_z_of_pixel(current_x_y_z, current_omega, pixel: Tuple[int, int], oav_params: OAVConfigParams) ndarray[source]#
Parameters:
Return type:

ndarray

dodal.devices.oav.utils.wait_for_tip_to_be_found(ophyd_pin_tip_detection: PinTipDetection) Generator[Msg, None, Tuple[int, int]][source]#
Parameters:

ophyd_pin_tip_detection (PinTipDetection)

Return type:

Generator[Msg, None, Tuple[int, int]]

dodal.devices.oav.utils.save_thumbnail(full_file_path: Path, full_image: Image, new_height=192)[source]#

Scales an image down to have the height specified in new_height and saves it to the same location as the full image with a t appended to the filename

Parameters:
  • full_file_path (Path)

  • full_image (Image)