WALL-E: Einmal aufräumen und zurück!

This commit is contained in:
2016-03-30 08:14:58 +02:00
parent a2640e3126
commit d7cfd0d176
29 changed files with 1285 additions and 1105 deletions
+14 -12
View File
@@ -11,6 +11,7 @@ from pylot.core.loc import nll
from pylot.core.loc import hsat
from pylot.core.loc import velest
def readFilterInformation(fname):
def convert2FreqRange(*args):
if len(args) > 1:
@@ -18,6 +19,7 @@ def readFilterInformation(fname):
elif len(args) == 1:
return float(args[0])
return None
filter_file = open(fname, 'r')
filter_information = dict()
for filter_line in filter_file.readlines():
@@ -26,14 +28,14 @@ def readFilterInformation(fname):
if pos == '\n':
filter_line[n] = ''
filter_information[filter_line[0]] = {'filtertype': filter_line[1]
if filter_line[1]
else None,
if filter_line[1]
else None,
'order': int(filter_line[2])
if filter_line[1]
else None,
if filter_line[1]
else None,
'freq': convert2FreqRange(*filter_line[3:])
if filter_line[1]
else None}
if filter_line[1]
else None}
return filter_information
@@ -41,15 +43,15 @@ FILTERDEFAULTS = readFilterInformation(os.path.join(os.path.expanduser('~'),
'.pylot',
'filter.in'))
OUTPUTFORMATS = {'.xml':'QUAKEML',
'.cnv':'CNV',
'.obs':'NLLOC_OBS'}
OUTPUTFORMATS = {'.xml': 'QUAKEML',
'.cnv': 'CNV',
'.obs': 'NLLOC_OBS'}
LOCTOOLS = dict(nll = nll, hsat = hsat, velest = velest)
LOCTOOLS = dict(nll=nll, hsat=hsat, velest=velest)
COMPPOSITION_MAP = dict(Z = 2, N = 1, E = 0)
COMPPOSITION_MAP = dict(Z=2, N=1, E=0)
COMPPOSITION_MAP['1'] = 1
COMPPOSITION_MAP['2'] = 0
COMPPOSITION_MAP['3'] = 2
COMPNAME_MAP = dict(Z = '3', N = '1', E = '2')
COMPNAME_MAP = dict(Z='3', N='1', E='2')