def doFailureIndexingIndicators(self, _edPlugin=None): self.DEBUG("EDPluginControlCharacterisationv1_5.doFailureIndexingIndicators") # If more than two reference images try to index with MOSFLM: if self._edPluginControlIndexingIndicators.hasDataOutput("indicatorsShortSummary"): indicatorsShortSummary = self._edPluginControlIndexingIndicators.getDataOutput("indicatorsShortSummary")[0].getValue() self._strCharacterisationShortSummary += indicatorsShortSummary self.sendMessageToMXCuBE(indicatorsShortSummary) if self._iNoImagesWithDozorScore > 0: strWarningMessage = "Execution of Indexing and Indicators plugin failed - trying to index with MOSFLM." self.WARNING(strWarningMessage) self.sendMessageToMXCuBE(strWarningMessage, "warning") self.addWarningMessage(strWarningMessage) xsDataIndexingInput = XSDataIndexingInput() xsDataIndexingInput.dataCollection = self._xsDataCollection xsDataIndexingInput.experimentalCondition = self._xsDataCollection.subWedge[0].experimentalCondition xsDataIndexingInput.crystal = self._xsDataCrystal self._edPluginControlIndexingMOSFLM.dataInput = xsDataIndexingInput self.executePluginSynchronous(self._edPluginControlIndexingMOSFLM) else: strErrorMessage = "Execution of Indexing and Indicators plugin failed. Execution of characterisation aborted." self.ERROR(strErrorMessage) self.sendMessageToMXCuBE(strErrorMessage, "error") self.addErrorMessage(strErrorMessage) self.generateExecutiveSummary(self) if self._xsDataResultCharacterisation is not None: self.setDataOutput(self._xsDataResultCharacterisation) self.setFailure() if self._strStatusMessage != None: self.setDataOutput(XSDataString(self._strStatusMessage), "statusMessage") self.writeDataOutput()
def doFailureIndexingIndicators(self, _edPlugin=None): self.DEBUG( "EDPluginControlCharacterisationv1_5.doFailureIndexingIndicators") # If more than two reference images try to index with MOSFLM: if self._edPluginControlIndexingIndicators.hasDataOutput( "indicatorsShortSummary"): indicatorsShortSummary = self._edPluginControlIndexingIndicators.getDataOutput( "indicatorsShortSummary")[0].getValue() self._strCharacterisationShortSummary += indicatorsShortSummary self.sendMessageToMXCuBE(indicatorsShortSummary) if self._iNoImagesWithDozorScore > 0: strWarningMessage = "Execution of Indexing and Indicators plugin failed - trying to index with MOSFLM." self.WARNING(strWarningMessage) self.sendMessageToMXCuBE(strWarningMessage, "warning") self.addWarningMessage(strWarningMessage) xsDataIndexingInput = XSDataIndexingInput() xsDataIndexingInput.dataCollection = self._xsDataCollection xsDataIndexingInput.experimentalCondition = self._xsDataCollection.subWedge[ 0].experimentalCondition xsDataIndexingInput.crystal = self._xsDataCrystal self._edPluginControlIndexingMOSFLM.dataInput = xsDataIndexingInput self.executePluginSynchronous(self._edPluginControlIndexingMOSFLM) else: strErrorMessage = "Execution of Indexing and Indicators plugin failed. Execution of characterisation aborted." self.ERROR(strErrorMessage) self.sendMessageToMXCuBE(strErrorMessage, "error") self.addErrorMessage(strErrorMessage) self.generateExecutiveSummary(self) if self._xsDataResultCharacterisation is not None: self.setDataOutput(self._xsDataResultCharacterisation) self.setFailure() if self._strStatusMessage != None: self.setDataOutput(XSDataString(self._strStatusMessage), "statusMessage") self.writeDataOutput()
def doSuccessEvaluationIndexingLABELIT(self, _edPlugin=None): self.DEBUG("EDPluginControlCharacterisationv1_5.doSuccessEvaluationIndexingLABELIT") self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_5.doSuccessEvaluationIndexingLABELIT") # Retrieve status messages (if any) if self._edPluginExecEvaluationIndexingLABELIT.hasDataOutput("statusMessageIndexing"): self.addStatusMessage("Labelit: " + self._edPluginExecEvaluationIndexingLABELIT.getDataOutput("statusMessageIndexing")[0].getValue()) # Check if indexing was successful bIndexingSuccess = self._edPluginExecEvaluationIndexingLABELIT.getDataOutput("indexingSuccess")[0].getValue() if bIndexingSuccess: xsDataIndexingResult = self._edPluginExecEvaluationIndexingLABELIT.getDataOutput("indexingResult")[0] self._xsDataResultCharacterisation.setIndexingResult(xsDataIndexingResult) if self._edPluginControlIndexingIndicators.hasDataOutput("indexingShortSummary"): self._strCharacterisationShortSummary += self._edPluginControlIndexingIndicators.getDataOutput("indexingShortSummary")[0].getValue() xsDataCollection = self._xsDataResultCharacterisation.getDataCollection() xsDataGeneratePredictionInput = XSDataGeneratePredictionInput() xsDataGeneratePredictionInput.setDataCollection(XSDataCollection.parseString(xsDataCollection.marshal())) xsDataGeneratePredictionInput.setSelectedIndexingSolution(XSDataIndexingSolutionSelected.parseString(xsDataIndexingResult.getSelectedSolution().marshal())) self._edPluginControlGeneratePrediction.setDataInput(xsDataGeneratePredictionInput) if self._edPluginControlIndexingIndicators.hasDataOutput("indexingShortSummary"): indexingShortSummary = self._edPluginControlIndexingIndicators.getDataOutput("indexingShortSummary")[0].getValue() self._strCharacterisationShortSummary += indexingShortSummary self.sendMessageToMXCuBE(indexingShortSummary) # Start the generation of prediction images - we synchronize in the post-process self._edPluginControlGeneratePrediction.execute() # Then start the integration of the reference images self.indexingToIntegration() else: if self._iNoImagesWithDozorScore > 0: strWarningMessage = "Execution of Indexing and Indicators plugin failed - trying to index with MOSFLM." self.WARNING(strWarningMessage) self.sendMessageToMXCuBE(strWarningMessage, "warning") self.addWarningMessage(strWarningMessage) xsDataIndexingInput = XSDataIndexingInput() xsDataIndexingInput.dataCollection = self._xsDataCollection xsDataIndexingInput.experimentalCondition = self._xsDataCollection.subWedge[0].experimentalCondition xsDataIndexingInput.crystal = self._xsDataCrystal self._edPluginControlIndexingMOSFLM.setDataInput(xsDataIndexingInput) self.executePluginSynchronous(self._edPluginControlIndexingMOSFLM) else: strErrorMessage = "Execution of indexing with Labelit failed." self.ERROR(strErrorMessage) self.sendMessageToMXCuBE(strErrorMessage, "error") self.addErrorMessage(strErrorMessage) self.setFailure() self.generateExecutiveSummary(self) if self._strStatusMessage != None: self.setDataOutput(XSDataString(self._strStatusMessage), "statusMessage") self.writeDataOutput()
def doSuccessEvaluationIndexingLABELIT(self, _edPlugin=None): self.DEBUG( "EDPluginControlCharacterisationv1_4.doSuccessEvaluationIndexingLABELIT" ) self.retrieveSuccessMessages( _edPlugin, "EDPluginControlCharacterisationv1_4.doSuccessEvaluationIndexingLABELIT" ) # Retrieve status messages (if any) if self._edPluginExecEvaluationIndexingLABELIT.hasDataOutput( "statusMessageIndexing"): self.addStatusMessage( "Labelit: " + self._edPluginExecEvaluationIndexingLABELIT.getDataOutput( "statusMessageIndexing")[0].getValue()) # Check if indexing was successful bIndexingSuccess = self._edPluginExecEvaluationIndexingLABELIT.getDataOutput( "indexingSuccess")[0].getValue() if bIndexingSuccess: xsDataIndexingResult = self._edPluginExecEvaluationIndexingLABELIT.getDataOutput( "indexingResult")[0] self._xsDataResultCharacterisation.setIndexingResult( xsDataIndexingResult) xsDataCollection = self._xsDataResultCharacterisation.getDataCollection( ) xsDataGeneratePredictionInput = XSDataGeneratePredictionInput() xsDataGeneratePredictionInput.setDataCollection( XSDataCollection.parseString(xsDataCollection.marshal())) xsDataGeneratePredictionInput.setSelectedIndexingSolution( XSDataIndexingSolutionSelected.parseString( xsDataIndexingResult.getSelectedSolution().marshal())) self._edPluginControlGeneratePrediction.setDataInput( xsDataGeneratePredictionInput) if self._edPluginControlIndexingIndicators.hasDataOutput( "indexingShortSummary"): indexingShortSummary = self._edPluginControlIndexingIndicators.getDataOutput( "indexingShortSummary")[0].getValue() self._strCharacterisationShortSummary += indexingShortSummary self.sendMessageToMXCuBE(indexingShortSummary) # Start the generation of prediction images - we synchronize in the post-process self._edPluginControlGeneratePrediction.execute() # Then start the integration of the reference images self.indexingToIntegration() else: if self._iNoImagesWithDozorScore > 0: if not self._bDoOnlyMoslmfIndexing: strWarningMessage = "Execution of Indexing and Indicators plugin failed - trying to index with MOSFLM." self.WARNING(strWarningMessage) self.sendMessageToMXCuBE(strWarningMessage, "warning") self.addWarningMessage(strWarningMessage) xsDataIndexingInput = XSDataIndexingInput() xsDataIndexingInput.dataCollection = self._xsDataCollection xsDataIndexingInput.experimentalCondition = self._xsDataCollection.subWedge[ 0].experimentalCondition xsDataIndexingInput.crystal = self._xsDataCrystal self._edPluginControlIndexingMOSFLM.setDataInput( xsDataIndexingInput) self.executePluginSynchronous( self._edPluginControlIndexingMOSFLM) else: strErrorMessage = "Execution of indexing with Labelit failed." self.ERROR(strErrorMessage) self.sendMessageToMXCuBE(strErrorMessage, "error") self.addErrorMessage(strErrorMessage) self.setFailure() self.generateExecutiveSummary(self) if self._strStatusMessage != None: self.setDataOutput(XSDataString(self._strStatusMessage), "statusMessage") self.writeDataOutput()