当前位置: 首页>>代码示例>>Python>>正文


Python EDPluginExecProcessScript.EDPluginExecProcessScript类代码示例

本文整理汇总了Python中EDPluginExecProcessScript.EDPluginExecProcessScript的典型用法代码示例。如果您正苦于以下问题:Python EDPluginExecProcessScript类的具体用法?Python EDPluginExecProcessScript怎么用?Python EDPluginExecProcessScript使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了EDPluginExecProcessScript类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self):
        EDPluginExecProcessScript.__init__(self)

        self.addCompatibleVersion('Version 3.1.0.d //  26.04.2007')
        self.addCompatibleVersion('Version 3.1.0.d //  16.07.2007')
        self.addCompatibleVersion('Version 3.2.0 //  03.11.2008')

        self.strCONF_BEST_HOME_LABEL = "besthome"

        # Default value of strategy complexity
        self.strComplexity = "none"

        self.strBestHome = None
        self.strCommandBestHome = None
        self.strCommandBest = None

        self.strExposureTime = None
        self.strDoseRate = None
        self.strDetectorType = None

        self.strPathToBestDatFile = None
        self.strPathToBestParFile = None
        self.listFileBestHKL = []

        self.setXSDataInputClass(XSDataInputBest)
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:25,代码来源:EDPluginBestv1_1.py

示例2: preProcess

 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     EDVerbose.DEBUG("EDPluginExecSaxsMacv1_0.preProcess")
     xsdIn = self.getDataInput()
     if xsdIn.getInputImage() is not None:
         self.inputImage = xsdIn.getInputImage().getPath().getValue()
         if not os.path.isfile(self.inputImage) and "%" not in self.inputImage:
             EDVerbose.WARNING("Input file %s does not exist ... try to go on anyway" % self.inputImage)
             self.inputImage = None
     if xsdIn.getOutputImage() is not None:
         self.outputImage = xsdIn.getOutputImage().getPath().getValue()
     if xsdIn.getFirstImage() is not None:
         self.firstImage = xsdIn.getFirstImage().getValue()
     if xsdIn.getLastImage() is not None:
         self.lastImage = xsdIn.getLastImage().getValue()
     if xsdIn.getOptions() is not None:
         self.options = xsdIn.getOptions().getValue()
     if xsdIn.getDummy() is not None:
         self.dummy = xsdIn.getDummy().getValue()
     if xsdIn.getIncrement() is not None:
         self.increment = xsdIn.getIncrement().getValue()
     if xsdIn.getAddConst() is not None:
         self.addConst = xsdIn.getAddConst().getValue()
     if xsdIn.getMultConst() is not None:
         self.multConst = xsdIn.getMultConst().getValue()
     #Create the command line to run the program
     self.generateSaxsMacCommand()
开发者ID:antolinos,项目名称:edna,代码行数:27,代码来源:EDPluginExecSaxsMacv1_0.py

示例3: postProcess

 def postProcess(self, _edObject=None):
     EDPluginExecProcessScript.postProcess(self)
     self.DEBUG("EDPluginExecDatGnomv1_1.postProcess")
     # Create some output data
     cwd = self.getWorkingDirectory()
     outfile = os.path.join(cwd, os.path.basename(self.outFile))
     if not os.path.isfile(outfile):
         self.error("EDPluginExecDatGnomv1_1 did not produce output file %s as expected !" % self.outFile)
         self.setFailure()
         self.dataOutput = XSDataResultDatGnom()
         return
     try:
         os.rename(outfile, self.outFile)
     except OSError:  # may fail if src and dst on different filesystem
         shutil.copy(outfile, self.outFile)
     gnom = XSDataGnom(gnomFile=XSDataFile(XSDataString(self.outFile)))
     logfile = os.path.join(self.getWorkingDirectory(), self.getScriptLogFileName())
     out = open(logfile, "r").read().split()
     for key, val, typ in (("dmax:", "dmax", XSDataLength),
                         ("Guinier:", "rgGuinier", XSDataLength),
                         ("Gnom:", "rgGnom", XSDataLength),
                         ("Total:", "total", XSDataDouble)):
         if key in out:
             idx = out.index(key)
             res = out[idx + 1]
             gnom.__setattr__(val, typ(float(res)))
         else:
             self.error("EDPluginExecDatGnomv1_1.postProcess No key %s in file %s" % (key, logfile))
             self.setFailure()
     self.dataOutput = XSDataResultDatGnom(gnom=gnom)
     self.dataOutput.status = XSDataStatus(message=self.getXSDataMessage())
开发者ID:kif,项目名称:edna,代码行数:31,代码来源:EDPluginExecDatGnomv1_1.py

示例4: preProcess

    def preProcess(self, _edObject=None):
        EDPluginExecProcessScript.preProcess(self)
        EDVerbose.DEBUG("EDPluginExecDcrawv1_0.preProcess")
        self.__strRawFile = self.getDataInput().getRawImagePath().getPath().getValue()
        if self.getDataInput().getOutputPath() is not None:
            self.__strOutputFile = self.getDataInput().getOutputPath().getPath().getValue()
        if self.getDataInput().getExtractThumbnail() is not None:
            self.__bExtracThumbnail = (self.getDataInput().getExtractThumbnail().getValue() in [1, "true", "True", "TRUE", True])
########################################################################
# This option is incompatible with all others
########################################################################
        if self.__bExtracThumbnail is True:
            self.__bWBCamera = False
            self.__strOutputType = None #we cannot know what find of thumbnail is saved, can be jpeg, tiff or nothing !
        else:
            if  self.getDataInput().getExportTiff() is not None:
                self.__bExportTiff = (self.getDataInput().getExportTiff().getValue() in [1, "true", "True", "TRUE", True])
                if self.__bExportTiff:
                    self.__strOutputType = "tiff"
            if self.getDataInput().getWhiteBalanceAuto() is not None:
                self.__bWBAuto = (self.getDataInput().getWhiteBalanceAuto().getValue() in [1, "true", "True", "TRUE", True])
                if self.__bWBAuto is True: self.__bWBCamera = False
            if self.getDataInput().getWhiteBalanceFromCamera() is not None:
                self.__bWBCamera = (self.getDataInput().getWhiteBalanceFromCamera().getValue() in [1, "true", "True", "TRUE", True])
            if self.getDataInput().getLevelsFromCamera() is not None:
                self.__bLevelCamera = (self.getDataInput().getLevelsFromCamera().getValue()  in [1, "true", "True", "TRUE", True])
            if self.getDataInput().getInterpolationQuality() is not None:
                self.__iInterpolate = self.getDataInput().getInterpolationQuality().getValue()
        self.generateDcrawCommand()
开发者ID:antolinos,项目名称:edna,代码行数:29,代码来源:EDPluginExecDcrawv1_0.py

示例5: preProcess

    def preProcess(self, _edObject=None):
        EDPluginExecProcessScript.preProcess(self)
        self.DEBUG("EDPluginBestv1_2.preProcess")

        self.setScriptLogFileName("best.log")

        self.setFileBestDat(os.path.join(self.getWorkingDirectory(), "bestfile.dat"))
        self.setFileBestPar(os.path.join(self.getWorkingDirectory(), "bestfile.par"))

        EDUtilsFile.writeFile(self.getFileBestDat(), self.getDataInput().getBestFileContentDat().getValue())
        EDUtilsFile.writeFile(self.getFileBestPar(), self.getDataInput().getBestFileContentPar().getValue())

        listBestFileContentHKL = self.getDataInput().getBestFileContentHKL()

        iterator = 0
        for bestFileContentHKL in listBestFileContentHKL:
            iterator = iterator + 1
            bestFileHKL = os.path.join(self.getWorkingDirectory(), "bestfile" + str(iterator) + ".hkl")
            self.listFileBestHKL.append(bestFileHKL)
            EDUtilsFile.writeFile(bestFileHKL, bestFileContentHKL.getValue())


        if(self.getDataInput().getComplexity() is not None):
            self.setComplexity(self.getDataInput().getComplexity().getValue())

        self.initializeCommands()
开发者ID:edna-site,项目名称:edna,代码行数:26,代码来源:EDPluginBestv1_2.py

示例6: postProcess

    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG("EDPluginExecDammifv0_1.postProcess")
        # Create some output data

        pathLogFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammif.log"))
        pathFitFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammif.fit"))
        pathMoleculeFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammif-1.pdb"))
        pathSolventFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammif-0.pdb"))

        xsLogFile = XSDataFile(pathLogFile)
        xsFitFile = XSDataFile(pathFitFile)
        xsMoleculeFile = XSDataFile(pathMoleculeFile)
        xsSolventFile = XSDataFile(pathSolventFile)

        xsDataResult = XSDataResultDammif()
        if os.path.exists(pathLogFile.getValue()):
            xsDataResult.setLogFile(xsLogFile)
        if os.path.exists(pathFitFile.getValue()):
            xsDataResult.setFitFile(xsFitFile)
        if os.path.exists(pathMoleculeFile.getValue()):
            xsDataResult.setPdbMoleculeFile(xsMoleculeFile)
        if os.path.exists(pathSolventFile.getValue()):
            xsDataResult.setPdbSolventFile(xsSolventFile)

        xsDataResult.setChiSqrt(self.returnDammifChiSqrt())
        xsDataResult.setRfactor(self.returnDammifRFactor())

        self.setDataOutput(xsDataResult)
开发者ID:antolinos,项目名称:edna,代码行数:29,代码来源:EDPluginExecDammifv0_1.py

示例7: preProcess

 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecMtz2Variousv1_0.preProcess")
     xsDataInputRdfit = self.getDataInput()
     self.setScriptCommandline(self.generateCommands(xsDataInputRdfit))
     self.addListCommandPostExecution("gle -device png -resolution 100 %s" % self.strScaleIntensityGleFile)
     self.strScaleIntensityPlotPath = os.path.join(self.getWorkingDirectory(), self.strScaleIntensityPlot)
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:7,代码来源:EDPluginRdfitv1_0.py

示例8: postProcess

    def postProcess(self):
        self.DEBUG('Pointless: postProcess')
        EDPluginExecProcessScript.postProcess(self)
        output_file = self.dataInput.output_file.value

        sgre = re.compile(""" \* Space group = '(?P<sgstr>.*)' \(number\s+(?P<sgnumber>\d+)\)""")

        sgnumber = sgstr = None
        # returns None if the file does not exist...
        log = self.readProcessLogFile()
        if log is not None:
            # we'll apply the regexp to the whole file contents which
            # hopefully won't be that long.
            m = sgre.search(log)
            if m is not None:
                d = m.groupdict()
                sgnumber = d['sgnumber']
                sgstr = d['sgstr']

        res = XSDataPointlessOut()
        if sgnumber is not None:
            res.sgnumber = XSDataInteger(sgnumber)
        if sgstr is not None:
            res.sgstr = XSDataString(sgstr)
        status = XSDataStatus()
        status.isSuccess = XSDataBoolean(os.path.exists(output_file))
        res.status = status

        self.dataOutput = res
开发者ID:tbn,项目名称:edna,代码行数:29,代码来源:EDPluginExecPointless.py

示例9: postProcess

 def postProcess(self, _edObject=None):
     EDPluginExecProcessScript.postProcess(self)
     self.DEBUG("EDPluginExecDataverv1_0.postProcess")
     # Create some output data
     xsDataResult = XSDataResultDataver()
     xsDataResult.outputCurve = XSDataFile(XSDataString(self.strOutFile))
     self.setDataOutput(xsDataResult)
开发者ID:antolinos,项目名称:edna,代码行数:7,代码来源:EDPluginExecDataverv1_0.py

示例10: __init__

 def __init__(self):
     """
     """
     EDPluginExecProcessScript.__init__(self)
     self.setXSDataInputClass(XSDataInputMeasureOffsetSift)
     self.inputFiles = []
     self.outFile = None
