本文整理汇总了Python中EDUtilsTest.EDUtilsTest.getTestsDataImagesHome方法的典型用法代码示例。如果您正苦于以下问题:Python EDUtilsTest.getTestsDataImagesHome方法的具体用法?Python EDUtilsTest.getTestsDataImagesHome怎么用?Python EDUtilsTest.getTestsDataImagesHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDUtilsTest.EDUtilsTest
的用法示例。
在下文中一共展示了EDUtilsTest.getTestsDataImagesHome方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getTestsDataImagesHome
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataImagesHome [as 别名]
def getTestsDataImagesHome(self):
"""
Returns the Test data home directory
@return: TestsDataImagesHome
@rtype: string
"""
if (self.__strTestsDataImagesHome is None):
self.__strTestsDataImagesHome = EDUtilsTest.getTestsDataImagesHome()
return self.__strTestsDataImagesHome
示例2: __init__
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataImagesHome [as 别名]
def __init__(self, _edStringTestName=None):
EDTestCasePluginUnit.__init__(self, "EDPluginControlID11v1_0")
self.dictID11Reference = {
"1 DEGREE AZ": "NO",
"ANGLE OF TILT": "-0.63004673688",
"AZIMUTH BINS": "36",
"CONSERVE INT.": "NO",
"DARK CURRENT": "YES",
"DC FILE": os.path.join(EDUtilsTest.getTestsDataImagesHome(), "ID11-Dark.edf"),
"DIM1_DATA": "2048",
"DIM2_DATA": "2048",
"DISTANCE": "136.908",
"END AZIMUTH": "360",
"FF FILE": os.path.join(EDUtilsTest.getTestsDataImagesHome(), "ID11-Flat.edf"),
"FF MULTIPLIER": "1000.000",
"FF SCALE": "NO",
"FLAT-FIELD": "YES",
"GEOMETRY COR.": "YES",
"INNER RADIUS": "5",
"MASK FILE": "None",
"OUTER RADIUS": "1000",
"POLARISATION": "YES",
"RADIAL BINS": "20",
"SCAN TYPE": "2-THETA",
"SD FILE": os.path.join(EDUtilsTest.getTestsDataImagesHome(), "ID11-Frelon.spline"),
"SPATIAL DIS.": "YES",
"START AZIMUTH": "0.0",
"TILT ROTATION": "-2.51342948328",
"USE MASK": "NO",
"WAVELENGTH": "0.2952",
"X-BEAM CENTRE": "1002.509",
"X-PIXEL SIZE": "50",
"Y-BEAM CENTRE": "999.6282",
"Y-PIXEL SIZE": "50",
"input_extn": "edf",
"output_extn": "spr",
"saving_format": "SPREAD SHEET",
"output_dir": "/tmp/edna-" + os.environ["USER"],
}
示例3: parseParameterFiles
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataImagesHome [as 别名]
def parseParameterFiles(self, _strPath):
"""
parses Configuration file
"""
self.DEBUG("EDPluginControlID11v1_0.parseParameterFiles")
self.__dictID11 = {}
dictSub = {"${TEST_DATA_IMAGES_HOME}": EDUtilsTest.getTestsDataImagesHome()}
for linefile in EDUtilsFile.readFileAndParseVariables(_strPath, dictSub).split("\n"):
strLineData = linefile.strip()
#discard comment lines
if not strLineData.startswith('#') :
# discard end line carriage return
splited = strLineData.split("=", 1)
if len(splited) == 2:
self.__dictID11[splited[0].strip()] = splited[1].strip()
return self.__dictID11
示例4: preProcess
# 需要导入模块: from EDUtilsTest import EDUtilsTest [as 别名]
# 或者: from EDUtilsTest.EDUtilsTest import getTestsDataImagesHome [as 别名]
def preProcess(self):
"""
PreProcess of the execution test: download an EDF file from http://www.edna-site.org
and remove any existing output file, i.e. /tmp/diff6105.edf
"""
EDTestCasePluginExecute.preProcess(self)
self.loadTestImage([ "test_region1_dark_1_0040.edf"])
xsDataInputReference = XSDataInputExecCommandLine.parseString(self.readAndParseFile (self.getDataInputFile()))
strInputFile = xsDataInputReference.getInputFileName().getPath().getValue()
if not(os.path.isdir(os.path.dirname(strInputFile))):
os.makedirs(os.path.dirname(strInputFile), int("777", 8))
EDVerbose.DEBUG("temporary filename is :" + strInputFile)
shutil.copy(os.path.join(EDUtilsTest.getTestsDataImagesHome(), "test_region1_dark_1_0040.edf"), strInputFile)
strInputXML = self.readAndParseFile (self.getDataInputFile())
xsDataInputReference = XSDataInputExecCommandLine.parseString(strInputXML)
outputFileName = xsDataInputReference.getInputFileName().getPath().getValue() + ".gz"
EDVerbose.DEBUG(" Output file is %s" % outputFileName)
if os.path.isfile(outputFileName):
EDVerbose.DEBUG(" Output file exists %s, I will remove it" % outputFileName)
os.remove(outputFileName)