mxcubecore.HardwareObjects.ESRFLIMS#
Classes
|
ESRF client (ICAT+ and IPyB). |
- class mxcubecore.HardwareObjects.ESRFLIMS.ESRFLIMS(name)[source]#
Bases:
AbstractLims
ESRF client (ICAT+ and IPyB).
- 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_lims_name() List[Lims] [source]#
Returns the LIMS used, name and description
- Return type:
List[Lims]
- get_proposals_by_user(login_id: str)[source]#
Returns a list with proposal dictionaries for login_id
- Proposal dictioanry strucutre:
- {
“Proposal”: proposal, “Person”: , “Laboratory”:, “Session”:,
}
- Parameters:
login_id (str) –
- get_samples(lims_name)[source]#
Returns a list of sample dictionaires 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
}
- is_single_session_available()[source]#
True if there is no active session and there is a single session available
- is_user_login_type() bool [source]#
Returns True if the login type is user based (not done with proposal)
- Return type:
- login(user_name, token, is_local_host=False) LimsSessionManager [source]#
Login to LIMS, returns a list of Session objects for login_id
- Parameters:
login_id – username
password – password
create_session – True if session should be created by LIMS if it does not exist otherwise False
- Return type:
LimsSessionManager
- set_active_session_by_id(session_id: str) Session [source]#
Sets session with session_id to active session
- Parameters:
session_id (str) – session id
- Return type:
Session
- 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 bemline configuration, beamline_config_dict, at the time of collection
Structure of datacllection_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