mxcubecore.HardwareObjects.abstract.AbstractDetector#

Detector API Abstract methods:

prepare_acquisition start_acquisition has_shutterless

Overloaded methods:

force_emit_signals

Implemented methods:

stop_acquisition get_pixel_size, get_width, get_heigth, get_metadata get_radius, get_outer_radius get_beam_position get_roi_mode, set_roi_mode, get_roi_mode_name, get_roi_modes get_exposure_time_limits get_threshold_energy, set_threshold_energy get_binning_mode, set_binning_mode

Implemented propertries:

distance

Emited signals:

detectorRoiModeChanged temperatureChanged humidityChanged expTimeLimitsChanged frameRateChanged stateChanged specificStateChanged

Hardware objects used: energy

Classes

AbstractDetector(name)

Common base class for detectors

class mxcubecore.HardwareObjects.abstract.AbstractDetector.AbstractDetector(name)[source]#

Bases: HardwareObject

Common base class for detectors

property distance#

Property for contained detector_distance hardware object :returns: Hardware object. :rtype: (AbstratctMotor)

force_emit_signals()[source]#

Emit all hardware object signals.

get_beam_position(distance=None, wavelength=None)[source]#

Calculate the beam position for a given distance. :param distance: detector distance [mm] :type distance: float :param wavelength: X-ray wavelength [Å] :type wavelength: float

Returns:

Beam position x,y coordinates [pixel].

Return type:

tuple(float, float)

get_binning_mode()[source]#

Get the current binning mode. :returns: Binning mode :rtype: (int)

get_exposure_time_limits()[source]#

Get the exposure time lower and upper limits. :returns: Two floats (lower and upper limit) [s] :rtype: (tuple)

get_first_and_last_file(pt: PathTemplate)[source]#

Get complete path to first and last image

Parameters:

pt (PathTempalte) – Path template parameter

Returns: (Tuple): Tuple containing first and last image path (first, last)

get_height()[source]#

Returns detector height. :returns: detector height [px] :rtype: (int)

get_metadata()[source]#

Returns relevant metadata. :returns: metadata :rtype: (dict)

get_outer_radius(distance=None)[source]#

Get distance from beam_position to the furthest point on the detector. :param distance: Distance [mm] :type distance: float

Returns:

Detector outer adius [mm]

Return type:

(float)

get_pixel_size()[source]#

Get the pixel size. :returns: Two floats (x, y) [mm]. :rtype: (tuple)

get_radius(distance=None)[source]#

Get distance from the beam position to the nearest detector edge. :param distance: Distance [mm] :type distance: float

Returns:

Detector radius [mm]

Return type:

(float)

get_roi_mode()[source]#

Get the current ROI mode. :returns: current ROI mode :rtype: (str)

get_roi_mode_name()[source]#

Get the current ROI mode name. :returns: name :rtype: (str)

get_roi_modes()[source]#

Get the available ROI modes :returns: Tuple of strings. :rtype: (tuple)

get_threshold_energy()[source]#

Returns detector threshold_energy :returns: Detector threshold energy [eV] :rtype: (float)

get_width()[source]#

Returns detector width. :returns: detector width [px] :rtype: (int)

abstract has_shutterless()[source]#

Check if detector is capable of shutterless acquisition. :returns: True if detector is capable, False otherwise :rtype: (bool)

init()[source]#

Initialise some common paramerters

last_image_saved()[source]#

Get the path to the last saved image :returns: full path. :rtype: (str)

abstract prepare_acquisition(*args, **kwargs)[source]#

Prepares detector for acquisition

set_binning_mode(value)[source]#

Set the current binning mode. :param value: binning mode. :type value: int

set_roi_mode(roi_mode)[source]#

Set the current ROI mode. :param roi_mode: ROI mode to set. :type roi_mode: int

set_threshold_energy(threshold_energy)[source]#
Parameters:

threshold_energy (float) – Detector threshold energy [eV]

abstract start_acquisition()[source]#

Start the acquisition.

stop_acquisition()[source]#

Stop the acquisition.