mxcubecore.HardwareObjects.mockup.ISPyBClientMockup#
A client for ISPyB Webservices.
Classes
|
Web-service client for ISPyB. |
- class mxcubecore.HardwareObjects.mockup.ISPyBClientMockup.ISPyBClientMockup(name)[source]#
Bases:
HardwareObject
Web-service client for ISPyB.
- dc_link(cid)[source]#
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.
- getBLSample(bl_sample_id)#
Fetch the BLSample entry with the id bl_sample_id
- Parameters:
bl_sample_id (int) –
- Returns:
A BLSampleWSValue, defined in the wsdl.
- Return type:
BLSampleWSValue
- getDataCollection(data_collection_id)#
Retrives the data collection with id <data_collection_id>
- getProposal(proposal_code, proposal_number)#
Returns the tuple (Proposal, Person, Laboratory, Session, Status). Containing the data from the coresponding tables in the database the status of the database operations are returned in Status.
- getSessionSamples(proposal_id, session_id, sample_refs)#
Retrives the list of samples associated with the session <session_id>. The samples from ISPyB is cross checked with the ones that are currently in the sample changer.
The datamatrix code read by the sample changer is used in case of conflict.
- Parameters:
- Returns:
A list with sample_ref objects.
- Return type:
- get_bl_sample(bl_sample_id)[source]#
Fetch the BLSample entry with the id bl_sample_id
- Parameters:
bl_sample_id (int) –
- Returns:
A BLSampleWSValue, defined in the wsdl.
- Return type:
BLSampleWSValue
- get_data_collection(data_collection_id)[source]#
Retrives the data collection with id <data_collection_id>
- get_proposal(proposal_code, proposal_number)[source]#
Returns the tuple (Proposal, Person, Laboratory, Session, Status). Containing the data from the coresponding tables in the database the status of the database operations are returned in Status.
- get_session_samples(proposal_id, session_id, sample_refs)[source]#
Retrives the list of samples associated with the session <session_id>. The samples from ISPyB is cross checked with the ones that are currently in the sample changer.
The datamatrix code read by the sample changer is used in case of conflict.
- Parameters:
- Returns:
A list with sample_ref objects.
- Return type:
- isInhouseUser(proposal_code, proposal_number)[source]#
Returns True if the proposal is considered to be a in-house user.
- storeBeamLineSetup(session_id, bl_config)#
Stores the beamline setup dict <bl_config>.
- storeDataCollection(mx_collection, bl_config=None)#
Stores the data collection mx_collection, and the beamline setup if provided.
- storeImage(image_dict)#
Stores the image (image parameters) <image_dict>
- Parameters:
image_dict (dict) – A dictonary with image pramaters.
- Returns:
None
- storeXfeSpectrum(xfespectrum_dict)#
Stores a xfe spectrum.
- Returns:
A dictionary with the xfe spectrum id.
- Return type:
- store_data_collection(mx_collection, bl_config=None)[source]#
Stores the data collection mx_collection, and the beamline setup if provided.
- 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 exisitng DataCollectionGroup id.
- store_image(image_dict)[source]#
Stores the image (image parameters) <image_dict>
- Parameters:
image_dict (dict) – A dictonary with image pramaters.
- Returns:
None
- store_xfe_spectrum(xfespectrum_dict)[source]#
Stores a xfe spectrum.
- Returns:
A dictionary with the xfe spectrum id.
- Return type:
- 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.
- updateBLSample(bl_sample)#
Creates or stos a BLSample entry.
- Parameters:
sample_dict (dict) – A dictonary with the properties for the entry.
# NBNB update doc string
- updateDataCollection(mx_collection, wait=False)#
Updates the datacollction mx_collection, this requires that the collectionId attribute is set and exists in the database.
- Parameters:
mx_collection (dict) – The dictionary with collections parameters.
- Returns:
None