mxcubecore.HardwareObjects.abstract.AbstractCollect#

Abstract hardware object for data collection.

Classes

AbstractCollect(name)

Abstract hardware object for data collection.

BeamlineConfig(synchrotron_name, ...)

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

Bases: HardwareObject, object

Abstract hardware object for data collection.

Define a sequence in which data collection is executed.

Emits:
  • collectReady (bool)

  • collectOscillationStarted (dict)

  • progressInit (tuple[str, int, bool]) – For example: ("Collection", progress, bool).

  • collectOscillationFailed (dict)

  • collectOscillationFinished (dict)

  • progressStop

close_detector_cover()[source]#

Close detector cover.

close_fast_shutter()[source]#

Close fast shutter.

close_safety_shutter()[source]#

Close safety shutter.

collect(owner, dc_parameters_list)[source]#

Main collection method.

It spawns “do_collect” as well as ready event handling.

Parameters:
  • owner (str) – Owner instance.

  • dc_parameters_list (list[dict]) – List of dictionary containing all collection parameters.

collection_failed(failed_msg=None)[source]#

Collection failed method

collection_finished()[source]#

Collection finished behaviour

collection_stopped()[source]#

Collection stopped method

create_directories(*args)[source]#

Creates folders on disk.

Parameters:

args (list(str)) – List of directories to create.

create_file_directories()[source]#

Method to create directories for raw and processing files.

Directory names for xds, mosflm and hkl are created.

data_collection_cleanup()[source]#

Method called when at end of data collection, successful or not.

abstract data_collection_hook()[source]#

Descript. :

do_collect(owner)[source]#

Actually collect the sequence.

Parameters:

owner (str) – owner instance

get_beam_size() tuple[source]#

Get beam size.

Returns:

Beam width, and beam height.

Return type:

tuple

get_cryo_temperature() float[source]#

Get cryogenic temperature.

Returns:

Current cryo temperature [K].

Return type:

float

get_detector_distance() float[source]#

Get current detector distance.

Returns:

Current detector distance position [mm].

Return type:

float

get_machine_current() float[source]#

Get machine current.

Returns:

Machine current [mA].

Return type:

float

get_machine_fill_mode() str[source]#

Get machine fill mode.

Returns:

Machine filling mode.

Return type:

str

get_machine_message() str[source]#

Get machine message.

Returns:

Current machine message if any.

Return type:

str

get_measured_intensity() float[source]#

Get beam intensity.

Returns:

Beam intensity.

Return type:

float

get_resolution() float[source]#

Get current resolution.

Returns:

Current resolution [Å].

Return type:

float

get_sample_info() None[source]#

Get current sample information in LIMS database.

Information is stored in the internal “current_dc_parameters” dictionary.

Return type:

None

get_slit_gaps() tuple[source]#

Get slit gap distance.

Returns:

Horizontal gap, and vertical gap.

Return type:

tuple

get_transmission() float[source]#

Get current beamline transmission.

Returns:

Current transmission.

Return type:

float

get_undulators_gaps() dict[source]#

Get undulator gaps.

Returns:

Undulator gaps.

Return type:

dict

get_wavelength() float[source]#

Get current wavelength.

Returns:

Current beamline wavelength [Ä].

Return type:

float

init()[source]#

‘public’ post-initialization method. Override as needed.

For ConfiguredObjects called after loading contained objects.

move_to_centered_position() None[source]#

Move motors to the centered position.

Move motors to the centered position as stored in “current_dc_parameters” dictionary.

Return type:

None

open_detector_cover()[source]#

Open detector cover.

open_fast_shutter()[source]#

Open fast shutter.

open_safety_shutter()[source]#

Open safety shutter.

prepare_input_files() tuple[str | None, str | None, str | None][source]#

Prepare input files for xds, mosflm and hkl2000.

Return type:

tuple[str | None, str | None, str | None]

setCentringStatus(status)[source]#

Descript. :

set_beamline_configuration(**configuration_parameters) None[source]#

Sets beamline configuration

Parameters:

configuration_parameters (dict) – Configuration parameters.

Return type:

None

set_energy(value: float)[source]#

Set energy.

Parameters:

value (float) – Energy value to set.

set_fast_characterisation(arg)[source]#

Descript. :

set_helical(arg)[source]#

Descript. :

set_helical_pos(arg)[source]#

Descript. :

set_mesh_scan_parameters(num_lines: int, total_nb_frames: int, mesh_center_param: tuple, mesh_range_param: tuple) None[source]#

Set the mesh scan parameters.

Parameters:
  • num_lines (int) –

  • total_nb_frames (int) –

  • mesh_center_param (tuple) –

  • mesh_range_param (tuple) –

Return type:

None

set_resolution(value: float)[source]#

Set resolution.

Parameters:

value (float) – Resolution value to set.

set_transmission(value: float)[source]#

Set transmission.

Parameters:

value (float) – Transmission value to set.

set_wavelength(value: float)[source]#

Set wavelength.

Parameters:

value (float) – Wavelength value to set.

stop_collect()[source]#

Stop data collection.

store_data_collection_in_lims()[source]#

Store current data collection information in LIMS database.

store_image_in_lims(frame_number: int, motor_position_id: int | None = None)[source]#

Store image information in LIMS database.

Parameters:
  • frame_number (int) – Frame number of the image within the data collection.

  • motor_position_id (int | None) – Motor position ID.

store_sample_info_in_lims()[source]#

Store current sample information in LIMS database.

take_crystal_snapshots() None[source]#

Take crystal snapshots of the currently loaded sample.

Return type:

None

abstract trigger_auto_processing(process_event, frame_number)[source]#

Descript. :

update_data_collection_in_lims() None[source]#

Update current data collection information in LIMS database.

Return type:

None

update_lims_with_workflow(workflow_id: int, grid_snapshot_filename: str) None[source]#

Update collection with information about workflow.

Parameters:
  • workflow_id (int) – Workflow ID.

  • grid_snapshot_filename (str) – Grid snapshot file path.

Return type:

None

class mxcubecore.HardwareObjects.abstract.AbstractCollect.BeamlineConfig(synchrotron_name, directory_prefix, default_exposure_time, minimum_exposure_time, detector_fileext, detector_type, detector_manufacturer, detector_model, detector_px, detector_py, detector_binning_mode, undulators, focusing_optic, monochromator_type, beam_divergence_vertical, beam_divergence_horizontal, polarisation, input_files_server)#

Bases: tuple

beam_divergence_horizontal#

Alias for field number 15

beam_divergence_vertical#

Alias for field number 14

default_exposure_time#

Alias for field number 2

detector_binning_mode#

Alias for field number 10

detector_fileext#

Alias for field number 4

detector_manufacturer#

Alias for field number 6

detector_model#

Alias for field number 7

detector_px#

Alias for field number 8

detector_py#

Alias for field number 9

detector_type#

Alias for field number 5

directory_prefix#

Alias for field number 1

focusing_optic#

Alias for field number 12

input_files_server#

Alias for field number 17

minimum_exposure_time#

Alias for field number 3

monochromator_type#

Alias for field number 13

polarisation#

Alias for field number 16

synchrotron_name#

Alias for field number 0

undulators#

Alias for field number 11