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


Python EDPluginExecProcessScript.preProcess方法代码示例

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


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

示例1: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
    def preProcess(self):
        EDPluginExecProcessScript.preProcess(self)
        self.DEBUG('XdsToSca: preprocess')

        self.addInputLine('xdsfile {0}'.format(self.dataInput.hkl_file.path.value))
        self.addInputLine('scafile {0}'.format(self.dataInput.sca_file.path.value))
        self.addInputLine('end')
开发者ID:edna-site,项目名称:edna,代码行数:9,代码来源:EDPluginExecXdsToSca.py

示例2: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess(self, _edObject=None):
     """
     Pre-Process: Generate the script 
     """
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecCommandLinev10.preProcess")
     self.generateScript()
开发者ID:gbourgh,项目名称:edna,代码行数:9,代码来源:EDPluginExecCommandLinev10.py

示例3: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
    def preProcess(self):
        EDPluginExecProcessScript.preProcess(self)
        self.DEBUG('Truncate: preprocess')
        input_file = self.dataInput.input_file.value
        output_file = self.dataInput.output_file.value
        options = 'hklin {0} hklout {1}'.format(input_file, output_file)
        self.setScriptCommandline(options)
        self.DEBUG('command line options set to {0}'.format(options))

        nres = self.dataInput.nres.value
        anom = self.dataInput.anom.value
        res = self.dataInput.res.value
        if res is None:
            res = 0

        self.addListCommandExecution('nres {0}'.format(nres))
        self.addListCommandExecution('truncate YES')
        self.addListCommandExecution('anomalous {0}'.format(anom))
        self.addListCommandExecution('plot OFF')
        self.addListCommandExecution('labout F=F_xdsproc SIGF=SIGF_xdsproc')
        self.addListCommandExecution('falloff YES')
        self.addListCommandExecution('resolution 50 {0}'.format(res))
        self.addListCommandExecution('PNAME foo')
        self.addListCommandExecution('DNAME foo')
        self.addListCommandExecution('end')
开发者ID:edna-site,项目名称:edna,代码行数:27,代码来源:EDPluginExecTruncate.py

示例4: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 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,代码行数:28,代码来源:EDPluginPhenixXtriagev1_1.py

