예제 #1
0
    def doXdsIndexingIntegration(self, _xsDataCollection):
        # Load the plugin
        self._edPluginIndexing = self.loadPlugin(self._strIndexingPluginName,
                                                 "Indexing")
        # XDS Indexing
        xsDataIndexingInput = XSDataIndexingInput()
        xsDataIndexingInput.setDataCollection(_xsDataCollection)
        self._edPluginIndexing.dataInput = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(
            xsDataIndexingInput)
        self._edPluginIndexing.executeSynchronous()
        xsDataResultXDSIndexing = self._edPluginIndexing.dataOutput
        if xsDataResultXDSIndexing.spaceGroupNumber is not None:
            spaceGroupNumber = xsDataResultXDSIndexing.spaceGroupNumber.value
            unitCell = xsDataResultXDSIndexing.unitCell
            filePaths = xsDataResultXDSIndexing.filePaths
            index = 1
            for subWedge in _xsDataCollection.subWedge:
                xsDataCollection = XSDataCollection()
                xsDataCollection.addSubWedge(subWedge)
                xsDataIndexingInput = XSDataIndexingInput()
                xsDataIndexingInput.setDataCollection(xsDataCollection)

                xsDataInputXDSIntegration = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIntegration(
                    xsDataIndexingInput, spaceGroupNumber, unitCell, filePaths)
                edPluginIntegration = self.loadPlugin(
                    self._strIntegrationPluginName,
                    "Integration_{0}".format(index))
                edPluginIntegration.dataInput = xsDataInputXDSIntegration
                edPluginIntegration.executeSynchronous()
                # self._edPluginIntegration.dataInput = xsDataInputXDSIntegration
                index += 1
    def doXdsIndexingIntegration(self, _xsDataCollection):
        # Load the plugin
        self._edPluginIndexing = self.loadPlugin(self._strIndexingPluginName, "Indexing")
        # XDS Indexing
        xsDataIndexingInput = XSDataIndexingInput()
        xsDataIndexingInput.setDataCollection(_xsDataCollection)
        self._edPluginIndexing.dataInput = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput)
        self._edPluginIndexing.executeSynchronous()
        xsDataResultXDSIndexing = self._edPluginIndexing.dataOutput
        if xsDataResultXDSIndexing.spaceGroupNumber is not None:
            spaceGroupNumber = xsDataResultXDSIndexing.spaceGroupNumber.value
            unitCell = xsDataResultXDSIndexing.unitCell
            filePaths = xsDataResultXDSIndexing.filePaths
            index = 1
            for subWedge in _xsDataCollection.subWedge:
                xsDataCollection = XSDataCollection()
                xsDataCollection.addSubWedge(subWedge)
                xsDataIndexingInput = XSDataIndexingInput()
                xsDataIndexingInput.setDataCollection(xsDataCollection)

                xsDataInputXDSIntegration = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIntegration(xsDataIndexingInput,
                                                                                                     spaceGroupNumber,
                                                                                                     unitCell,
                                                                                                     filePaths)
                edPluginIntegration = self.loadPlugin(self._strIntegrationPluginName, "Integration_{0}".format(index))
                edPluginIntegration.dataInput = xsDataInputXDSIntegration
                edPluginIntegration.executeSynchronous()
                # self._edPluginIntegration.dataInput = xsDataInputXDSIntegration
                index += 1
 def loadPluginIndexingInputData(self):
     self.verboseDebug(
         "EDPluginControlIndexingXDSv10.loadPluginIndexingInputData...")
     xsDataIndexingInput = self.getDataInput()
     from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
     self.getPluginIndexing(
     ).dataInput = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(
         xsDataIndexingInput)
 def doSuccessExecTemplate(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlXDSGenerateBackgroundImagev1_0.doSuccessExecTemplate")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlXDSGenerateBackgroundImagev1_0.doSuccessExecTemplate")
     xsDataResultXDSGenerateBackgroundImage = self.__edPluginXDSGenerateBackgroundImage.getDataOutput()
     xsDataResultControlXDSGenerateBackgroundImage = EDHandlerXSDataXDSv1_0.generateXSDataResultXDSGenerateBackgroundImage(
         xsDataResultXDSGenerateBackgroundImage
     )
     self.setDataOutput(xsDataResultControlXDSGenerateBackgroundImage)
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     self.DEBUG("EDPluginControlXDSGenerateBackgroundImagev1_0.preProcess")
     # Input data
     xsDataCollection = self.getDataInput().getDataCollection()
     xsDataInputXDS = EDHandlerXSDataXDSv1_0.generateXSDataInputXDS(xsDataCollection)
     # Load the execution plugin
     self.__edPluginXDSGenerateBackgroundImage = self.loadPlugin(self.__strXDSGenerateBackgroundImagePluginName)
     self.__edPluginXDSGenerateBackgroundImage.setDataInput(xsDataInputXDS)
 def getDataIndexingResult(self, _edPlugin):
     """
     This method retrieves the indexing results from the XDS indexing plugin.
     """
     self.DEBUG("EDPluginControlIndexingXDSv10.getDataIndexingResultFromMOSFLM")
     xsDataResultXDSIndexing = _edPlugin.dataOutput
     from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
     xsDataIndexingResult = EDHandlerXSDataXDSv1_0.generateXSDataIndexingResult(xsDataResultXDSIndexing,
                                                                                self.getExperimentalCondition())
     xsDataIndexingResult.setLabelitIndexing(XSDataBoolean(False))
     return xsDataIndexingResult
 def getDataIndexingResult(self, _edPlugin):
     """
     This method retrieves the indexing results from the XDS indexing plugin.
     """
     self.DEBUG(
         "EDPluginControlIndexingXDSv10.getDataIndexingResultFromMOSFLM")
     xsDataResultXDSIndexing = _edPlugin.dataOutput
     from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
     xsDataIndexingResult = EDHandlerXSDataXDSv1_0.generateXSDataIndexingResult(
         xsDataResultXDSIndexing, self.getExperimentalCondition())
     xsDataIndexingResult.setLabelitIndexing(XSDataBoolean(False))
     return xsDataIndexingResult
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     EDVerbose.DEBUG(
         "EDPluginControlXDSGenerateBackgroundImagev1_0.preProcess")
     # Input data
     xsDataCollection = self.getDataInput().getDataCollection()
     xsDataInputXDS = EDHandlerXSDataXDSv1_0.generateXSDataInputXDS(
         xsDataCollection)
     # Load the execution plugin
     self.__edPluginXDSGenerateBackgroundImage = self.loadPlugin(
         self.__strXDSGenerateBackgroundImagePluginName)
     self.__edPluginXDSGenerateBackgroundImage.setDataInput(xsDataInputXDS)
 def doSuccessExecTemplate(self, _edPlugin=None):
     EDVerbose.DEBUG(
         "EDPluginControlXDSGenerateBackgroundImagev1_0.doSuccessExecTemplate"
     )
     self.retrieveSuccessMessages(
         _edPlugin,
         "EDPluginControlXDSGenerateBackgroundImagev1_0.doSuccessExecTemplate"
     )
     xsDataResultXDSGenerateBackgroundImage = self.__edPluginXDSGenerateBackgroundImage.getDataOutput(
     )
     xsDataResultControlXDSGenerateBackgroundImage = EDHandlerXSDataXDSv1_0.generateXSDataResultXDSGenerateBackgroundImage(
         xsDataResultXDSGenerateBackgroundImage)
     self.setDataOutput(xsDataResultControlXDSGenerateBackgroundImage)
    def testGenerateXSDataInputXDSIndexing(self):
        filename = "XSDataIndexingInput_reference.xml"
        path = os.path.join(self.dataPath, filename)
        xmlIndexingInput = EDUtilsTest.readAndParseFile(path)
        from XSDataMXv1 import XSDataIndexingInput
        xsDataIndexingInput = XSDataIndexingInput.parseString(xmlIndexingInput)

        from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
        xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput)

        referenceFilename = "XSDataInputXDSIndexing_reference.xml"
        referencePath = os.path.join(self.dataPath, referenceFilename)
        xmlInputXDSIndexingReference = EDUtilsTest.readAndParseFile(referencePath)
        EDAssert.equal(xmlInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())
