def doIntegrationToStrategyTransition(self, _edPlugin=None):
        EDVerbose.DEBUG("EDPluginControlInducedRadiationProcessv10.doIntegrationToStrategyTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlInducedRadiationProcessv10.doIntegrationToStrategyTransition")

        xsDataIntegrationOutput = self.__edPluginIntegration.getDataOutput()
        self.__xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
        #EDVerbose.DEBUG( self.__xsDataExperimentCharacterisation.marshal() )
        xsDataInputStrategy = XSDataInputStrategy()

        xsDataSolutionSelected = self.__xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()

        xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
        xsDataInputStrategy.setSample(self.__xsDataResultCharacterisation.getDataCollection().getSample())

        xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()

        xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
        xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
        xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())
        xsDataInputStrategy.setDataCollection(self.getDataInput().getDataCollection())
        for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
            xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())

        xsDataInputStrategy.setDiffractionPlan(self.__xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())

        #print xsDataInputStrategy.marshal()
        self.__edPluginStrategy.setDataInput(xsDataInputStrategy)
        self.__edPluginStrategy.executeSynchronous()
    def doIntegrationToStrategyTransition(self, _edPlugin=None):
        EDVerbose.DEBUG("EDPluginControlInducedRadiationProcessv10.doIntegrationToStrategyTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlInducedRadiationProcessv10.doIntegrationToStrategyTransition")

        xsDataIntegrationOutput = self.__edPluginIntegration.getDataOutput()
        self.__xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
        #EDVerbose.DEBUG( self.__xsDataExperimentCharacterisation.marshal() )
        xsDataInputStrategy = XSDataInputStrategy()

        xsDataSolutionSelected = self.__xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()

        xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
        xsDataInputStrategy.setSample(self.__xsDataResultCharacterisation.getDataCollection().getSample())

        xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()

        xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
        xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
        xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())

        for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
            xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())

        xsDataInputStrategy.setDiffractionPlan(self.__xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())

        #print xsDataInputStrategy.marshal()
        self.__edPluginStrategy.setDataInput(xsDataInputStrategy)
        self.__edPluginStrategy.executeSynchronous()
 def doCharacterisationSuccess(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlCharForReorientationv2_0.doCharacterisationSuccess")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv2_0.doCharacterisationSuccess")
     self.xsDataResultCharacterisation = self.edPluginControlCharacterisation.getDataOutput()
     # Check if kappa strategy is requested:
     if self.strPluginStrategyName is not None:
         self.edPluginControlStrategy = self.loadPlugin(self.strPluginStrategyName, \
                                                                "MXv2KappaStrategy")
         xsDataInputStrategy = XSDataInputStrategy()
         xsDataSolutionSelected = self.xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()
         xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
         xsDataInputStrategy.setSample(self.xsDataResultCharacterisation.getDataCollection().getSample())
         xsDataIntegrationSubWedgeResultList = self.xsDataResultCharacterisation.getIntegrationResult().getIntegrationSubWedgeResult()
         xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
         xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
         xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())
         xsDataInputStrategy.setDataCollection(self.mxv1InputCharacterisation.getDataCollection())
         xsDataInputStrategy.setXdsBackgroundImage(self.xsDataResultCharacterisation.getXdsBackgroundImage())
         for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
             xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())
         xsDataInputStrategy.setDiffractionPlan(self.xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())
         self.edPluginControlStrategy.setDataInput(xsDataInputStrategy, "mxv1InputStrategy")
         self.edPluginControlStrategy.setDataInput(self.mxv2DataCollection, "mxv2DataCollection")
         self.edPluginControlStrategy.setDataInput(self.xsDataResultCharacterisation.getIndexingResult(), "mxv1IndexingResult")
         self.edPluginControlStrategy.connectSUCCESS(self.doStrategySuccess)
         self.edPluginControlStrategy.connectFAILURE(self.doStrategyFailure)
         self.executePluginSynchronous(self.edPluginControlStrategy)
 def doSuccessIntegration(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlCharacterisationv1_3.doSuccessIntegration")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_3.doSuccessIntegration")
     # Wait for XDS plugin if necessary
     self._edPluginControlXDSGenerateBackgroundImage.synchronize()
     self.addStatusMessage("Integration successful.")
     xsDataIntegrationOutput = self._edPluginControlIntegration.getDataOutput()
     self._xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
     # Integration short summary
     if self._edPluginControlIntegration.hasDataOutput("integrationShortSummary"):
         self._strCharacterisationShortSummary += self._edPluginControlIntegration.getDataOutput("integrationShortSummary")[0].getValue()
     #EDVerbose.DEBUG( self._xsDataExperimentCharacterisation.marshal() )
     if self._bDoStrategyCalculation:
         xsDataInputStrategy = XSDataInputStrategy()
         xsDataSolutionSelected = self._xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()
         xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
         xsDataInputStrategy.setSample(self._xsDataResultCharacterisation.getDataCollection().getSample())
         xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()
         xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
         xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
         xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())
         xsDataInputStrategy.setXdsBackgroundImage(self._xsDataFileXdsBackgroundImage)
         for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
             xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())
         xsDataInputStrategy.setDiffractionPlan(self._xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())
         self._edPluginControlStrategy.setDataInput(xsDataInputStrategy)
         self.executePluginSynchronous(self._edPluginControlStrategy)
    def doIntegrationToStrategyTransition(self, _edPlugin=None):
        self.DEBUG("EDPluginControlCharacterisationv2_0.doIntegrationToStrategyTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv2_0.doIntegrationToStrategyTransition")

        xsDataIntegrationOutput = self.edPluginIntegration.getDataOutput()
        self.xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
        #self.DEBUG( self.xsDataExperimentCharacterisation.marshal() )
        from XSDataMXv1 import XSDataInputStrategy
        xsDataInputStrategyOLD = XSDataInputStrategy()

        xsDataSolutionSelected = self.xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()

        xsDataInputStrategyOLD.setCrystalRefined(xsDataSolutionSelected.getCrystal())
        xsDataInputStrategyOLD.setSample(self.xsDataResultCharacterisation.getDataCollection().getSample())

        xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()

        xsDataInputStrategyOLD.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
        xsDataInputStrategyOLD.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
        xsDataInputStrategyOLD.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())

        for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
            xsDataInputStrategyOLD.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())

        xsDataInputStrategyOLD.setDiffractionPlan(self.xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())
        xsDataInputStrategyOLD.setXdsBackgroundImage(self.xsDataResultCharacterisation.getXdsBackgroundImage())

        #print xsDataInputStrategy.marshal()
        self.edPluginStrategy.setDataInput(xsDataInputStrategyOLD, "mxv1InputStrategy")
        if self.hasDataInput("mxv2DataCollection"):
            self.edPluginStrategy.setDataInput(self.getDataInput("mxv2DataCollection")[0], "mxv2DataCollection")
        self.edPluginStrategy.setDataInput(self.xsDataResultCharacterisation.getIndexingResult(), "mxv1IndexingResult")
        self.edPluginStrategy.executeSynchronous()
