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
ac2ac7bf
Commit
ac2ac7bf
authored
5 years ago
by
Jameson Graef Rollins
Browse files
Options
Downloads
Patches
Plain Diff
add BNS range to comparison plot
parent
90f2ac40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gwinc/ifo/__main__.py
+20
-6
20 additions, 6 deletions
gwinc/ifo/__main__.py
with
20 additions
and
6 deletions
gwinc/ifo/__main__.py
+
20
−
6
View file @
ac2ac7bf
...
...
@@ -2,6 +2,8 @@ import argparse
import
numpy
as
np
import
matplotlib.pyplot
as
plt
import
inspiral_range
from
.
import
IFOS
,
PLOT_STYLE
from
..
import
load_budget
...
...
@@ -26,11 +28,22 @@ def main():
freq
=
np
.
logspace
(
np
.
log10
(
FLO
),
np
.
log10
(
FHI
),
NPOINTS
)
budgets
=
{}
range_pad
=
0
for
ifo
in
IFOS
:
Budget
=
load_budget
(
ifo
)
data
=
Budget
(
freq
).
calc
()
label
=
Budget
.
name
budget
=
load_budget
(
ifo
)(
freq
)
name
=
budget
.
name
budgets
[
name
]
=
budget
range_pad
=
max
(
len
(
name
),
range_pad
)
for
name
,
budget
in
budgets
.
items
():
data
=
budget
.
calc
()
BNS_range
=
inspiral_range
.
range
(
freq
,
data
)
label
=
'
{name:<{pad}} {bns:>6.0f} Mpc
'
.
format
(
name
=
name
,
pad
=
range_pad
,
bns
=
BNS_range
,
)
ax
.
loglog
(
freq
,
np
.
sqrt
(
data
),
label
=
label
)
ax
.
grid
(
...
...
@@ -42,8 +55,8 @@ def main():
)
ax
.
legend
(
# ncol=2,
fontsize
=
'
small
'
,
prop
=
{
'
family
'
:
'
monospace
'
},
)
ax
.
autoscale
(
enable
=
True
,
axis
=
'
y
'
,
tight
=
True
)
...
...
@@ -52,7 +65,8 @@ def main():
ax
.
set_xlabel
(
'
Frequency [Hz]
'
)
ax
.
set_ylabel
(
PLOT_STYLE
[
'
ylabel
'
])
ax
.
set_title
(
"
PyGWINC reference IFO strain comparison
"
)
ax
.
set_title
(
"""
PyGWINC reference IFO strain comparison
(with BNS range)
"""
)
if
args
.
save
:
fig
.
savefig
(
args
.
save
)
...
...
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