Skip to content

Commit

Permalink
[Master] 2017.05.18. Added method to store robot action
Browse files Browse the repository at this point in the history
and set image quality inidicators
  • Loading branch information
IvarsKarpics committed May 18, 2017
1 parent 77bb9e5 commit 2a1532f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion ISPyBClient2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ def _store_workflow_step(self, workflow_info_dict):


def store_image_quality_indicators(self, image_dict):
"""
"""Stores image quality indicators
"""
quality_ind_id = -1
quality_ind_dict = {"imageId": image_dict["image_id"],
Expand All @@ -1677,6 +1677,29 @@ def store_image_quality_indicators(self, image_dict):
logging.getLogger("ispyb_client").exception(msg)
return quality_ind_id

def set_image_quality_indicators_plot(self, collection_id, plot_path, csv_path):
"""Assigns image quality indicators png and csv filenames to collection"""
try:
self.__collection.service.setImageQualityIndicatorsPlot(\
collection_id, plot_path, csv_path)
except ex:
msg = 'Could not set image quality indicators in lims: %s' % ex.message
logging.getLogger("ispyb_client").exception(msg)

def store_robot_action(self, sample_id, session_id, robot_action_dict):
"""Stores robot action"""
try:
ws_client = Client(_WS_COLLECTION_URL,
cache = None)
robot_action_vo = ws_client.factory.create('robotActionWS3VO')
robot_action_vo.sessionId = session_id
robot_action_vo.blSampleId = sample_id
action_id = self.__collection.service.storeRobotAction(robot_action_vo)
except ex:
msg = 'Could not store robot action in lims: %s' % ex.message
logging.getLogger("ispyb_client").exception(msg)


# Bindings to methods called from older bricks.
getProposal = get_proposal
getSessionLocalContact = get_session_local_contact
Expand Down

0 comments on commit 2a1532f

Please sign in to comment.