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)
Beispiel #2
0
 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 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):
     # 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()
Beispiel #6
0
 def testSetDataInput(self):
     edPluginControlIntegrationv10 = self.createPlugin()
     xsPluginItemGood01 = self.getPluginConfiguration(os.path.join(self.getPluginTestsDataHome(), "XSConfiguration.xml"))
     edPluginControlIntegrationv10.setConfiguration(xsPluginItemGood01)
     edPluginControlIntegrationv10.configure()
     xmlInputReference = self.readAndParseFile(self.strReferenceInputFile)
     from XSDataMXv1 import XSDataIntegrationInput
     xsDataIntegrationInputReference = XSDataIntegrationInput.parseString(xmlInputReference)
     edPluginControlIntegrationv10.setDataInput(xmlInputReference)
     xsDataIntegrationv10Input = edPluginControlIntegrationv10.getDataInput()
     EDAssert.equal(xsDataIntegrationInputReference.marshal(), xsDataIntegrationv10Input.marshal())
     self.cleanUp(edPluginControlIntegrationv10)
 def doIndexingToIntegrationTransition(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlCharacterisationv1_1.doIndexingToIntegrationTransition")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_1.doIntegrationToStrategyTransition")
     xsDataIndexingResult = self.__edPluginIndexing.getDataOutput()
     self.__xsDataResultCharacterisation.setIndexingResult(xsDataIndexingResult)
     xsDataIntegrationInput = XSDataIntegrationInput()
     xsDataIntegrationInput.setDataCollection(self.__xsDataResultCharacterisation.getDataCollection())
     xsDataIntegrationInput.setExperimentalConditionRefined(xsDataIndexingResult.getSelectedSolution().getExperimentalConditionRefined())
     xsDataIntegrationInput.setSelectedIndexingSolution(xsDataIndexingResult.getSelectedSolution())
     self.__edPluginIntegration.setDataInput(xsDataIntegrationInput)
     self.__edPluginIntegration.executeSynchronous()
    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()
 def testGenerateXSDataMOSFLMInputIntegration(self):
     strFilename = "XSDataIntegrationInput_reference.xml"
     strPath = os.path.join(self.m_strDataPath, strFilename)
     strXMLIntegrationInput = EDUtilsTest.readAndParseFile(strPath)
     from XSDataMXv1 import XSDataIntegrationInput
     xsDataIntegrationInput = XSDataIntegrationInput.parseString(strXMLIntegrationInput)
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataMOSFLMInputIntegration = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIntegration(xsDataIntegrationInput)
     strReferenceFilename = "XSDataMOSFLMInputIntegration_reference.xml"
     strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename)
     strXMLIntegrationInputReference = EDUtilsTest.readAndParseFile(strReferencePath)
     EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10")
     from XSDataMOSFLMv10 import XSDataMOSFLMInputIntegration
     xsDataMOSFLMInputIntegrationReference = XSDataMOSFLMInputIntegration.parseString(strXMLIntegrationInputReference)
     EDAssert.equal(xsDataMOSFLMInputIntegrationReference.marshal(), xsDataMOSFLMInputIntegration.marshal())
 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)
Beispiel #11
0
 def testGenerateXSDataMOSFLMInputIntegration(self):
     strFilename = "XSDataIntegrationInput_reference.xml"
     strPath = os.path.join(self.m_strDataPath, strFilename)
     strXMLIntegrationInput = EDUtilsTest.readAndParseFile(strPath)
     from XSDataMXv1 import XSDataIntegrationInput
     xsDataIntegrationInput = XSDataIntegrationInput.parseString(
         strXMLIntegrationInput)
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataMOSFLMInputIntegration = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIntegration(
         xsDataIntegrationInput)
     strReferenceFilename = "XSDataMOSFLMInputIntegration_reference.xml"
     strReferencePath = os.path.join(self.m_strDataPath,
                                     strReferenceFilename)
     strXMLIntegrationInputReference = EDUtilsTest.readAndParseFile(
         strReferencePath)
     EDFactoryPluginStatic.loadModule("XSDataMOSFLMv10")
     from XSDataMOSFLMv10 import XSDataMOSFLMInputIntegration
     xsDataMOSFLMInputIntegrationReference = XSDataMOSFLMInputIntegration.parseString(
         strXMLIntegrationInputReference)
     EDAssert.equal(xsDataMOSFLMInputIntegrationReference.marshal(),
                    xsDataMOSFLMInputIntegration.marshal())
Beispiel #12
0
 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 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):
     # 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)
Beispiel #15
0
    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()