Dirty revision

This commit is contained in:
Ludger Küperkoch 2015-05-20 10:56:53 +02:00
parent 9a4677c794
commit b588c29513

View File

@ -34,7 +34,7 @@ def autoPyLoT(inputfile):
# reading parameter file # reading parameter file
parameter = AutoPickParameter(inputfile) parameter = AutoPickParameter(inputfile)
data = Data() data = Data()
# declaring parameter variables (only for convenience) # declaring parameter variables (only for convenience)
@ -48,7 +48,6 @@ def autoPyLoT(inputfile):
thosmw = parameter.getParam('tlta') thosmw = parameter.getParam('tlta')
# getting information on data structure # getting information on data structure
if parameter.hasParam('datastructure'): if parameter.hasParam('datastructure'):
datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]() datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]()
dsfields = {'root':parameter.getParam('rootpath'), dsfields = {'root':parameter.getParam('rootpath'),
@ -64,20 +63,23 @@ def autoPyLoT(inputfile):
datastructure.setExpandFields(exf) datastructure.setExpandFields(exf)
# process each event in database
# process each event in database # process each event in database
datapath = datastructure.expandDataPath() datapath = datastructure.expandDataPath()
if not parameter.hasParam('eventID'): if not parameter.hasParam('eventID'):
for event in glob.glob(os.path.join(datapath, '*')): - #for event in glob.glob(os.path.join(datapath, '*')):
+ for event in [events for events in glob.glob(os.path.join(datapath, '*')) if os.path.isdir(events)]:
data.setWFData(os.path.join(datapath, event, '*')) data.setWFData(os.path.join(datapath, event, '*'))
print data print data
else: else:
data.setWFData(os.path.join(datapath, '*')) data.setWFData([os.path.join(datapath, '*')])
print data
if __name__ == "__main__": if __name__ == "__main__":
# parse arguments # parse arguments
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description='''This program visualizes Probabilistic Power Spectral Densities.''') description='''This program ''')
parser.add_argument('-i', '-I', '--inputfile', type=str, parser.add_argument('-i', '-I', '--inputfile', type=str,
action='store', action='store',