本文整理汇总了Python中EDPluginISPyBv1_4.EDPluginISPyBv1_4.process方法的典型用法代码示例。如果您正苦于以下问题:Python EDPluginISPyBv1_4.process方法的具体用法?Python EDPluginISPyBv1_4.process怎么用?Python EDPluginISPyBv1_4.process使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDPluginISPyBv1_4.EDPluginISPyBv1_4
的用法示例。
在下文中一共展示了EDPluginISPyBv1_4.process方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreWorkflowMeshv1_4.process")
# First get the image ID
xsDataInputWorkflowMesh = self.getDataInput()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
workflowMeshWS3VO = clientToolsForCollectionWebService.factory.create('workflowMeshWS3VO')
workflowMeshWS3VO.workflowId = self.getXSValue(xsDataInputWorkflowMesh.workflowId)
workflowMeshWS3VO.bestPositionId = self.getXSValue(xsDataInputWorkflowMesh.bestPositionId)
workflowMeshWS3VO.bestImageId = self.getXSValue(xsDataInputWorkflowMesh.bestImageId)
workflowMeshWS3VO.value1 = self.getXSValue(xsDataInputWorkflowMesh.value1)
workflowMeshWS3VO.value2 = self.getXSValue(xsDataInputWorkflowMesh.value2)
workflowMeshWS3VO.value3 = self.getXSValue(xsDataInputWorkflowMesh.value3)
workflowMeshWS3VO.value4 = self.getXSValue(xsDataInputWorkflowMesh.value4)
workflowMeshWS3VO.cartographyPath = self.getXSValue(xsDataInputWorkflowMesh.cartographyPath)
# print workflowMeshWS3VO
self.iWorkflowMeshId = clientToolsForCollectionWebService.service.storeOrUpdateWorkflowMesh(workflowMeshWS3VO)
self.DEBUG("EDPluginISPyBStoreWorkflowMeshv1_4.process: WorkflowId=%d" % self.iWorkflowMeshId)
示例2: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBSetImagesPositionsv1_4.process")
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# Loop over all positions
listImagePosition = []
for xsDataImagePosition in self.dataInput.imagePosition:
imagePosition = clientToolsForCollectionWebService.factory.create('imagePosition')
# Get the workflow ID and status
imagePosition.fileName = os.path.basename(xsDataImagePosition.fileName.path.value)
imagePosition.fileLocation = os.path.dirname(xsDataImagePosition.fileName.path.value)
if xsDataImagePosition.jpegFileFullPath is not None:
imagePosition.jpegFileFullPath = xsDataImagePosition.jpegFileFullPath.path.value
if xsDataImagePosition.jpegThumbnailFileFullPath is not None:
imagePosition.jpegThumbnailFileFullPath = xsDataImagePosition.jpegThumbnailFileFullPath.path.value
listImagePosition.append(imagePosition)
self.listImageCreation = clientToolsForCollectionWebService.service.setImagesPositions(
listImagePosition=listImagePosition)
self.DEBUG("EDPluginISPyBSetImagesPositionsv1_4.process: listImageCreation=%r" % self.listImageCreation)
示例3: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBSetDataCollectionsPositionsv1_4.process")
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# Loop over all positions
listDataCollectionPosition = []
for xsDataDataCollectionPosition in self.dataInput.dataCollectionPosition:
dataCollectionPosition = clientToolsForCollectionWebService.factory.create('dataCollectionPosition')
# Get the workflow ID and status
dataCollectionPosition.fileName = os.path.basename(xsDataDataCollectionPosition.fileName.path.value)
dataCollectionPosition.fileLocation = os.path.dirname(xsDataDataCollectionPosition.fileName.path.value)
dataCollectionPosition.startPosition = self.createMotorPosition3VO(clientToolsForCollectionWebService,
xsDataDataCollectionPosition.startPosition)
if xsDataDataCollectionPosition.endPosition is not None:
dataCollectionPosition.endPosition = self.createMotorPosition3VO(clientToolsForCollectionWebService,
xsDataDataCollectionPosition.endPosition)
else:
endMotorPosition3VO = None
listDataCollectionPosition.append(dataCollectionPosition)
self.listDataCollectionId = clientToolsForCollectionWebService.service.setDataCollectionsPositions(
listDataCollectionPosition=listDataCollectionPosition)
self.DEBUG("EDPluginISPyBSetDataCollectionsPositionsv1_4.process: DataCollectionId=%r" % self.listDataCollectionId)
示例4: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreWorkflowv1_4.process")
# First get the image ID
xsDataWorkflow = self.getDataInput().getWorkflow()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
workflow3VO = clientToolsForCollectionWebService.factory.create('workflow3VO')
workflow3VO.comments = self.getXSValue(xsDataWorkflow.comments)
workflow3VO.logFilePath = self.getXSValue(xsDataWorkflow.logFilePath)
workflow3VO.recordTimeStamp = self.getDateValue(xsDataWorkflow.recordTimeStamp, "%a %b %d %H:%M:%S %Y", DateTime(datetime.datetime.now()))
workflow3VO.resultFilePath = self.getXSValue(xsDataWorkflow.resultFilePath)
workflow3VO.status = self.getXSValue(xsDataWorkflow.status)
workflow3VO.workflowId = self.getXSValue(xsDataWorkflow.workflowId)
workflow3VO.workflowTitle = self.getXSValue(xsDataWorkflow.workflowTitle)
workflow3VO.workflowType = self.getXSValue(xsDataWorkflow.workflowType)
# print workflow3VO
self.iWorkflowId = clientToolsForCollectionWebService.service.storeOrUpdateWorkflow(workflow3VO)
self.DEBUG("EDPluginISPyBStoreWorkflowv1_4.process: WorkflowId=%d" % self.iWorkflowId)
示例5: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreGridInfov1_4.process")
# First get the image ID
xsDataInputGridInfo = self.getDataInput()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
gridInfoWS3VO = clientToolsForCollectionWebService.factory.create('gridInfoWS3VO')
gridInfoWS3VO.gridInfoId = self.getXSValue(xsDataInputGridInfo.gridInfoId)
gridInfoWS3VO.workflowMeshId = self.getXSValue(xsDataInputGridInfo.workflowMeshId)
gridInfoWS3VO.dx_mm = self.getXSValue(xsDataInputGridInfo.dx_mm)
gridInfoWS3VO.dy_mm = self.getXSValue(xsDataInputGridInfo.dy_mm)
gridInfoWS3VO.xOffset = self.getXSValue(xsDataInputGridInfo.xOffset)
gridInfoWS3VO.yOffset = self.getXSValue(xsDataInputGridInfo.yOffset)
gridInfoWS3VO.steps_x = self.getXSValue(xsDataInputGridInfo.steps_x)
gridInfoWS3VO.steps_y = self.getXSValue(xsDataInputGridInfo.steps_y)
gridInfoWS3VO.meshAngle = self.getXSValue(xsDataInputGridInfo.meshAngle)
# print gridInfoWS3VO
self.iGridInfoId = clientToolsForCollectionWebService.service.storeOrUpdateGridInfo(gridInfoWS3VO)
self.DEBUG("EDPluginISPyBStoreGridInfov1_4.process: WorkflowId=%d" % self.iGridInfoId)
示例6: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
First uses the ImageService to find the imageId.
Then uses ToolsForCollectionWebService for storing the image quality indicators.
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreImageQualityIndicatorsv1_4.process")
# First get the image ID
xsDataImageQualityIndicators = self.getDataInput().getImageQualityIndicators()
strPathToImage = xsDataImageQualityIndicators.getImage().getPath().getValue()
strDirName = os.path.dirname(strPathToImage)
strFileName = os.path.basename(strPathToImage)
httpAuthenticatedToolsForAutoprocessingWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForAutoprocessingWebService = Client(self.strToolsForAutoprocessingWebServiceWsdl,
transport=httpAuthenticatedToolsForAutoprocessingWebService,
cache=None)
iImageId = 0
iAutoProcProgramId = self.iAutoProcProgramId
iSpotTotal = self.getXSValue(xsDataImageQualityIndicators.spotTotal)
iInResTotal = self.getXSValue(xsDataImageQualityIndicators.inResTotal)
iGoodBraggCandidates = self.getXSValue(xsDataImageQualityIndicators.goodBraggCandidates)
iIceRings = self.getXSValue(xsDataImageQualityIndicators.iceRings)
fMethod1res = self.getXSValue(xsDataImageQualityIndicators.method1Res)
fMethod2res = self.getXSValue(xsDataImageQualityIndicators.method2Res)
fMaxUnitCell = self.getXSValue(xsDataImageQualityIndicators.maxUnitCell)
fPctSaturationTop50peaks = self.getXSValue(xsDataImageQualityIndicators.pctSaturationTop50Peaks)
iInResolutionOvrlSpots = self.getXSValue(xsDataImageQualityIndicators.inResolutionOvrlSpots)
fBinPopCutOffMethod2res = self.getXSValue(xsDataImageQualityIndicators.binPopCutOffMethod2Res)
fTotalIntegratedSignal = self.getXSValue(xsDataImageQualityIndicators.totalIntegratedSignal)
fDozor_score = self.getXSValue(xsDataImageQualityIndicators.dozor_score)
providedDate = DateTime(datetime.datetime.now())
self.iImageQualityIndicatorsId = clientToolsForAutoprocessingWebService.service.storeOrUpdateImageQualityIndicatorsForFileName(
fileLocation=strDirName, \
fileName=strFileName, \
imageId=iImageId, \
autoProcProgramId=iAutoProcProgramId, \
spotTotal=iSpotTotal, \
inResTotal=iInResTotal, \
goodBraggCandidates=iGoodBraggCandidates, \
iceRings=iIceRings, \
method1Res=fMethod1res, \
method2Res=fMethod2res, \
maxUnitCell=fMaxUnitCell, \
pctSaturationTop50Peaks=fPctSaturationTop50peaks, \
inResolutionOvrlSpots=iInResolutionOvrlSpots, \
binPopCutOffMethod2Res=fBinPopCutOffMethod2res, \
totalIntegratedSignal=fTotalIntegratedSignal, \
dozor_score=fDozor_score)
self.DEBUG("EDPluginISPyBStoreImageQualityIndicatorsv1_4.process: imageQualityIndicatorsId=%r" % self.iImageQualityIndicatorsId)
示例7: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreMotorPositionv1_4.process")
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# Loop over all positions
motorPosition = self.createMotorPosition3VO(clientToolsForCollectionWebService, self.dataInput.motorPosition)
self.motorPositionId = clientToolsForCollectionWebService.service.storeOrUpdateMotorPosition(
motorPosition=motorPosition)
self.DEBUG("EDPluginISPyBStoreMotorPositionv1_4.process: motorPositionId=%r" % self.motorPositionId)
示例8: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Stores the contents of the AutoProcContainer in ISPyB.
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreAutoProcProgramAttachmentv1_4.process")
xsDataInputStoreAutoProcProgramAttachment = self.getDataInput()
httpAuthenticatedToolsForAutoprocessingWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForAutoprocessingWebService = Client(self.strToolsForAutoprocessingWebServiceWsdl,
transport=httpAuthenticatedToolsForAutoprocessingWebService,
cache=None)
# AutoProcProgramAttachment
listAutoProcProgramAttachment = xsDataInputStoreAutoProcProgramAttachment.getAutoProcProgramAttachment()
for xsDataAutoProcProgramAttachment in listAutoProcProgramAttachment:
iAutoProcProgramAttachmentId = self.storeOrUpdateAutoProcProgramAttachment(clientToolsForAutoprocessingWebService, xsDataAutoProcProgramAttachment)
self.dataOutput.addAutoProcProgramAttachmentId(XSDataInteger(iAutoProcProgramAttachmentId))
示例9: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBGetPdbFilePathv1_4.process")
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# Loop over all positions
xsDataInputISPyBGetPdbFilePath = self.getDataInput()
iDataCollectionId = self.getXSValue(xsDataInputISPyBGetPdbFilePath.dataCollectionId)
self.strPathToPdbFile = clientToolsForCollectionWebService.service.getPdbFilePath(
iDataCollectionId, \
)
self.DEBUG("EDPluginISPyBGetPdbFilePathv1_4.process: path to pdb file=%r" % self.strPathToPdbFile)
示例10: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Stores the contents of the DataCollectionContainer in ISPyB.
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreDataCollectionv1_4.process")
xsDataInputStoreDataCollection = self.getDataInput()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# DataCollectionProgram
self.iDataCollectionId = self.storeDataCollectionProgram(clientToolsForCollectionWebService, xsDataInputStoreDataCollection)
if self.iDataCollectionId is None:
self.ERROR("Couldn't create entry for DataCollectionId in ISPyB!")
self.setFailure()
self.bContinue = False
示例11: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBUpdateDataCollectionGroupWorkflowIdv1_4.process")
xsDataInput = self.getDataInput()
# print xsDataInput.marshal()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
self.iDataCollectionGroupId = clientToolsForCollectionWebService.service.updateDataCollectionGroupWorkflowId(\
fileLocation=self.getXSValue(xsDataInput.fileLocation), \
fileName=self.getXSValue(xsDataInput.fileName), \
workflowId=self.getXSValue(xsDataInput.workflowId), \
)
self.DEBUG("EDPluginISPyBUpdateDataCollectionGroupWorkflowIdv1_4.process: DataCollectionGroupId=%r" % self.iDataCollectionGroupId)
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:20,代码来源:EDPluginISPyBUpdateDataCollectionGroupWorkflowIdv1_4.py
示例12: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBSetBestWilsonPlotPathv1_4.process")
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
# Loop over all positions
xsDataInputISPyBSetBestWilsonPlotPath = self.getDataInput()
iDataCollectionId = self.getXSValue(xsDataInputISPyBSetBestWilsonPlotPath.dataCollectionId)
strBestWilsonPlotPath = self.getXSValue(xsDataInputISPyBSetBestWilsonPlotPath.bestWilsonPlotPath)
self.dataCollectionId = clientToolsForCollectionWebService.service.setBestWilsonPlotPath(
arg0=iDataCollectionId, \
bestWilsonPlotPath=strBestWilsonPlotPath, \
)
self.DEBUG("EDPluginISPyBSetBestWilsonPlotPathv1_4.process: dataCollectionId=%r" % self.dataCollectionId)
示例13: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Uses ToolsForCollectionWebService for storing the workflow status
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBUpdateDataCollectionGroupWorkflowIdv1_4.process")
xsDataInput = self.getDataInput()
newComment = xsDataInput.newComment.value
# print xsDataInput.marshal()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
if xsDataInput.dataCollectionId is None:
self.ERROR("No input data collection id")
self.setFailure()
return
dataCollectionId = xsDataInput.dataCollectionId.value
dataCollectionWS3VO = clientToolsForCollectionWebService.service.findDataCollection(dataCollectionId)
if dataCollectionWS3VO is None:
self.ERROR("No data collection corresponding to data collection id {0}".format(dataCollectionId))
self.setFailure()
return
dataCollectionGroupId = dataCollectionWS3VO.dataCollectionGroupId
if dataCollectionGroupId is None:
self.ERROR("No data collection group corresponding to data collection id {0}".format(dataCollectionId))
self.setFailure()
return
dataCollectionGroupWS3VO = clientToolsForCollectionWebService.service.findDataCollectionGroup(dataCollectionGroupId)
if not newComment in str(dataCollectionGroupWS3VO.comments):
dataCollectionGroupWS3VO.comments = newComment
self.iDataCollectionGroupId = clientToolsForCollectionWebService.service.storeOrUpdateDataCollectionGroup(dataCollectionGroupWS3VO)
# Make sure the comments hasn't already been added by ISPyB:
dataCollectionWS3VO = clientToolsForCollectionWebService.service.findDataCollection(dataCollectionId)
if hasattr(dataCollectionWS3VO, "comments"):
if not newComment in dataCollectionWS3VO.comments:
dataCollectionWS3VO.comments += " " + newComment
dataCollectionId = clientToolsForCollectionWebService.service.storeOrUpdateDataCollection(dataCollectionWS3VO)
else:
dataCollectionWS3VO.comments = newComment
dataCollectionId = clientToolsForCollectionWebService.service.storeOrUpdateDataCollection(dataCollectionWS3VO)
self.DEBUG("EDPluginISPyBUpdateDataCollectionGroupWorkflowIdv1_4.process: DataCollectionGroupId=%r" % self.iDataCollectionGroupId)
示例14: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
Retrieves the contents of the DataCollectionContainer in ISPyB
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBRetrieveDataCollectionv1_4.process")
infile = self.getDataInput()
httpAuthenticatedToolsForCollectionWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForCollectionWebService = Client(self.strToolsForCollectionWebServiceWsdl,
transport=httpAuthenticatedToolsForCollectionWebService,
cache=None)
self.collectParameters = None
if infile.image is not None:
inpath = infile.image.path.value
indir = os.path.dirname(inpath)
infilename = os.path.basename(inpath)
collect_params = clientToolsForCollectionWebService.service.findDataCollectionFromFileLocationAndFileName(
indir,
infilename)
elif infile.dataCollectionId is not None:
dataCollectionId = infile.dataCollectionId.value
collect_params = clientToolsForCollectionWebService.service.findDataCollection(dataCollectionId)
else:
self.ERROR("Neither image nor data collection id given as input!")
if collect_params is None:
self.ERROR("Couldn't find collect for image %s in ISPyB!" % inpath)
self.setFailure()
else:
# the result is a suds.sudsobject.Object, we need to convert it
res = XSDataISPyBDataCollection()
try:
for k, v in collect_params:
setattr(res, k, v)
except:
self.ERROR('something went wrong converting the result to a XSDataResultRetrieveDataCollection')
self.setFailure()
else:
self.collectParameters = XSDataResultRetrieveDataCollection()
self.collectParameters.dataCollection = res
示例15: process
# 需要导入模块: from EDPluginISPyBv1_4 import EDPluginISPyBv1_4 [as 别名]
# 或者: from EDPluginISPyBv1_4.EDPluginISPyBv1_4 import process [as 别名]
def process(self, _edObject=None):
"""
First uses the ImageService to find the imageId.
Then uses ToolsForCollectionWebService for storing the image quality indicators.
"""
EDPluginISPyBv1_4.process(self)
self.DEBUG("EDPluginISPyBStoreListOfImageQualityIndicatorsv1_4.process")
httpAuthenticatedToolsForAutoprocessingWebService = HttpAuthenticated(username=self.strUserName, password=self.strPassWord)
clientToolsForAutoprocessingWebService = Client(self.strToolsForAutoprocessingWebServiceWsdl,
transport=httpAuthenticatedToolsForAutoprocessingWebService,
cache=None)
# Loop over all input image quality indicators:
listImageQualityIndicatorsForWS = []
for xsDataImageQualityIndicators in self.dataInput.imageQualityIndicators:
# print xsDataImageQualityIndicators.marshal()
imageQualityIndicatorsWS3VO = clientToolsForAutoprocessingWebService.factory.create('imageQualityIndicatorsWS3VO')
strPathToImage = xsDataImageQualityIndicators.getImage().getPath().getValue()
imageQualityIndicatorsWS3VO.fileName = os.path.basename(strPathToImage)
imageQualityIndicatorsWS3VO.fileLocation = os.path.dirname(strPathToImage)
# imageQualityIndicatorsWS3VO.imageId = 0
imageQualityIndicatorsWS3VO.autoProcProgramId = self.iAutoProcProgramId
imageQualityIndicatorsWS3VO.spotTotal = self.getXSValue(xsDataImageQualityIndicators.spotTotal)
imageQualityIndicatorsWS3VO.inResTotal = self.getXSValue(xsDataImageQualityIndicators.inResTotal)
imageQualityIndicatorsWS3VO.goodBraggCandidates = self.getXSValue(xsDataImageQualityIndicators.goodBraggCandidates)
imageQualityIndicatorsWS3VO.iceRings = self.getXSValue(xsDataImageQualityIndicators.iceRings)
imageQualityIndicatorsWS3VO.method1Res = self.getXSValue(xsDataImageQualityIndicators.method1Res)
imageQualityIndicatorsWS3VO.method2Res = self.getXSValue(xsDataImageQualityIndicators.method2Res)
imageQualityIndicatorsWS3VO.maxUnitCell = self.getXSValue(xsDataImageQualityIndicators.maxUnitCell)
imageQualityIndicatorsWS3VO.pctSaturationTop50Peaks = self.getXSValue(xsDataImageQualityIndicators.pctSaturationTop50Peaks)
imageQualityIndicatorsWS3VO.inResolutionOvrlSpots = self.getXSValue(xsDataImageQualityIndicators.inResolutionOvrlSpots)
imageQualityIndicatorsWS3VO.binPopCutOffMethod2Res = self.getXSValue(xsDataImageQualityIndicators.binPopCutOffMethod2Res)
imageQualityIndicatorsWS3VO.totalIntegratedSignal = self.getXSValue(xsDataImageQualityIndicators.totalIntegratedSignal)
imageQualityIndicatorsWS3VO.dozor_score = self.getXSValue(xsDataImageQualityIndicators.dozor_score)
imageQualityIndicatorsWS3VO.recordTimeStamp = DateTime(datetime.datetime.now())
listImageQualityIndicatorsForWS.append(imageQualityIndicatorsWS3VO)
self.listImageQualityIndicatorsId = clientToolsForAutoprocessingWebService.service.storeOrUpdateImageQualityIndicatorsForFileNames(
listImageQualityIndicatorsForWS=listImageQualityIndicatorsForWS)
self.DEBUG("EDPluginISPyBStoreListOfImageQualityIndicatorsv1_4.process: listImageQualityIndicatorsId=%r" % self.listImageQualityIndicatorsId)