-
Notifications
You must be signed in to change notification settings - Fork 2
/
argparser.py
75 lines (60 loc) · 3.29 KB
/
argparser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import argparse
DEFAULT_FIGURE_FOLDER = "figures/"
DEFAULT_PREPROCESSING_FOLDER = "preproc/"
DEFAULT_RESULTS_FOLDER = "results_for_motion_detection/"
DEFAULT_ROOT_STATS = "."
DEFAULT_ROOT_SYN = "../synaptogenesis/"
parser = argparse.ArgumentParser(
description='Module to analyse the quality of the topographic maps '
'generated by SpiNNaker')
flags = parser.add_argument_group('flag arguments')
parser.add_argument('path', help='path of .npz archive', nargs='*')
parser.add_argument('-i', '--input', type=str, nargs="*",
help="name(s) of the npz archive storing "
"the results from running the simulations",
dest='input')
parser.add_argument('-o', '--output', type=str,
help="name of the numpy archive storing simulation results",
dest='filename')
parser.add_argument('--fig_folder', type=str,
help="directory for figures -- [default {}]".format(DEFAULT_FIGURE_FOLDER),
dest='fig_folder', default=DEFAULT_FIGURE_FOLDER)
parser.add_argument('--results_folder', type=str,
help="directory for reading in results -- [default {}]".format(DEFAULT_RESULTS_FOLDER),
dest='results_folder', default=DEFAULT_RESULTS_FOLDER)
parser.add_argument('--preproc_folder', type=str,
help="directory for reading in results -- [default {}]".format(DEFAULT_PREPROCESSING_FOLDER),
dest='preproc_folder',
default=DEFAULT_PREPROCESSING_FOLDER)
parser.add_argument('--root_stats', type=str,
help="path to directory for reading in stats -- [default {}]".format(
DEFAULT_ROOT_STATS),
dest='root_stats',
default=DEFAULT_ROOT_STATS)
parser.add_argument('--root_syn', type=str,
help="path to directory for reading in synaptogenesis simulations -- [default {}]".format(
DEFAULT_ROOT_SYN),
dest='root_syn',
default=DEFAULT_ROOT_SYN)
flags.add_argument('--plot', help="display plots",
action="store_true")
flags.add_argument('--snapshots', help="run snapshot analysis",
action="store_true")
# flag to force re-analysis
flags.add_argument('--no-cache', help="force simulation re-analysis without "
"using cached information",
action="store_true", dest="no_cache")
flags.add_argument('--time_to_waste', help="we have time to waste with Elephant",
action="store_true", dest="time_to_waste")
# flags to control which types of analysis will be run
flags.add_argument('--singles', help="analyse all single experiments",
action="store_true")
flags.add_argument('--comparisons', help="analyse all comparison experiments",
action="store_true")
flags.add_argument('--evolutions', help="analyse all evolution experiments",
action="store_true")
flags.add_argument('--elephants', help="analyse all elephant experiments",
action="store_true")
flags.add_argument('--batches', help="analyse all batch experiments",
action="store_true")
args = parser.parse_args()