Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Lee McCuller
pygwinc
Commits
edcf83fe
Commit
edcf83fe
authored
7 years ago
by
Jameson Graef Rollins
Browse files
Options
Downloads
Patches
Plain Diff
show available included IFOs in CLI help
parent
e5c08461
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gwinc/__main__.py
+8
-2
8 additions, 2 deletions
gwinc/__main__.py
gwinc/ifo/__init__.py
+9
-0
9 additions, 0 deletions
gwinc/ifo/__init__.py
with
17 additions
and
2 deletions
gwinc/__main__.py
+
8
−
2
View file @
edcf83fe
...
...
@@ -7,13 +7,19 @@ from IPython.terminal.embed import InteractiveShellEmbed
import
logging
logging
.
basicConfig
(
level
=
logging
.
INFO
)
from
.
import
load_ifo
from
.
ifo
import
available_ifos
,
load_ifo
from
.
import
plot_noise
##################################################
description
=
"""
Plot GWINC noise budget for specified IFO
description
=
"""
Plot GWINC noise budget for specified IFO
.
Available included IFOs: {}
"""
.
format
(
'
,
'
.
join
([
"'
{}
'"
.
format
(
ifo
)
for
ifo
in
available_ifos
()]))
# for ifo in available_ifos():
# description += " '{}'\n".format(ifo)
description
+=
"""
If the inspiral_range package is installed, various figures of merit
can be calculated for the resultant spectrum with the --fom argument,
e.g.:
...
...
This diff is collapsed.
Click to expand it.
gwinc/ifo/__init__.py
+
9
−
0
View file @
edcf83fe
import
os
import
re
import
fnmatch
import
yaml
import
scipy
import
scipy.io
...
...
@@ -208,6 +209,14 @@ class Struct(object):
raise
IOError
(
"
Unknown file type: {}
"
.
format
(
ext
))
def
available_ifos
():
"""
List available included IFO files
"""
ifos
=
[]
for
f
in
os
.
listdir
(
os
.
path
.
dirname
(
__file__
)):
if
fnmatch
.
fnmatch
(
f
,
'
*.yaml
'
):
ifos
.
append
(
f
.
split
(
'
.
'
)[
0
])
return
ifos
def
load_ifo
(
name_or_path
):
"""
Load IFO by name or from file.
...
...
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