Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gwinc
pygwinc
Commits
242c3e53
Commit
242c3e53
authored
5 years ago
by
Jameson Graef Rollins
Browse files
Options
Downloads
Patches
Plain Diff
cli: allow overriding ifo parameters from the command line
using --ifo option. closes
#19
parent
9eff54b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!68
Cli improvements
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+6
-0
6 additions, 0 deletions
README.md
gwinc/__main__.py
+15
-1
15 additions, 1 deletion
gwinc/__main__.py
with
21 additions
and
1 deletion
README.md
+
6
−
0
View file @
242c3e53
...
...
@@ -68,6 +68,12 @@ Materials.Coating.Philown 5e-05 3e-05
$
python3
-m
gwinc my_aLIGO.yaml
```
You can also use the
`--ifo`
option to change parameters from the
command line:
```
shell
$
python3
-m
gwinc aLIGO
--ifo
Optics.SRM.Tunephase
=
3.14
```
Stand-alone YAML files will always assume the nominal
[
'aLIGO' budget
description
](
gwinc/ifo/aLIGO
)
.
...
...
This diff is collapsed.
Click to expand it.
gwinc/__main__.py
+
15
−
1
View file @
242c3e53
...
...
@@ -34,8 +34,12 @@ input file (IFO) can be an HDF5 file saved from a previous call, in
which case all noise traces and IFO parameters will be loaded from
that file.
Individual IFO parameters can be overriden with the --ifo option:
gwinc --ifo Optics.SRM.Tunephase=3.14 ...
If the inspiral_range package is installed, various figures of merit
can be calculated for the resultant spectrum with the --fom
argument
,
can be calculated for the resultant spectrum with the --fom
option
,
e.g.:
gwinc --fom horizon ...
...
...
@@ -55,6 +59,11 @@ parser = argparse.ArgumentParser(
parser
.
add_argument
(
'
--freq
'
,
'
-f
'
,
metavar
=
'
FSPEC
'
,
help
=
"
frequency array specification in Hz, either as
'
flo:fhi
'
or
'
flo:npoints:fhi
'
[{}]
"
.
format
(
FREQ
))
parser
.
add_argument
(
'
--ifo
'
,
'
-o
'
,
#nargs='+', action='extend',
action
=
'
append
'
,
help
=
"
override budget IFO parameter (may be specified multiple times)
"
)
parser
.
add_argument
(
'
--title
'
,
'
-t
'
,
help
=
"
plot title
"
)
...
...
@@ -126,6 +135,11 @@ def main():
plot_style
=
getattr
(
Budget
,
'
plot_style
'
,
{})
traces
=
None
if
args
.
ifo
:
for
paramval
in
args
.
ifo
:
param
,
val
=
paramval
.
split
(
'
=
'
,
1
)
ifo
[
param
]
=
float
(
val
)
if
args
.
yaml
:
if
not
ifo
:
parser
.
exit
(
2
,
"
no IFO structure available.
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment