From 4a9f3a7dc269523b863e00d5353b7b4b50feb0da Mon Sep 17 00:00:00 2001 From: Carlo Guidi <cguidi@km3net.de> Date: Tue, 14 Jan 2020 16:41:26 +0100 Subject: [PATCH] Apply suggestion to scripts/acoustics.py --- scripts/acoustics.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/scripts/acoustics.py b/scripts/acoustics.py index 43a1f95..6390688 100644 --- a/scripts/acoustics.py +++ b/scripts/acoustics.py @@ -31,19 +31,11 @@ def diff(first, second): return [item for item in first if item not in second] -parser = argparse.ArgumentParser(description = 'Online_monitoring') -parser.add_argument('-d', dest = 'det_id', type = str, nargs = 1, required = True, - help = 'The detector ID (e.g. D_ORCA005)') -parser.add_argument('-ndu', dest = 'n_dus', type = int, nargs = 1, required = True, - help = 'Number of DUs (e.g. 5)') -parser.add_argument('-o', dest = 'plot_dir', type = str, nargs = 1, required = True, - help = 'Directory in which the plot is saved') - -args = parser.parse_args() -detid = args.det_id[0] -directory = args.plot_dir[0] -N_DUS = args.n_dus[0] +args = docopt(__doc__) +detid = args['-d'] +directory = args['-o'] +N_DUS = args['-n'] db = kp.db.DBManager() sds = kp.db.StreamDS() -- GitLab