开发者ID:gbourgh,项目名称:edna,代码行数:7,代码来源:EDPluginExecSiftOffsetv1_0.py

示例11: preProcess

 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecDataverv1_0.preProcess")
     self.lstInFiles = [i.path.value for i in  self.dataInput.inputCurve]
     if self.dataInput.outputCurve is not None:
         self.strOutFile = self.dataInput.outputCurve.path.value
     self.generateCommandLine()
开发者ID:antolinos,项目名称:edna,代码行数:7,代码来源:EDPluginExecDataverv1_0.py

示例12: __init__

 def __init__(self):
     """
     """
     EDPluginExecProcessScript.__init__(self)
     self.setXSDataInputClass(XSDataInputDataver)
     self.strOutFile = None
     self.lstInFiles = []
开发者ID:antolinos,项目名称:edna,代码行数:7,代码来源:EDPluginExecDataverv1_0.py

示例13: __init__

    def __init__(self):
        """
        """
        EDPluginExecProcessScript.__init__(self)
        self.__strCommandBeamSize = None
        self.__strCommandBeamFlux = None
        self.__strCommandBeamWavelength = None

        self.__strCommandCrystalSize = None
        self.__strCommandCrystalCell = None
        self.__strCommandCrystalNRES = None
        self.__strCommandCrystalNMON = None
        self.__strCommandCrystalNDNA = None
        self.__strCommandCrystalNRNA = None
        self.__strCommandCrystalPATM = None
        self.__strCommandCrystalSATM = None

        self.__strCommandExposureTime = None
        self.__strCommandImages = None

        self.__listCommandsRaddose = []

        self.__dictResults = {}

        # ugly workaround while waiting for RADDOSE XML output file
        for strAbsorbedDoseKeyword in EDPluginRaddosev10.__listABSORBED_DOSE:
            self.__dictResults[ strAbsorbedDoseKeyword ] = None

        self.__dictResults[ EDPluginRaddosev10.__strSOLVENT ] = None

        self.__fSolvent = None
        self.__fTimeToReachHendersonLimit = None

        self.setXSDataInputClass(XSDataRaddoseInput)
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:34,代码来源:EDPluginRaddosev10.py

示例14: preProcess

 def preProcess(self, _edObject=None):
     """
     Sets up the phenix.xtriage command line, uncompress mtz file if necessary
     """
     EDPluginExecProcessScript.preProcess(self, _edObject)
     self.DEBUG("EDPluginPhenixXtriagev1_1.preProcess...")
     # Check if we have a compressed mtz file...
     strPathMtz = self.dataInput.mtzFile.path.value
     if strPathMtz.endswith(".gz"):
         fIn = gzip.open(strPathMtz, "rb")
         fileContent = fIn.read()
         fIn.close()
         strMtzFileName = os.path.basename(strPathMtz).split(".gz")[0]
         self.strPathToLocalMtz = os.path.join(self.getWorkingDirectory(), strMtzFileName)
         fOut = open(self.strPathToLocalMtz, "wb")
         fOut.write(fileContent)
         fOut.close()
         strPathMtz = self.strPathToLocalMtz
     if self.dataInput.obsLabels is not None:
         strObsLabels = self.dataInput.obsLabels.value
     else:
         strObsLabels = "I,SIGI,merged"
     strCommandPhenixXtriage = "{0} obs={1}".format(strPathMtz, strObsLabels)
     # Necessary for Python 3 environment:
     self.addListCommandPreExecution("unset PYTHONPATH")
     self.setScriptCommandline(strCommandPhenixXtriage)
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:26,代码来源:EDPluginPhenixXtriagev1_1.py

示例15: __init__

 def __init__(self):
     """
     """
     EDPluginExecProcessScript.__init__(self)
     self.setXSDataInputClass(XSDataInputSaxsDelMetadatav1_0)
     self.strImage = None
     self.strKey = None
开发者ID:gbourgh,项目名称:edna,代码行数:7,代码来源:EDPluginExecSaxsDelMetadatav1_0.py


注:本文中的EDPluginExecProcessScript.EDPluginExecProcessScript类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。