mxcubecore.HardwareObjects.ISPyBClient#

Functions

in_greenlet(fun)

test_hwo(hwo)

trace(fun)

utf_decode(res_d)

utf_encode(res_d)

Classes

ISPyBClient(name)

Web-service client for ISPyB.

ISPyBValueFactory()

Constructs ws objects from "old style" mxCuBE dictonaries.

SampleReference(code, container_reference, ...)

Exceptions

exception mxcubecore.HardwareObjects.ISPyBClient.ISPyBArgumentError(msg)[source]#

Bases: Exception

class mxcubecore.HardwareObjects.ISPyBClient.ISPyBClient(name)[source]#

Bases: HardwareObject

Web-service client for ISPyB.

Get the LIMS link the data collection with id <id>.

Parameters:

did (str) – Data collection ID

Returns:

The link to the data collection

find_detector(type, manufacturer, model, mode)[source]#

Returns the Detector3VO object with the characteristics matching the ones given.

init()[source]#

Init method declared by HardwareObject.

isInhouseUser(proposal_code, proposal_number)[source]#

Returns True if the proposal is considered to be a in-house user.

Parameters:
  • proposal_code (str) –

  • proposal_number (str) –

Return type:

bool

set_image_quality_indicators_plot(collection_id, plot_path, csv_path)[source]#

Assigns image quality indicators png and csv filenames to collection

storeImage(image_dict)#

Stores the image (image parameters) <image_dict>

Parameters:

image_dict (dict) – A dictonary with image pramaters.

Returns:

None

store_data_collection_group(mx_collection)[source]#

Stores or updates a DataCollectionGroup object. The entry is updated of the group_id in the mx_collection dictionary is set to an exisiting DataCollectionGroup id.

Parameters:

mx_collection (dict) – The dictionary of values to create the object from.

Returns:

DataCollectionGroup id

Return type:

int

store_image(image_dict)[source]#

Stores the image (image parameters) <image_dict>

Parameters:

image_dict (dict) – A dictonary with image pramaters.

Returns:

None

store_image_quality_indicators(image_dict)[source]#

Stores image quality indicators

store_robot_action(robot_action_dict)[source]#

Stores robot action

translate(code, what)[source]#

Given a proposal code, returns the correct code to use in the GUI, or what to send to LDAP, user office database, or the ISPyB database.

class mxcubecore.HardwareObjects.ISPyBClient.ISPyBValueFactory[source]#

Bases: object

Constructs ws objects from “old style” mxCuBE dictonaries.

static dcg_from_dc_params(ws_client, mx_collect_dict)[source]#

Creates a dataCollectionGroupWS3VO object from a mx_collect_dict.

static from_bl_config(ws_client, bl_config)[source]#

Creates a beamLineSetup3VO from the bl_config dictionary. :rtype: beamLineSetup3VO

static from_data_collect_parameters(ws_client, mx_collect_dict)[source]#

Ceates a dataCollectionWS3VO from mx_collect_dict. :rtype: dataCollectionWS3VO

grid_info_from_workflow_info(workflow_info_dict)[source]#

Ceates grid3VO from worflow_info_dict. :rtype: grid3VO

workflow_from_workflow_info(workflow_info_dict)[source]#

Ceates workflow3VO from worflow_info_dict. :rtype: workflow3VO

workflow_mesh_from_workflow_info(workflow_info_dict)[source]#

Ceates workflowMesh3VO from worflow_info_dict. :rtype: workflowMesh3VO

workflow_step_from_workflow_info(workflow_info_dict)[source]#

Ceates workflow3VO from worflow_info_dict. :rtype: workflow3VO

class mxcubecore.HardwareObjects.ISPyBClient.SampleReference(code, container_reference, sample_reference, container_code)#

Bases: tuple

code#

Alias for field number 0

container_code#

Alias for field number 3

container_reference#

Alias for field number 1

sample_reference#

Alias for field number 2

mxcubecore.HardwareObjects.ISPyBClient.suds_encode(self, /, encoding='utf-8', errors='strict')#

Decode the bytes using the codec registered for encoding.

encoding

The encoding with which to decode the bytes.

errors

The error handling scheme to use for the handling of decoding errors. The default is ‘strict’ meaning that decoding errors raise a UnicodeDecodeError. Other possible values are ‘ignore’ and ‘replace’ as well as any other name registered with codecs.register_error that can handle UnicodeDecodeErrors.