예제 #11
0
    def testGenerateXSDataInputXDSIndexing(self):
        filename = "XSDataIndexingInput_reference.xml"
        path = os.path.join(self.dataPath, filename)
        xmlIndexingInput = EDUtilsTest.readAndParseFile(path)
        from XSDataMXv1 import XSDataIndexingInput
        xsDataIndexingInput = XSDataIndexingInput.parseString(xmlIndexingInput)

        from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
        xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(
            xsDataIndexingInput)

        referenceFilename = "XSDataInputXDSIndexing_reference.xml"
        referencePath = os.path.join(self.dataPath, referenceFilename)
        xmlInputXDSIndexingReference = EDUtilsTest.readAndParseFile(
            referencePath)
        EDAssert.equal(xmlInputXDSIndexingReference,
                       xsDataInputXDSIndexing.marshal())
    def testGenerateXSDataInputXDSIndexing(self):
        pyStrFilename = "XSDataIndexingInput_reference.xml"
        pyStrPath = os.path.join(self.m_pyStrDataPath, pyStrFilename)
        pyStrXMLIndexingInput = self.readAndParseFile(pyStrPath)
        from XSDataMXv1 import XSDataIndexingInput
        xsDataIndexingInput = XSDataIndexingInput.parseString(pyStrXMLIndexingInput)

        from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
        xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput)

        xsDataInputXDSIndexing.outputFile("XSDataInputXDSIndexing_reference.xml")

        pyStrReferenceFilename = "XSDataInputXDSIndexing_reference.xml"
        pyStrReferencePath = os.path.join(self.m_pyStrDataPath, pyStrReferenceFilename)
        xsDataInputXDSIndexing.outputFile("XSDataInputXDSIndexing.xml")
        pyStrXMLInputXDSIndexingReference = self.readAndParseFile(pyStrReferencePath)
        EDAssert.equal(pyStrXMLInputXDSIndexingReference, xsDataInputXDSIndexing.marshal())