示例#6
0
    def doIntegrationToStrategyTransition(self, _edPlugin=None):
        self.DEBUG("EDPluginControlCharacterisationv2_0.doIntegrationToStrategyTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv2_0.doIntegrationToStrategyTransition")

        xsDataIntegrationOutput = self.edPluginIntegration.getDataOutput()
        self.xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
        # self.DEBUG( self.xsDataExperimentCharacterisation.marshal() )
        from XSDataMXv1 import XSDataInputStrategy
        xsDataInputStrategyOLD = XSDataInputStrategy()

        xsDataSolutionSelected = self.xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()

        xsDataInputStrategyOLD.setCrystalRefined(xsDataSolutionSelected.getCrystal())
        xsDataInputStrategyOLD.setSample(self.xsDataResultCharacterisation.getDataCollection().getSample())

        xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()

        xsDataInputStrategyOLD.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
        xsDataInputStrategyOLD.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
        xsDataInputStrategyOLD.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())

        for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
            xsDataInputStrategyOLD.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())

        xsDataInputStrategyOLD.setDiffractionPlan(self.xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())
        xsDataInputStrategyOLD.setXdsBackgroundImage(self.xsDataResultCharacterisation.getXdsBackgroundImage())

        # print xsDataInputStrategy.marshal()
        self.edPluginStrategy.setDataInput(xsDataInputStrategyOLD, "mxv1InputStrategy")
        if self.hasDataInput("mxv2DataCollection"):
            self.edPluginStrategy.setDataInput(self.getDataInput("mxv2DataCollection")[0], "mxv2DataCollection")
        self.edPluginStrategy.setDataInput(self.xsDataResultCharacterisation.getIndexingResult(), "mxv1IndexingResult")
        self.edPluginStrategy.executeSynchronous()
 def doSuccessIntegration(self, _edPlugin=None):
     self.DEBUG("EDPluginControlCharacterisationv1_2.doSuccessIntegration")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_2.doSuccessIntegration")
     self.addStatusMessage("Integration successful.")
     xsDataIntegrationOutput = self.__edPluginControlIntegration.getDataOutput()
     self.__xsDataResultCharacterisation.setIntegrationResult(xsDataIntegrationOutput)
     # Integration short summary
     if self.__edPluginControlIntegration.hasDataOutput("integrationShortSummary"):
         self.__strCharacterisationShortSummary += self.__edPluginControlIntegration.getDataOutput("integrationShortSummary")[0].getValue()
     #self.DEBUG( self.__xsDataExperimentCharacterisation.marshal() )
     if self.__bDoStrategyCalculation:
         xsDataInputStrategy = XSDataInputStrategy()
         xsDataSolutionSelected = self.__xsDataResultCharacterisation.getIndexingResult().getSelectedSolution()
         xsDataInputStrategy.setCrystalRefined(xsDataSolutionSelected.getCrystal())
         xsDataInputStrategy.setSample(self.__xsDataResultCharacterisation.getDataCollection().getSample())
         xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult()
         xsDataInputStrategy.setBestFileContentDat(xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
         xsDataInputStrategy.setBestFileContentPar(xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
         xsDataInputStrategy.setExperimentalCondition(xsDataIntegrationSubWedgeResultList[0].getExperimentalConditionRefined())
         xsDataInputStrategy.setDataCollection(self.getDataInput().getDataCollection())
         for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
             xsDataInputStrategy.addBestFileContentHKL(xsDataIntegrationSubWedgeResult.getBestfileHKL())
         xsDataInputStrategy.setDiffractionPlan(self.__xsDataResultCharacterisation.getDataCollection().getDiffractionPlan())
         self.__edPluginControlStrategy.setDataInput(xsDataInputStrategy)
         self.__edPluginControlStrategy.executeSynchronous()
示例#8
0
 def doSuccessIntegration(self, _edPlugin=None):
     self.DEBUG("EDPluginControlCharacterisationv1_4.doSuccessIntegration")
     self.retrieveSuccessMessages(
         self._edPluginControlIntegration,
         "EDPluginControlCharacterisationv1_4.doSuccessIntegration")
     # Wait for XDS plugin if necessary
     self._edPluginControlXDSGenerateBackgroundImage.synchronize()
     self.addStatusMessage("Integration successful.")
     xsDataIntegrationOutput = self._edPluginControlIntegration.getDataOutput(
     )
     self._xsDataResultCharacterisation.setIntegrationResult(
         xsDataIntegrationOutput)
     # Integration short summary
     if self._edPluginControlIntegration.hasDataOutput(
             "integrationShortSummary"):
         integrationShortSummary = self._edPluginControlIntegration.getDataOutput(
             "integrationShortSummary")[0].getValue()
         self._strCharacterisationShortSummary += integrationShortSummary
         self.sendMessageToMXCuBE(integrationShortSummary)
     # self.DEBUG( self._xsDataExperimentCharacterisation.marshal() )
     if self._bDoStrategyCalculation:
         xsDataInputStrategy = XSDataInputStrategy()
         xsDataSolutionSelected = self._xsDataResultCharacterisation.getIndexingResult(
         ).getSelectedSolution()
         xsDataInputStrategy.setCrystalRefined(
             xsDataSolutionSelected.getCrystal())
         xsDataInputStrategy.setSample(self._xsDataResultCharacterisation.
                                       getDataCollection().getSample())
         xsDataIntegrationSubWedgeResultList = xsDataIntegrationOutput.getIntegrationSubWedgeResult(
         )
         bFirst = True
         for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
             if xsDataIntegrationSubWedgeResult.getBestfileHKL(
             ) is not None:
                 xsDataInputStrategy.addBestFileContentHKL(
                     xsDataIntegrationSubWedgeResult.getBestfileHKL())
                 if bFirst:
                     xsDataInputStrategy.setBestFileContentDat(
                         xsDataIntegrationSubWedgeResult.getBestfileDat())
                     xsDataInputStrategy.setBestFileContentPar(
                         xsDataIntegrationSubWedgeResult.getBestfilePar())
                     xsDataInputStrategy.setExperimentalCondition(
                         xsDataIntegrationSubWedgeResult.
                         getExperimentalConditionRefined())
                     bFirst = False
         xsDataInputStrategy.setXdsBackgroundImage(
             self._xsDataFileXdsBackgroundImage)
         xsDataInputStrategy.setDataCollection(self._xsDataCollection)
         xsDataInputStrategy.setDiffractionPlan(
             self._xsDataResultCharacterisation.getDataCollection(
             ).getDiffractionPlan())
         self._edPluginControlStrategy.setDataInput(xsDataInputStrategy)
         self.executePluginSynchronous(self._edPluginControlStrategy)
 def doCharacterisationSuccess(self, _edPlugin=None):
     EDVerbose.DEBUG(
         "EDPluginControlCharForReorientationv2_0.doCharacterisationSuccess"
     )
     self.retrieveSuccessMessages(
         _edPlugin,
         "EDPluginControlCharacterisationv2_0.doCharacterisationSuccess")
     self.xsDataResultCharacterisation = self.edPluginControlCharacterisation.getDataOutput(
     )
     # Check if kappa strategy is requested:
     if self.strPluginStrategyName is not None:
         self.edPluginControlStrategy = self.loadPlugin(self.strPluginStrategyName, \
                                                                "MXv2KappaStrategy")
         xsDataInputStrategy = XSDataInputStrategy()
         xsDataSolutionSelected = self.xsDataResultCharacterisation.getIndexingResult(
         ).getSelectedSolution()
         xsDataInputStrategy.setCrystalRefined(
             xsDataSolutionSelected.getCrystal())
         xsDataInputStrategy.setSample(self.xsDataResultCharacterisation.
                                       getDataCollection().getSample())
         xsDataIntegrationSubWedgeResultList = self.xsDataResultCharacterisation.getIntegrationResult(
         ).getIntegrationSubWedgeResult()
         xsDataInputStrategy.setBestFileContentDat(
             xsDataIntegrationSubWedgeResultList[0].getBestfileDat())
         xsDataInputStrategy.setBestFileContentPar(
             xsDataIntegrationSubWedgeResultList[0].getBestfilePar())
         xsDataInputStrategy.setExperimentalCondition(
             xsDataIntegrationSubWedgeResultList[0].
             getExperimentalConditionRefined())
         xsDataInputStrategy.setDataCollection(
             self.mxv1InputCharacterisation.getDataCollection())
         xsDataInputStrategy.setXdsBackgroundImage(
             self.xsDataResultCharacterisation.getXdsBackgroundImage())
         for xsDataIntegrationSubWedgeResult in xsDataIntegrationSubWedgeResultList:
             xsDataInputStrategy.addBestFileContentHKL(
                 xsDataIntegrationSubWedgeResult.getBestfileHKL())
         xsDataInputStrategy.setDiffractionPlan(
             self.xsDataResultCharacterisation.getDataCollection(
             ).getDiffractionPlan())
         self.edPluginControlStrategy.setDataInput(xsDataInputStrategy,
                                                   "mxv1InputStrategy")
         self.edPluginControlStrategy.setDataInput(self.mxv2DataCollection,
                                                   "mxv2DataCollection")
         self.edPluginControlStrategy.setDataInput(
             self.xsDataResultCharacterisation.getIndexingResult(),
             "mxv1IndexingResult")
         self.edPluginControlStrategy.connectSUCCESS(self.doStrategySuccess)
         self.edPluginControlStrategy.connectFAILURE(self.doStrategyFailure)
         self.executePluginSynchronous(self.edPluginControlStrategy)
 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)
示例#11
0
 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 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() )
     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())
     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)