Skip to content
Snippets Groups Projects
Commit 5cc8bc5e authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

CLI: add ability to dump IFO YAML data to stdout

parent f26b6d2a
No related branches found
No related tags found
1 merge request!12HDF5 support
......@@ -67,6 +67,8 @@ group.add_argument('--interactive', '-i', action='store_true',
help="open interactive shell when plotting")
group.add_argument('--save', '-s',
help="save noise (hdf5) or figure (pdf/png/etc) to file")
group.add_argument('--yaml', '-y', dest='yaml', action='store_true',
help="print specified IFO yaml to stdout and exit")
group.add_argument('--no-plot', '-np', action='store_false', dest='plot',
help="supress plotting")
parser.add_argument('IFO', default=IFO,
......@@ -92,6 +94,10 @@ def main():
else:
title = '{} GWINC Noise Budget'.format(args.IFO)
if args.yaml:
ifo = load_ifo(args.IFO)
print(ifo.to_yaml(), end='')
return
if args.dump:
ifo = precompIFO(ifo)
print(ifo.to_txt(), end='')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment