dodal.devices.oav.utils#
Classes
Enum to store the types of image to tweak the output array. |
Functions
|
|
|
Get the x, y, z position of a pixel in mm |
|
Preprocess the image array data (convert to grayscale and apply a gaussian blur) Image is converted to grayscale (using a weighted mean as green contributes more to brightness) as we aren't interested in data relating to colour. |
Calculate the required move so that the given pixel is in the centre of the beam. |
|
|
Exceptions
|
- 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]#
- dodal.devices.oav.utils.get_move_required_so_that_beam_is_at_pixel(gonio: XYZOmegaStage, pixel: tuple[int, int], oav: OAV) Generator[Msg, None, ndarray][source]#
Calculate the required move so that the given pixel is in the centre of the beam.
- dodal.devices.oav.utils.calculate_x_y_z_of_pixel(current_x_y_z, current_omega, pixel: tuple[int, int], beam_centre: tuple[int, int], microns_per_pixel: tuple[float, float], xyz_direction: tuple[int, int, int]) ndarray[source]#
Get the x, y, z position of a pixel in mm
- dodal.devices.oav.utils.wait_for_tip_to_be_found(ophyd_pin_tip_detection: PinTipDetection) Generator[Msg, None, tuple[int, int]][source]#
- dodal.devices.oav.utils.convert_to_gray_and_blur(data: Mat | ndarray) Mat | ndarray[source]#
Preprocess the image array data (convert to grayscale and apply a gaussian blur) Image is converted to grayscale (using a weighted mean as green contributes more to brightness) as we aren’t interested in data relating to colour. A blur is then applied to mitigate errors due to rogue hot pixels.
- Parameters:
data (
Union[Mat,ndarray])- Return type:
Union[Mat,ndarray]