mxcubecore.HardwareObjects.Gphl.GphlWorkflow#

Workflow runner, interfacing to external workflow engine using Abstract Beamline Interface messages

License:

This file is part of MXCuBE.

MXCuBE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MXCuBE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MXCuBE. If not, see <https://www.gnu.org/licenses/>.

Classes

GphlWorkflow(name)

Global Phasing workflow runner.

GphlWorkflowStates(value)

BUSY = "Workflow is executing" READY = "Workflow is idle and ready to start" FAULT = "Workflow shutting down from an error" ABORTED = "HWorkflow shutting down after an abort or stop command COMPLETED = "Workflow has finished successfully" UNKNOWN = "Workflow state unknown"

class mxcubecore.HardwareObjects.Gphl.GphlWorkflow.GphlWorkflow(name)[source]#

Bases: HardwareObjectYaml

Global Phasing workflow runner.

SPECIFIC_STATES#

alias of GphlWorkflowStates

adjust_dose(values)[source]#

When transmission, image_width, exposure_time or repetition_count changes, update experiment_time and use_dose in parameter popup, and reset warnings

adjust_transmission(values)[source]#

When use_dose changes, update transmission and/or exposure_time In parameter popup

calculate_recentring(okp, ref_okp, ref_xyz)[source]#

Calculate predicted traslation values using recen okp is the omega,gamma,phi tuple of the target position, ref_okp and ref_xyz are the reference omega,gamma,phi and the corresponding x,y,z translation position

collect_centring_snapshots(file_name_prefix='snapshot')[source]#
Parameters:

file_name_prefix – str

Returns:

echo_info_string(payload, correlation_id=None)[source]#

Print text info to console,. log etc.

get_available_workflows()[source]#

Get list of workflow description dictionaries.

get_emulation_crystal_data(sample_name=None)[source]#

If sample is a test data set for emulation, get crystal data

Returns:

Optional[str]

get_emulation_sample_dir(sample_name=None)[source]#

If sample is a test data set for emulation, get test data directory :param sample_name Optional[str]:

Returns:

get_emulation_samples()[source]#

Get list of lims_sample information dictionaries for mock/emulation

Returns: LIST[DICT]

handle_collection_end(dummy1, dummy2, dummy3, dummy4, dummy5, collect_dict)[source]#

Read and process collectOscillationFinished signal which means scan finished successfully

handle_collection_start(owner, blsampleid, barcode, location, collect_dict, osc_id)[source]#

Read and process collectOscillationStarted signal Used to set actual centring positions

NB only collect_dict is reliably non-null

init()[source]#

Object initialisation - executed after loading contents

static maximum_dose_rate(energy=None)[source]#

Calculate dose rate at average flux density for transmission=100

NB put here rather than in AbstractFlux as assumptions inherent in using averaging to calculate dose rates are felt to be ungeneric

Parameters:

energy (Optional[float]) – Beam enrgy in keV. Defaults to current beamline v alue

Returns:

Maximum dose rate in MGy/s

Return type:

float

parse_indexing_solution(choose_lattice)[source]#
Parameters:

GphlMessages.ChooseLattice (choose_lattice) –

Returns: tuple

post_execute()[source]#

The workflow has finished, sets the state to ‘READY’

query_collection_strategy(geometric_strategy)[source]#

Display collection strategy for user approval, and query parameters needed

query_pre_strategy_params(choose_lattice=None)[source]#

Query pre_strategy parameters.

Used for both characterisation, diffractcal, and acquisition

Parameters:

( (choose_lattice) – obj: ChooseLattice, optional): ChooseLattice message

Returns:

Parameter value dictionary

Return type:

dict

resolution2dose_budget(resolution, decay_limit=None, maximum_dose_budget=None, relative_rad_sensitivity=1.0)[source]#
Parameters:
  • resolution (float) – resolution in A

  • decay_limit (float) – min. intensity at resolution edge at experiment end (%)

  • maximum_dose_budget (float) – maximum allowed dose budget

  • relative_rad_sensitivity (float) – relative radiation sensitivity of crystal

Returns (float): Dose budget (MGy)

Get resolution-dependent dose budget that gives intensity decay_limit% at the end of acquisition for reflections at resolution assuming an increase in B factor of 1A^2/MGy

setup_data_collection(payload, correlation_id)[source]#
Parameters:
  • (GphlMessages.GeometricStrategy (payload) – GeometricStrategy message

  • correlation_id (str) – Astra workflow correlation ID

Returns:

Return message with collection parameters

Return type:

GphlMessages.SampleCentred

shutdown()[source]#

Shut down workflow and connection. Triggered on program quit.

update_indexing_solution(values)[source]#

Update pulldowns when selected indexing solution changes

update_lattice(values)[source]#

Update pulldowns when crystal lattice changes

update_point_groups(values)[source]#

Update pulldowns when pointgroups change

update_space_group(values)[source]#

Update pulldowns when space_group changes

update_state(state=None)[source]#

Update state, resetting

class mxcubecore.HardwareObjects.Gphl.GphlWorkflow.GphlWorkflowStates(value)[source]#

Bases: Enum

BUSY = “Workflow is executing” READY = “Workflow is idle and ready to start” FAULT = “Workflow shutting down from an error” ABORTED = “HWorkflow shutting down after an abort or stop command COMPLETED = “Workflow has finished successfully” UNKNOWN = “Workflow state unknown”