dodal.devices.oav.oav_parameters.OAVConfigParams#

class dodal.devices.oav.oav_parameters.OAVConfigParams[source]#

The OAV parameters which may update depending on settings such as the zoom level.

Methods

calculate_beam_distance(horizontal_pixels, ...)

Calculates the distance between the beam centre and the given (horizontal, vertical).

get_beam_position_from_zoom(zoom, xsize, ysize)

Extracts the beam location in pixels xCentre yCentre, for a requested zoom level.

load_microns_per_pixel(zoom, xsize, ysize)

Loads the microns per x pixel and y pixel for a given zoom level.

update_on_zoom(value, xsize, ysize, *args, ...)

load_microns_per_pixel(zoom: float, xsize: int, ysize: int) None[source]#

Loads the microns per x pixel and y pixel for a given zoom level. These are currently generated by GDA, though hyperion could generate them in future.

Parameters:
Return type:

None

get_beam_position_from_zoom(zoom: float, xsize: int, ysize: int) Tuple[int, int][source]#

Extracts the beam location in pixels xCentre yCentre, for a requested zoom level. The beam location is manually inputted by the beamline operator on GDA by clicking where on screen a scintillator lights up, and stored in the display.configuration file.

Parameters:
Return type:

Tuple[int, int]

calculate_beam_distance(horizontal_pixels: int, vertical_pixels: int) Tuple[int, int][source]#

Calculates the distance between the beam centre and the given (horizontal, vertical).

Parameters:
  • horizontal_pixels (int) – The x (camera coordinates) value in pixels.

  • vertical_pixels (int) – The y (camera coordinates) value in pixels.

Return type:

Tuple[int, int]

Returns:

The distance between the beam centre and the (horizontal, vertical) point in pixels as a tuple (horizontal_distance, vertical_distance).