gstlal
1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
bin
gstlal_psd_workflow
1
#!/usr/bin/env python3
2
#
3
# Copyright (C) 2020 Patrick Godwin (patrick.godwin@ligo.org)
4
#
5
# This program is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by the
7
# Free Software Foundation; either version 2 of the License, or (at your
8
# option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13
# Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License along
16
# with this program; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19
20
import
argparse
21
22
from
gstlal.config
import
Config
23
from
gstlal.dags
import
DAG
24
25
26
parser = argparse.ArgumentParser()
27
parser.add_argument(
"-c"
,
"--config"
, help=
"Sets the path to read configuration from."
)
28
29
# load config
30
args = parser.parse_args()
31
config = Config.load(args.config)
32
config.setup()
33
34
# create dag
35
dag = DAG(config)
36
dag.create_log_dir()
37
38
# generate dag layers
39
ref_psd = dag.reference_psd()
40
median_psd = dag.median_psd(ref_psd)
41
42
# write dag/script to disk
43
dag_name =
"psd_dag"
44
dag.write_dag(f
"{dag_name}.dag"
)
45
dag.write_script(f
"{dag_name}.sh"
)
Generated by
1.17.0