From b588c29513af04f8f2ece4d5d89811039e2759bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Wed, 20 May 2015 10:56:53 +0200 Subject: [PATCH] Dirty revision --- autoPyLoT.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/autoPyLoT.py b/autoPyLoT.py index a3e82aa3..38b273bc 100755 --- a/autoPyLoT.py +++ b/autoPyLoT.py @@ -34,7 +34,7 @@ def autoPyLoT(inputfile): # reading parameter file parameter = AutoPickParameter(inputfile) - + data = Data() # declaring parameter variables (only for convenience) @@ -48,7 +48,6 @@ def autoPyLoT(inputfile): thosmw = parameter.getParam('tlta') # getting information on data structure - if parameter.hasParam('datastructure'): datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]() dsfields = {'root':parameter.getParam('rootpath'), @@ -64,20 +63,23 @@ def autoPyLoT(inputfile): datastructure.setExpandFields(exf) + # process each event in database # process each event in database datapath = datastructure.expandDataPath() 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, '*')) print data else: - data.setWFData(os.path.join(datapath, '*')) + data.setWFData([os.path.join(datapath, '*')]) + print data if __name__ == "__main__": # parse arguments parser = argparse.ArgumentParser( - description='''This program visualizes Probabilistic Power Spectral Densities.''') + description='''This program ''') parser.add_argument('-i', '-I', '--inputfile', type=str, action='store',