def doSuccessActionCharacterisation(self, _edPlugin): """ retrieve the potential warning messages """ EDPluginControlInterfacev1_1.doSuccessActionCharacterisation(self, _edPlugin) # Generate file with executive summary... pyStrCharacterisationExecutiveSummary = "" pyListExecutiveSummaryLines = self.getPluginCharacterisation().getListExecutiveSummaryLines() for pyStrLine in pyListExecutiveSummaryLines: pyStrCharacterisationExecutiveSummary += pyStrLine + "\n" pyStrSummaryDirectory = self.getWorkingDirectory() pyStrSummaryPath = os.path.join(pyStrSummaryDirectory, "CharacterisationExecutiveSummary.txt") EDUtilsFile.writeFile(pyStrSummaryPath, pyStrCharacterisationExecutiveSummary) xsDataResultCCP4i = XSDataResultCCP4i() # Construct the listOfOutputFiles string... pyStrListOfOutputFiles = '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + self.getBaseDirectory() + '\n' xsDataOutput = self.getPluginCharacterisation().getDataOutput() pyListPredictionImages = xsDataOutput.getIndexingResult().getPredictionResult().getPredictionImage() for xsDataImagePrediction in pyListPredictionImages: strImagePath = xsDataImagePrediction.getPath().getValue() pyStrListOfOutputFiles = pyStrListOfOutputFiles + strImagePath + '\n' pyStrCharacterisationDirectory = os.path.join(self.getWorkingDirectory(), "Characterisation") # "Hack" for determining if we use version 1.1 or 1.2 of the BEST plugin... pyStrBestWorkingDirectory = os.path.join(pyStrCharacterisationDirectory, "Strategy") pyStrBestPlotFilePath = None pyStrBestLogFilePath = None if (os.path.exists(os.path.join(pyStrBestWorkingDirectory, "Bestv1_1"))): pyStrBestWorkingDirectory = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1") pyStrBestPlotFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1_plots.mtv") pyStrBestLogFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1.log") elif (os.path.exists(os.path.join(pyStrBestWorkingDirectory, "Bestv1_2"))): pyStrBestWorkingDirectory = os.path.join(pyStrBestWorkingDirectory, "Bestv1_2") pyStrBestPlotFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_2_plots.mtv") pyStrBestLogFilePath = os.path.join(pyStrBestWorkingDirectory, "best.log") pyStrCharacterisationOutput = None if self.getPluginCharacterisation().getClassName() == "EDPluginControlCharacterisationv1_1": pyStrCharacterisationOutput = os.path.join(pyStrCharacterisationDirectory, "ControlCharacterisationv1_1_dataOutput.xml") elif self.getPluginCharacterisation().getClassName() == "EDPluginControlCharacterisationv1_2": pyStrCharacterisationOutput = os.path.join(pyStrCharacterisationDirectory, "ControlCharacterisationv1_2_dataOutput.xml") pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrCharacterisationOutput + '\n' if (pyStrBestLogFilePath is not None): pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrBestLogFilePath + '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrBestPlotFilePath + '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrSummaryPath + '\n' xsDataStringListOfOutputFiles = XSDataString(pyStrListOfOutputFiles) xsDataResultCCP4i.setListOfOutputFiles(xsDataStringListOfOutputFiles) self.setDataOutput(xsDataResultCCP4i)
def __init__ (self): """ """ EDPluginControlInterfacev1_1.__init__(self) self.setXSDataInputClass(XSDataInputCCP4i) self.__strPluginControlSubWedgeAssembleName = "EDPluginControlSubWedgeAssemblev1_1"
def __init__(self): """ """ EDPluginControlInterfacev1_1.__init__(self) self.setXSDataInputClass(XSDataInputCCP4i) self.__strPluginControlSubWedgeAssembleName = "EDPluginControlSubWedgeAssemblev1_1"
def doSuccessActionCharacterisation(self, _edPlugin): """ retrieve the potential warning messages """ EDPluginControlInterfacev1_1.doSuccessActionCharacterisation( self, _edPlugin) # Generate file with executive summary... pyStrCharacterisationExecutiveSummary = "" pyListExecutiveSummaryLines = self.getPluginCharacterisation( ).getListExecutiveSummaryLines() for pyStrLine in pyListExecutiveSummaryLines: pyStrCharacterisationExecutiveSummary += pyStrLine + "\n" pyStrSummaryDirectory = self.getWorkingDirectory() pyStrSummaryPath = os.path.join( pyStrSummaryDirectory, "CharacterisationExecutiveSummary.txt") EDUtilsFile.writeFile(pyStrSummaryPath, pyStrCharacterisationExecutiveSummary) xsDataResultCCP4i = XSDataResultCCP4i() # Construct the listOfOutputFiles string... pyStrListOfOutputFiles = '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + self.getBaseDirectory( ) + '\n' xsDataOutput = self.getPluginCharacterisation().getDataOutput() pyListPredictionImages = xsDataOutput.getIndexingResult( ).getPredictionResult().getPredictionImage() for xsDataImagePrediction in pyListPredictionImages: strImagePath = xsDataImagePrediction.getPath().getValue() pyStrListOfOutputFiles = pyStrListOfOutputFiles + strImagePath + '\n' pyStrCharacterisationDirectory = os.path.join( self.getWorkingDirectory(), "Characterisation") # "Hack" for determining if we use version 1.1 or 1.2 of the BEST plugin... pyStrBestWorkingDirectory = os.path.join( pyStrCharacterisationDirectory, "Strategy") pyStrBestPlotFilePath = None pyStrBestLogFilePath = None if (os.path.exists(os.path.join(pyStrBestWorkingDirectory, "Bestv1_1"))): pyStrBestWorkingDirectory = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1") pyStrBestPlotFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1_plots.mtv") pyStrBestLogFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_1.log") elif (os.path.exists( os.path.join(pyStrBestWorkingDirectory, "Bestv1_2"))): pyStrBestWorkingDirectory = os.path.join(pyStrBestWorkingDirectory, "Bestv1_2") pyStrBestPlotFilePath = os.path.join(pyStrBestWorkingDirectory, "Bestv1_2_plots.mtv") pyStrBestLogFilePath = os.path.join(pyStrBestWorkingDirectory, "best.log") pyStrCharacterisationOutput = None if self.getPluginCharacterisation().getClassName( ) == "EDPluginControlCharacterisationv1_1": pyStrCharacterisationOutput = os.path.join( pyStrCharacterisationDirectory, "ControlCharacterisationv1_1_dataOutput.xml") elif self.getPluginCharacterisation().getClassName( ) == "EDPluginControlCharacterisationv1_2": pyStrCharacterisationOutput = os.path.join( pyStrCharacterisationDirectory, "ControlCharacterisationv1_2_dataOutput.xml") pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrCharacterisationOutput + '\n' if (pyStrBestLogFilePath is not None): pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrBestLogFilePath + '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrBestPlotFilePath + '\n' pyStrListOfOutputFiles = pyStrListOfOutputFiles + pyStrSummaryPath + '\n' xsDataStringListOfOutputFiles = XSDataString(pyStrListOfOutputFiles) xsDataResultCCP4i.setListOfOutputFiles(xsDataStringListOfOutputFiles) self.setDataOutput(xsDataResultCCP4i)