예제 #13
0
    def testGenerateXSDataInputXDSIndexing(self):
        pyStrFilename = "XSDataIndexingInput_reference.xml"
        pyStrPath = os.path.join(self.m_pyStrDataPath, pyStrFilename)
        pyStrXMLIndexingInput = self.readAndParseFile(pyStrPath)
        from XSDataMXv1 import XSDataIndexingInput
        xsDataIndexingInput = XSDataIndexingInput.parseString(
            pyStrXMLIndexingInput)

        from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
        xsDataInputXDSIndexing = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(
            xsDataIndexingInput)

        xsDataInputXDSIndexing.exportToFile(
            "XSDataInputXDSIndexing_reference.xml")

        pyStrReferenceFilename = "XSDataInputXDSIndexing_reference.xml"
        pyStrReferencePath = os.path.join(self.m_pyStrDataPath,
                                          pyStrReferenceFilename)
        xsDataInputXDSIndexing.exportToFile("XSDataInputXDSIndexing.xml")
        pyStrXMLInputXDSIndexingReference = self.readAndParseFile(
            pyStrReferencePath)
        EDAssert.equal(pyStrXMLInputXDSIndexingReference,
                       xsDataInputXDSIndexing.marshal())
 def loadPluginIndexingInputData(self):
     self.verboseDebug("EDPluginControlIndexingXDSv10.loadPluginIndexingInputData...")
     xsDataIndexingInput = self.getDataInput()
     from EDHandlerXSDataXDSv1_0 import EDHandlerXSDataXDSv1_0
     self.getPluginIndexing().dataInput = EDHandlerXSDataXDSv1_0.generateXSDataInputXDSIndexing(xsDataIndexingInput)