示例5: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
    def preProcess(self, _edObject=None):
        EDPluginExecProcessScript.preProcess(self)
        EDVerbose.DEBUG("EDPluginSPDCakev1_0.preProcess")
        # Check that the input data and correction images are present
        xsDataInputSPDCake = self.getDataInput()
        pathToInputFile = xsDataInputSPDCake.getInputFile().getPath().getValue()
        if (not os.path.exists(pathToInputFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pathToInputFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pathToDarkCurrentImageFile = xsDataInputSPDCake.getDarkCurrentImageFile().getPath().getValue()
        if (not os.path.exists(pathToDarkCurrentImageFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pathToDarkCurrentImageFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pathToFlatFieldImageFile = xsDataInputSPDCake.getFlatFieldImageFile().getPath().getValue()
        if (not os.path.exists(pathToFlatFieldImageFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pathToFlatFieldImageFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        pathToSpatialDistortionFile = xsDataInputSPDCake.getSpatialDistortionFile().getPath().getValue()
        if (not os.path.exists(pathToSpatialDistortionFile)):
            strErrorMessage = EDMessage.ERROR_CANNOT_READ_FILE_02 % (self.getPluginName() + ".preProcess", pathToSpatialDistortionFile)
            EDVerbose.error(strErrorMessage)
            self.addErrorMessage(strErrorMessage)
            raise RuntimeError, strErrorMessage
        if xsDataInputSPDCake.getOutputDir() is not None:
            self.outputDir = xsDataInputSPDCake.getOutputDir().getPath().getValue()
            if not os.path.isdir(self.outputDir):
                os.makedirs(self.outputDir)

        self.generateSPDCommand()
开发者ID:kif,项目名称:edna,代码行数:37,代码来源:EDPluginSPDCakev1_0.py

示例6: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
    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,代码行数:31,代码来源:EDPluginExecDcrawv1_0.py

示例7: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 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,代码行数:9,代码来源:EDPluginRdfitv1_0.py

示例8: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
    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,代码行数:28,代码来源:EDPluginBestv1_2.py

示例9: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 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,代码行数:29,代码来源:EDPluginExecSaxsMacv1_0.py

示例10: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecDatcmpv1_0.preProcess")
     self.listFiles = [i.path.value for i in self.getDataInput().inputCurve if os.path.isfile(i.path.value)]
     if len(self.listFiles) != 2:
         self.WARNING("You did not provide the right number of valid files !!! %s" % " ".join(self.listFiles))
     self.generateDatcmpScript()
开发者ID:gbourgh,项目名称:edna,代码行数:9,代码来源:EDPluginExecDatcmpv2_0.py

示例11: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 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,代码行数:9,代码来源:EDPluginExecDataverv1_0.py

示例12: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     EDVerbose.DEBUG("EDPluginSTACv10.preProcess")
     xsPluginItem = self.getConfiguration()
     self.addListCommandPreExecution("export STACDIR=%s" % EDConfiguration.getStringParamValue(xsPluginItem, "STACDIR"))
     self.addListCommandPreExecution("export BCMDEF=%s" % EDConfiguration.getStringParamValue(xsPluginItem, "BCMDEF"))
     self.addListCommandPreExecution("export RUNDIR=%s" % self.getWorkingDirectory())
     self.setScriptCommandline("stac.core.STAC_DNA_listener %s -%s/" % (self.getSTACcommand(), self.getWorkingDirectory()))
开发者ID:olofsvensson,项目名称:edna-plugins-mx,代码行数:10,代码来源:EDPluginSTACv10.py

示例13: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess( self, _edObject = None ):
     EDPluginExecProcessScript.preProcess( self )
     EDVerbose.DEBUG( "*** EDPluginExecDIMPLEMTZDUMPv10.preProcess")
     self.generateDIMPLEMTZDUMPCommands()
     if self.getDataInput().getOutputLogFile() != None:
        self.setScriptLogFileName(self.getDataInput().getOutputLogFile().getPath().getValue())
        EDVerbose.DEBUG( "*** EDPluginExecDIMPLEPDBSETv10.preProcess - setting log file to: " \
                         + self.getScriptLogFileName())
开发者ID:antolinos,项目名称:edna,代码行数:10,代码来源:EDPluginExecDIMPLEMTZDUMPv10.py

示例14: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess(self, _edObject=None):
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecRsync.preProcess")
     self.strSource = self.dataInput.source.path.value
     self.strDestination = self.dataInput.destination.path.value
     if self.dataInput.options is not None:
         self.strOption = self.dataInput.options.value
     self.generateCommandLine()
开发者ID:gbourgh,项目名称:edna,代码行数:10,代码来源:EDPluginExecRsync.py

示例15: preProcess

# 需要导入模块: from EDPluginExecProcessScript import EDPluginExecProcessScript [as 别名]
# 或者: from EDPluginExecProcessScript.EDPluginExecProcessScript import preProcess [as 别名]
 def preProcess(self, _edObject = None):
     EDPluginExecProcessScript.preProcess(self)
     self.DEBUG("EDPluginExecDimplev1_0.preProcess")
     xsDataInputDimple = self.getDataInput()
     strMtzFile = xsDataInputDimple.mtz.path.value
     strPdbFile = xsDataInputDimple.pdb.path.value
     self.strDimpleDir = os.path.join(self.getWorkingDirectory(), "dimple")
     self.setScriptCommandline(" " + strMtzFile + " " + strPdbFile + " " + self.strDimpleDir)
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:10,代码来源:EDPluginExecDimplev1_0.py


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