Exemple #1
0
    def testParseLabelitDistlOutput(self):
        """
        This method test the parsing of the distl.signal_strength results in the log file.
        """
        edPluginDistlSignalStrengthThinClientv1_1 = self.createPlugin()
        strPathToLabelitLogText = os.path.join(
            self.getPluginTestsDataHome(),
            "phenix.distl_thin_client_v17_650.txt")
        strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText)
        xsDataImageQualityIndicators = edPluginDistlSignalStrengthThinClientv1_1.parseLabelitDistlOutput(
            strLabelitLogText)
        xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1)
        xsDataInputDistlSignalStrength = XSDataInputDistlSignalStrength.parseString(
            xmlInput1)
        xsDataImageQualityIndicators.setImage(
            xsDataInputDistlSignalStrength.getReferenceImage())

        strResultDistlSignalStrengthFile = os.path.join(
            self.getPluginTestsDataHome(),
            "XSDataResultDistlSignalStrengthThinClient_reference.xml")
        strResultDistlSignalStrength = self.readAndParseFile(
            strResultDistlSignalStrengthFile)
        xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength.parseString(
            strResultDistlSignalStrength)
        xsDataImageQualityIndicatorsReference = xsDataResultDistlSignalStrength.getImageQualityIndicators(
        )
        EDAssert.equal(xsDataImageQualityIndicatorsReference.marshal(),
                       xsDataImageQualityIndicators.marshal())
 def postProcess(self, _edObject=None):
     """
     Parses the labelit.screen log file and the generated MOSFLM script
     """
     EDPluginExecProcessScript.postProcess(self, _edObject)
     EDVerbose.DEBUG("EDPluginDistlSignalStrengthv1_1.postProcess")
     strLabelitDistlLog = self.readProcessLogFile()
     if (strLabelitDistlLog is None):
         strErrorMessage = "EDPluginDistlSignalStrengthv1_1.postProcess : Could not read the Labelit log file"
         EDVerbose.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
     else:
         xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog)
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
         xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength()
         xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators)
         self.setDataOutput(xsDataResultDistlSignalStrength)
 def postProcess(self, _edObject=None):
     """
     Parses the labelit.screen log file and the generated MOSFLM script
     """
     EDPluginExecProcessScript.postProcess(self, _edObject)
     self.DEBUG("EDPluginDistlSignalStrengthThinClientv1_1.postProcess")
     strLabelitDistlLog = self.readProcessLogFile()
     if (strLabelitDistlLog is None):
         strErrorMessage = "EDPluginDistlSignalStrengthThinClientv1_1.postProcess : Could not read the Labelit log file"
         self.error(strErrorMessage)
         self.addErrorMessage(strErrorMessage)
         self.setFailure()
     else:
         xsDataImageQualityIndicators = self.parseLabelitDistlOutput(strLabelitDistlLog)
         xsDataImageQualityIndicators.setImage(self.xsDataImage)
         xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength()
         xsDataResultDistlSignalStrength.setImageQualityIndicators(xsDataImageQualityIndicators)
         self.setDataOutput(xsDataResultDistlSignalStrength)
Exemple #4
0
    def testGenerateExecutiveSummary(self):
        """
        This method tests the generateExecutiveSummary of the Labelit plugin.
        It contains no assert call so the contents of the executive summary is not tested.
        """
        edPluginDistlSignalStrengthThinClientv1_1 = self.createPlugin()
        xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1)
        edPluginDistlSignalStrengthThinClientv1_1.setDataInput(xmlInput1)

        strResultDistlSignalStrengthFile = os.path.join(self.getPluginTestsDataHome(), "XSDataResultDistlSignalStrengthThinClient_reference.xml")
        strResultDistlSignalStrength = self.readAndParseFile(strResultDistlSignalStrengthFile)
        xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength.parseString(strResultDistlSignalStrength)
        edPluginDistlSignalStrengthThinClientv1_1.setDataOutput(xsDataResultDistlSignalStrength)
        edPluginDistlSignalStrengthThinClientv1_1.generateExecutiveSummary(edPluginDistlSignalStrengthThinClientv1_1)
    def testParseLabelitDistlOutput(self):
        """
        This method test the parsing of the distl.signal_strength results in the log file.
        """
        edPluginDistlSignalStrengthThinClientv1_1 = self.createPlugin()
        strPathToLabelitLogText = os.path.join(self.getPluginTestsDataHome(), "phenix.distl_thin_client_v17_650.txt")
        strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText)
        xsDataImageQualityIndicators = edPluginDistlSignalStrengthThinClientv1_1.parseLabelitDistlOutput(strLabelitLogText)
        xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1)
        xsDataInputDistlSignalStrength = XSDataInputDistlSignalStrength.parseString(xmlInput1)
        xsDataImageQualityIndicators.setImage(xsDataInputDistlSignalStrength.getReferenceImage())

        strResultDistlSignalStrengthFile = os.path.join(self.getPluginTestsDataHome(), "XSDataResultDistlSignalStrengthThinClient_reference.xml")
        strResultDistlSignalStrength = self.readAndParseFile(strResultDistlSignalStrengthFile)
        xsDataResultDistlSignalStrength = XSDataResultDistlSignalStrength.parseString(strResultDistlSignalStrength)
        xsDataImageQualityIndicatorsReference = xsDataResultDistlSignalStrength.getImageQualityIndicators()
        EDAssert.equal(xsDataImageQualityIndicatorsReference.marshal(), xsDataImageQualityIndicators.marshal())