def indexingToIntegration(self, _edPlugin=None): # Run Kappa if configured if self._runKappa: xsDataInputControlKappa = XSDataInputControlKappa() xsDataInputControlKappa.dataCollection = self._xsDataCollection xsDataInputControlKappa.selectedSolution = self._xsDataResultCharacterisation.indexingResult.selectedSolution self._edPluginControlKappa.dataInput = xsDataInputControlKappa self.executePluginSynchronous(self._edPluginControlKappa) if not self._edPluginControlKappa.isFailure(): self._xsDataResultCharacterisation.kappaReorientation = self._edPluginControlKappa.dataOutput # Create the XDS background image xsDataInputControlXDSGenerateBackgroundImage = XSDataInputControlXDSGenerateBackgroundImage( ) xsDataInputControlXDSGenerateBackgroundImage.setDataCollection( self._xsDataCollection) self._edPluginControlXDSGenerateBackgroundImage.setDataInput( xsDataInputControlXDSGenerateBackgroundImage) self._edPluginControlXDSGenerateBackgroundImage.execute() # Integrate the reference images xsDataIntegrationInput = XSDataIntegrationInput() xsDataIntegrationInput.setDataCollection( self._xsDataResultCharacterisation.getDataCollection()) xsDataIndexingResult = self._xsDataResultCharacterisation.getIndexingResult( ) xsDataExperimentalConditionRefinded = xsDataIndexingResult.getSelectedSolution( ).getExperimentalConditionRefined() xsDataIntegrationInput.setExperimentalConditionRefined( xsDataExperimentalConditionRefinded) xsDataIntegrationInput.setSelectedIndexingSolution( xsDataIndexingResult.getSelectedSolution()) self._edPluginControlIntegration.setDataInput(xsDataIntegrationInput) self.executePluginSynchronous(self._edPluginControlIntegration)
def doSuccessIndexingMOSFLM(self, _edPlugin=None): self.DEBUG("EDPluginControlGridScreeningv1_0.doSuccessIndexingMOSFLM") self.retrieveSuccessMessages( _edPlugin, "EDPluginControlGridScreeningv1_0.doIntegrationToStrategyTransition" ) xsDataMOSFLMIndexingOutput = self.edPluginMOSFLMIndexing.getDataOutput( ) xsDataExperimentalConditionRefined = None if self.hasDataInput("refinedExperimentalCondition"): xsDataExperimentalConditionRefined = self.getDataInput( "refinedExperimentalCondition")[0] else: # Use the experimental condition from the xsDataCollection xsDataExperimentalConditionRefined = self.xsDataCollection.getSubWedge( )[0].getExperimentalCondition() from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 self.xsDataIndexingResult = EDHandlerXSDataMOSFLMv10.generateXSDataIndexingResult( xsDataMOSFLMIndexingOutput, xsDataExperimentalConditionRefined) xsDataIntegrationInput = XSDataIntegrationInput() xsDataIntegrationInput.setDataCollection(self.xsDataCollection) xsDataIntegrationInput.setExperimentalConditionRefined( self.xsDataIndexingResult.getSelectedSolution( ).getExperimentalConditionRefined()) xsDataIntegrationInput.setSelectedIndexingSolution( self.xsDataIndexingResult.getSelectedSolution()) self.edPluginControlIntegration.connectSUCCESS( self.doSuccessIntegration) self.edPluginControlIntegration.connectFAILURE( self.doFailureIntegration) self.edPluginControlIntegration.setDataInput(xsDataIntegrationInput) self.executePluginSynchronous(self.edPluginControlIntegration)
def indexingToIntegration(self, _edPlugin=None): # Integrate the reference images xsDataIntegrationInput = XSDataIntegrationInput() xsDataIntegrationInput.setDataCollection(self.__xsDataResultCharacterisation.getDataCollection()) xsDataIndexingResult = self.__xsDataResultCharacterisation.getIndexingResult() xsDataExperimentalConditionRefinded = xsDataIndexingResult.getSelectedSolution().getExperimentalConditionRefined() xsDataIntegrationInput.setExperimentalConditionRefined(xsDataExperimentalConditionRefinded) xsDataIntegrationInput.setSelectedIndexingSolution(xsDataIndexingResult.getSelectedSolution()) self.__edPluginControlIntegration.setDataInput(xsDataIntegrationInput) self.__edPluginControlIntegration.executeSynchronous()
def doIndexingToIntegrationTransition(self, _edPlugin=None): EDVerbose.DEBUG("EDPluginControlCharacterisationv10.doIndexingToIntegrationTransition") self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv10.doIntegrationToStrategyTransition") xsDataIndexingResult = self.__edPluginIndexing.getDataOutput() self.__xsDataCharacterisation.setIndexingResult(xsDataIndexingResult) xsDataIntegrationInput = XSDataIntegrationInput() xsDataIntegrationInput.setDataCollection(self.__xsDataCharacterisation.getDataCollection()) xsDataIntegrationInput.setExperimentalConditionRefined(xsDataIndexingResult.getSelectedSolution().getExperimentalConditionRefined()) xsDataIntegrationInput.setSelectedIndexingSolution(xsDataIndexingResult.getSelectedSolution()) self.__edPluginIntegration.setDataInput(xsDataIntegrationInput) self.__edPluginIntegration.executeSynchronous()
def indexingToIntegration(self, _edPlugin=None): # Create the XDS background image xsDataInputControlXDSGenerateBackgroundImage = XSDataInputControlXDSGenerateBackgroundImage( ) xsDataInputControlXDSGenerateBackgroundImage.setDataCollection( self._xsDataCollection) self._edPluginControlXDSGenerateBackgroundImage.setDataInput( xsDataInputControlXDSGenerateBackgroundImage) self._edPluginControlXDSGenerateBackgroundImage.execute() # Integrate the reference images xsDataIntegrationInput = XSDataIntegrationInput() xsDataIntegrationInput.setDataCollection( self._xsDataResultCharacterisation.getDataCollection()) xsDataIndexingResult = self._xsDataResultCharacterisation.getIndexingResult( ) xsDataExperimentalConditionRefinded = xsDataIndexingResult.getSelectedSolution( ).getExperimentalConditionRefined() xsDataIntegrationInput.setExperimentalConditionRefined( xsDataExperimentalConditionRefinded) xsDataIntegrationInput.setSelectedIndexingSolution( xsDataIndexingResult.getSelectedSolution()) self._edPluginControlIntegration.setDataInput(xsDataIntegrationInput) self.executePluginSynchronous(self._edPluginControlIntegration)
def preProcess(self, _edObject=None): """ Gets the Configuration Parameters, if found, overrides default parameters """ EDPluginControl.preProcess(self, _edObject) self.DEBUG("EDPluginControlIntegrationv10.preProcess...") xsDataIntegrationInput = self.getDataInput() xsDataSelectedIndexingSolution = xsDataIntegrationInput.getSelectedIndexingSolution( ) self.__xsDataExperimentalConditionRefined = xsDataIntegrationInput.getExperimentalConditionRefined( ) # To be changed (see bug #40) if (self.__xsDataExperimentalConditionRefined is None): self.__xsDataExperimentalConditionRefined = xsDataSelectedIndexingSolution.getExperimentalConditionRefined( ) xsDataCollection = xsDataIntegrationInput.getDataCollection() xsDataSubWedgeList = xsDataCollection.getSubWedge() self.__edPluginIntegrationList = [] iIndex = 0 for xsDataSubWedge in xsDataSubWedgeList: iSubWedgeNumber = iIndex if (xsDataSubWedge.getSubWedgeNumber() is not None): # Use the incoming subwedge number if it exists iSubWedgeNumber = xsDataSubWedge.getSubWedgeNumber().getValue() edPluginIntegration = self.loadPlugin( self.__strPluginIntegrationName) if (not edPluginIntegration is None): iIndex += 1 xsDataIntegrationInputSubWedge = XSDataIntegrationInput() xsDataIntegrationInputSubWedge.setSelectedIndexingSolution( XSDataIndexingSolutionSelected.parseString( xsDataSelectedIndexingSolution.marshal())) xsDataIntegrationInputSubWedge.setExperimentalConditionRefined( XSDataExperimentalCondition.parseString( self.__xsDataExperimentalConditionRefined.marshal())) xsDataCollection = XSDataCollection() xsDataCollection.addSubWedge(xsDataSubWedge) xsDataIntegrationInputSubWedge.setDataCollection( xsDataCollection) try: from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10 xsDataMOSFLMInputIntegration = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIntegration( xsDataIntegrationInputSubWedge) edPluginIntegration.setDataInput( xsDataMOSFLMInputIntegration) edPluginIntegration.setBaseName( "%s-%02d" % (self.__strPluginIntegrationName, iIndex)) edPluginIntegration.connectSUCCESS( self.doSuccessActionIntegration) edPluginIntegration.connectFAILURE( self.doFailureActionIntegration) # Here we store the sub wedge number for use in the results self.__edPluginIntegrationList.append( [iSubWedgeNumber, edPluginIntegration]) except Exception as strErrorMessage: self.addErrorMessage(strErrorMessage) self.ERROR(strErrorMessage) self.setFailure() else: strErrorMessage = "EDPluginControlIntegrationv10.preProcess: could not load plugin %s" % self.__strPluginIntegrationName self.error(strErrorMessage) self.addErrorMessage(strErrorMessage) self.setFailure()