mxcubecore.HardwareObjects.abstract.ISPyBAbstractLims#

Classes

ISPyBAbstractLIMS(name)

Web-service client for ISPyB.

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

Bases: AbstractLims

Web-service client for ISPyB.

create_session(proposal_id: str)[source]#

TBD

Parameters:

proposal_id (str) –

echo()[source]#

Returns True of LIMS is responding

finalize_data_collection(mx_collection)[source]#

Finalizes the collection with “collection_id”, provided in datacollection_dict.

Strucure of datacollection_dict as defined in store_data_collection above.

Parameters:

datacollection_dict

get_full_user_name()[source]#

Returns the user name of the current user

get_lims_name() List[Lims][source]#

Returns the LIMS used, name and description

Return type:

List[Lims]

get_samples(lims_name)[source]#

Returns a list of sample dictionaries for the current user from lims_name

Structure of sample dictionary: {

“containerCode”: str, “containerSampleChangerLocation”: int, “crystalId”: int, “crystalSpaceGroup”: str, “diffractionPlan”: {

“diffractionPlanId”: int

},

“proteinAcronym”: “str, “sampleId”: int, “sampleLocation”: int, “sampleName”: str

}

get_user_name()[source]#

Returns the user name of the current user

init()[source]#

Method inherited from baseclass

is_user_login_type()[source]#

Returns True if the login type is user based (not done with proposal)

store_beamline_setup(session_id, bl_config)[source]#

Stores the beamline setup dict bl_config_dict for session_id

Parameters:
  • session_id – The session id that the beamline_setup should be associated with.

  • bl_config_dict – The dictonary with beamline settings.

Returns:

The id of the beamline setup.

store_data_collection(mx_collection, bl_config=None)[source]#

Stores a datacollection, datacollection_dict, and beamline configuration, beamline_config_dict, at the time of collection

Structure of datacollection_dict: {

“oscillation_sequence”:[{}

“start”: float, “range”: float, “overlap”: float, “number_of_imaages”: float, “start_image_number”: float “exposure_time”, float, “kappaStart”: float, “phiStart”: float,

}], “fileinfo:{

“direcotry: str, “prefix”: str “suffix”: str, “template: str, “run_number” int

} “status”: str, “collection_id: int, “wavelenght: float, “resolution”:{

“lower”: float, “upper”: float

}, “resolutionAtCorner”: float, “detectorDistance”: float “xBeam”: float, “yBeam”: float, “beamSizeAtSampleX”: float “beamSizeAtSampleY”: float, “beamShape”: str, “slitGapHorizontal”: float, “slitGapVertical”: float, “synchrotronMode”, float, “flux”: float, “flux_end”: float, “transmission” float, “undulatorGap1”: float “undulatorGap2”: float “undulatorGap3”: float “xtalSnapshotFullPath1”: str, “xtalSnapshotFullPath2”: str, “xtalSnapshotFullPath3”: str, “xtalSnapshotFullPath4”: str, “centeringMethod”: str, “actualCenteringPosition” str “group_id: int, “detector_id”: int, “screening_sub_wedge_id”: int, “collection_start_time”: str #”%Y-%m-%d %H:%M:%S”

}

Structure of beamline_config_dict: {

“synchrotron_name”:str, “directory_prefix”:str, “default_exposure_time”:str, “minimum_exposure_time”:str, “detector_fileext”:str, “detector_type”:str, “detector_manufacturer”:str, “detector_binning_mode”:str, “detector_model”:str, “detector_px”:int, “detector_py”:int, “undulators”:str, “focusing_optic”:str, “monochromator_type”:str, “beam_divergence_vertical”:float, “beam_divergence_horizontal”:float, “polarisation”:float, “maximum_phi_speed”:float, “minimum_phi_oscillation”:float, “input_files_server”:str,

}

Parameters:
  • datacollection_dict – As defined above

  • beamline_config_dict – As defined above

Returns:

Tuple data_collection_id, detector_id

store_energy_scan(energyscan_dict)[source]#

Store energyscan data

Parameters:

energyscan_dict – Energyscan data to store.

Returns:

int}

Return type:

Dictonary with the energy scan id {“energyScanId”

store_image(image_dict)[source]#

Stores (image parameters) <image_dict>

Parameters:

image_dict – A dictonary with image pramaters.

store_robot_action(robot_action_dict)[source]#

Stores the robot action dictionary.

Structure of robot_action_dictionary: {

“actionType”:str, “containerLocation”: str, “dewarLocation”:str, “message”:str, “sampleBarcode”:str, “sessionId”:int, “sampleId”:int. “startTime”:str, “endTime”:str, “xtalSnapshotAfter:str”, “xtalSnapshotBefore:str”,

}

Parameters:

robot_action_dict – robot action dictionary as defined above

store_workflow(*args, **kwargs)[source]#

Stores worklflow data workflow_dict

Structure of workflow_dict: {

“workflow_id”: int, “workflow_type”: str, “comments”: str, “log_file_path”: str, “result_file_path”: str, “status”: str, “title”: str, “grid_info_id”: int, “dx_mm”: float, “dy_mm”: float, “mesh_angle”: float, “steps_x”: float, “steps_y”: float, “xOffset”: float, “yOffset”: float,

}

Parameters:

workflow_dict – worklflow data on the format above

Returns:

Tuple of ints workflow_id, workflow_mesh_id, grid_info_id

store_xfe_spectrum(xfespectrum_dict)[source]#

Stores a XFE spectrum.

Parameters:

xfespectrum_dict – XFE scan data to store.

Returns:

int}

Return type:

Dictonary with the XFE scan id {“xfeFluorescenceSpectrumId”

update_data_collection(mx_collection)[source]#

Updates the collection with “collection_id”, provided in datacollection_dict.

Structure of datacollection_dict as defined in store_data_collection above.

Parameters:

datacollection_dict