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
f26b6d2a
Commit
f26b6d2a
authored
6 years ago
by
Jameson Graef Rollins
Browse files
Options
Downloads
Patches
Plain Diff
CLI: load noise budget from HDF5 for plotting
Add ability to load a noise budget previously saved in an HDF5 file.
parent
d268a030
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!12
HDF5 support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gwinc/__main__.py
+24
-11
24 additions, 11 deletions
gwinc/__main__.py
with
24 additions
and
11 deletions
gwinc/__main__.py
+
24
−
11
View file @
f26b6d2a
...
...
@@ -70,7 +70,7 @@ group.add_argument('--save', '-s',
group
.
add_argument
(
'
--no-plot
'
,
'
-np
'
,
action
=
'
store_false
'
,
dest
=
'
plot
'
,
help
=
"
supress plotting
"
)
parser
.
add_argument
(
'
IFO
'
,
default
=
IFO
,
help
=
"
IFO name or description file path (.yaml, .mat, .m)
"
)
help
=
"
IFO name or description file path (.yaml, .mat, .m)
, or full HDF5 data file
"
)
def
main
():
...
...
@@ -78,15 +78,25 @@ def main():
args
=
parser
.
parse_args
()
ifo
=
load_ifo
(
args
.
IFO
)
##########
# initial arg processing
if
os
.
path
.
splitext
(
args
.
IFO
)[
1
]
==
'
.hdf5
'
:
title
,
ifo
,
noises
=
util
.
load_hdf5
(
args
.
IFO
)
else
:
ifo
=
load_ifo
(
args
.
IFO
)
noises
=
None
if
args
.
title
:
title
=
args
.
title
else
:
title
=
'
{} GWINC Noise Budget
'
.
format
(
args
.
IFO
)
if
args
.
dump
:
ifo
=
precompIFO
(
ifo
)
print
(
ifo
.
to_txt
(),
end
=
''
)
return
freq
=
np
.
logspace
(
np
.
log10
(
args
.
flo
),
np
.
log10
(
args
.
fhi
),
args
.
npoints
)
if
args
.
matlab
:
gwinc
=
gwinc_matlab
.
gwinc_matlab
else
:
...
...
@@ -110,19 +120,22 @@ def main():
v
=
float
(
v
)
range_params
[
p
]
=
v
logging
.
info
(
"
calculating noises...
"
)
score
,
noises
,
ifo
=
gwinc
(
freq
,
ifo
)
##########
# main calculations
if
noises
:
freq
=
noises
[
'
Freq
'
]
else
:
logging
.
info
(
"
calculating noises...
"
)
freq
=
np
.
logspace
(
np
.
log10
(
args
.
flo
),
np
.
log10
(
args
.
fhi
),
args
.
npoints
)
score
,
noises
,
ifo
=
gwinc
(
freq
,
ifo
)
logging
.
info
(
'
recycling factor: {: >0.3f}
'
.
format
(
ifo
.
gwinc
.
prfactor
))
logging
.
info
(
'
BS power: {: >0.3f} W
'
.
format
(
ifo
.
gwinc
.
pbs
))
logging
.
info
(
'
arm finesse: {: >0.3f}
'
.
format
(
ifo
.
gwinc
.
finesse
))
logging
.
info
(
'
arm power: {: >0.3f} kW
'
.
format
(
ifo
.
gwinc
.
parm
/
1000
))
if
args
.
title
:
title
=
args
.
title
else
:
title
=
'
{} GWINC Noise Budget
'
.
format
(
args
.
IFO
)
if
args
.
fom
:
logging
.
info
(
"
calculating inspiral {}...
"
.
format
(
range_func
))
H
=
inspiral_range
.
CBCWaveform
(
freq
,
**
range_params
)
...
...
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