本文整理汇总了Python中XSDataMXv1.XSDataCollection.getSample方法的典型用法代码示例。如果您正苦于以下问题:Python XSDataCollection.getSample方法的具体用法?Python XSDataCollection.getSample怎么用?Python XSDataCollection.getSample使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XSDataMXv1.XSDataCollection
的用法示例。
在下文中一共展示了XSDataCollection.getSample方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: EDPluginControlGridScreeningv1_0
# 需要导入模块: from XSDataMXv1 import XSDataCollection [as 别名]
# 或者: from XSDataMXv1.XSDataCollection import getSample [as 别名]
#.........这里部分代码省略.........
self.retrieveFailureMessages(_edPlugin, "EDPluginControlCharacterisationv1_1.doFailureActionIndexing")
def doSuccessIntegration(self, _edPlugin=None):
self.DEBUG("EDPluginControlGridScreeningv1_0.doSuccessIntegration")
self.retrieveSuccessMessages(_edPlugin, "EDPluginControlGridScreeningv1_0.doSuccessIntegration")
self.addStatusMessage("Integration successful.")
self.xsDataIntegrationOutput = self.edPluginControlIntegration.getDataOutput()
# Integration short summary
if self.edPluginControlIntegration.hasDataOutput("integrationShortSummary"):
self.strCharacterisationShortSummary += self.edPluginControlIntegration.getDataOutput("integrationShortSummary")[0].getValue()
# self.DEBUG( self.xsDataExperimentCharacterisation.marshal() )
if self.bDoOnlyIntegrationWithXMLOutput:
# Run mtz2various
xsDataInputMtz2Various = XSDataInputMtz2Various()
xsDataInputMtz2Various.setMtzfile(self.edPluginControlIntegration.getDataOutput().getIntegrationSubWedgeResult()[0].getGeneratedMTZFile())
xsDataInputMtz2Various.addLabin(XSDataString("I=I"))
xsDataInputMtz2Various.addLabin(XSDataString("SIGI=SIGI"))
xsDataInputMtz2Various.setOutput(XSDataString("USER '(3I4,2F10.1)'"))
self.edPluginExecMtz2Various.setDataInput(xsDataInputMtz2Various)
self.edPluginExecMtz2Various.executeSynchronous()
strHklFilePath = self.edPluginExecMtz2Various.getDataOutput().getHklfile().getPath().getValue()
strIntegration = EDUtilsFile.readFile(strHklFilePath)
# Output the result in XML format
self.xsDataGridScreeningResultIntegration = XSDataGridScreeningResultIntegration()
self.xsDataGridScreeningResultIntegration.setFileName(os.path.basename(self.strImageFile))
self.xsDataGridScreeningResultIntegration.setFileDirectory(os.path.dirname(self.strImageFile))
self.xsDataGridScreeningResultIntegration.setIntegratedData(strIntegration)
else:
# We continue with the strategy calculation
xsDataInputStrategy = XSDataInputStrategy()
xsDataSolutionSelected = self.xsDataIndexingResult.getSelectedSolution()
xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
xsDataInputStrategy.setSample(self.xsDataCollection.getSample())
xsDataIntegrationSubWedgeResultList = self.xsDataIntegrationOutput.getIntegrationSubWedgeResult()
xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())
xsDataInputStrategy.setDataCollection(self.xsDataCollection)
for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())
xsDataInputStrategy.setDiffractionPlan(self.xsDataDiffractionPlan)
self.edPluginControlStrategy.connectSUCCESS(self.doSuccessStrategy)
self.edPluginControlStrategy.connectFAILURE(self.doFailureStrategy)
self.edPluginControlStrategy.setDataInput(xsDataInputStrategy)
self.executePluginSynchronous(self.edPluginControlStrategy)
def doFailureIntegration(self, _edPlugin=None):
self.DEBUG("EDPluginControlGridScreeningv1_0.doFailureIntegration")
strErrorMessage = "Execution of integration plugin failed."
self.addStatusMessage("Integration FAILURE.")
self.ERROR(strErrorMessage)
self.addErrorMessage(strErrorMessage)
def doSuccessStrategy(self, _edPlugin=None):
self.DEBUG("EDPluginControlGridScreeningv1_0.doSuccessStrategy")
self.retrieveSuccessMessages(self.edPluginControlStrategy, "EDPluginControlGridScreeningv1_0.doSuccessStrategy")
self.xsDataStrategyResult = self.edPluginControlStrategy.getDataOutput()
def doFailureStrategy(self, _edPlugin=None):
self.DEBUG("EDPluginControlGridScreeningv1_0.doFailureStrategy")
self.retrieveFailureMessages(self.edPluginControlStrategy, "EDPluginControlGridScreeningv1_0.doFailureStrategy")