Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
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
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
lscsoft
GstLAL
Commits
8741e330
Commit
8741e330
authored
3 years ago
by
ChiWai Chan
Browse files
Options
Downloads
Patches
Plain Diff
gstlal_inspiral_plot_rankingstats_horizon: update docstring and fix
minor bug.
parent
30625887
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!114
Plot horizon distance from ranking statistics
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gstlal-inspiral/bin/gstlal_inspiral_plot_rankingstats_horizon
+2
-1
2 additions, 1 deletion
...al-inspiral/bin/gstlal_inspiral_plot_rankingstats_horizon
gstlal-inspiral/python/plots/horizon.py
+7
-3
7 additions, 3 deletions
gstlal-inspiral/python/plots/horizon.py
with
9 additions
and
4 deletions
gstlal-inspiral/bin/gstlal_inspiral_plot_rankingstats_horizon
+
2
−
1
View file @
8741e330
...
...
@@ -29,7 +29,8 @@ from gstlal.plots import horizon
from
lal.utils
import
CacheEntry
def
parse_command_line
():
parser
=
OptionParser
(
description
=
__doc__
)
usage
=
"
Usage: %prog [options] file1 file2 ...
"
parser
=
OptionParser
(
description
=
__doc__
,
usage
=
usage
)
parser
.
add_option
(
"
-o
"
,
"
--outdir
"
,
default
=
"
.
"
,
help
=
"
Set the output directory. By default, current directory will be used.
"
)
parser
.
add_option
(
"
-f
"
,
"
--format
"
,
default
=
"
png
"
,
help
=
"
Set the output format. By default, the output will be a png file.
"
)
...
...
This diff is collapsed.
Click to expand it.
gstlal-inspiral/python/plots/horizon.py
+
7
−
3
View file @
8741e330
...
...
@@ -73,12 +73,16 @@ class HorizonDistance:
Returns:
An instance of HorizionDistance.
Note:
The ranking statistic files are expectd to be in the same
template bank bin.
"""
loader
=
cls
.
datasource_loader
(
sources
)
urls
=
loader
(
sources
)
rankingstat
=
far
.
marginalize_pdf_urls
(
urls
,
"
RankingStat
"
,
verbose
=
verbose
)
horizon_history_dict
=
rankingstat
.
numerator
.
horizon_history
return
cls
(
horizon_history_dict
)
return
cls
(
horizon_history_dict
,
verbose
=
verbose
)
@classmethod
def
from_psds
(
cls
,
sources
,
verbose
=
False
):
...
...
@@ -100,7 +104,7 @@ class HorizonDistance:
for
ifo
,
psd
in
psds
.
items
():
if
psd
is
not
None
:
horizon_history_dict
[
ifo
].
update
({
int
(
psd
.
epoch
):
HorizonDistance
(
10.
,
2048.
,
psd
.
deltaF
,
1.4
,
1.4
)(
psd
,
8.
)[
0
]})
return
cls
(
horizon_history_dict
)
return
cls
(
horizon_history_dict
,
verbose
=
verbose
)
@staticmethod
def
datasource_loader
(
sources
):
...
...
@@ -160,7 +164,7 @@ class HorizonDistance:
ax
[
1
].
hist
(
horizon_dist
,
binvec
,
alpha
=
0.5
,
color
=
plotutil
.
colour_from_instruments
([
ifo
]),
label
=
ifo
)
if
self
.
verbose
:
sys
.
stderr
.
write
(
"
plotting
"
+
output
)
sys
.
stderr
.
write
(
"
plotting
"
+
str
(
output
)
+
"
\n
"
)
ax
[
0
].
set_xlabel
(
"
Time (ks) from GPS {:d}
"
.
format
(
mint
))
ax
[
0
].
set_ylabel
(
"
Mpc
"
)
...
...
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