Skip to content

Commit 2646211

Browse files
committed
Add --traceid option to plot_pair subparser
1 parent 69e52be commit 2646211

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

requake/config/parse_arguments.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,19 @@ def parse_arguments(progname='requake'):
183183
type=float, default=None,
184184
help='maximum cross-correlation coefficient (default: %(default)s)'
185185
)
186+
# --- traceid
187+
# a parent parser for the "traceid" option,
188+
# used by several subparsers
189+
traceid = argparse.ArgumentParser(add_help=False)
190+
traceid.add_argument(
191+
'-t', '--traceid', type=str, default=None,
192+
help='use this traceid instead of the one set in the config file'
193+
)
186194
# ---
187195
# --- plot_pair
188196
plot_pair = subparser.add_parser(
189197
'plot_pair',
198+
parents=[traceid],
190199
help='plot traces for a given event pair'
191200
)
192201
plot_pair.add_argument('evid1')
@@ -286,14 +295,6 @@ def parse_arguments(progname='requake'):
286295
'expressed in years. Also note that this option is ignored if '
287296
'the -c/--colorby option is set to "family_number".'
288297
)
289-
# --- traceid
290-
# a parent parser for the "traceid" option,
291-
# used by several subparsers
292-
traceid = argparse.ArgumentParser(add_help=False)
293-
traceid.add_argument(
294-
'-t', '--traceid', type=str, default=None,
295-
help='use this traceid instead of the default one for the family'
296-
)
297298
# ---
298299
# --- print_families
299300
subparser.add_parser(

0 commit comments

Comments
 (0)