Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
gstlal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
2
Merge Requests
2
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
gstlal
Commits
4c466fba
Commit
4c466fba
authored
Feb 17, 2020
by
ChiWai Chan
Committed by
Patrick Godwin
Jul 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gstlal_inspiral_plot_snr: update codes to plot all SNRs in a template bank bin
parent
45051774
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
gstlal-inspiral/bin/gstlal_inspiral_plot_snr
gstlal-inspiral/bin/gstlal_inspiral_plot_snr
+17
-15
No files found.
gstlal-inspiral/bin/gstlal_inspiral_plot_snr
View file @
4c466fba
...
...
@@ -2,10 +2,10 @@
"""
Plotter for gstlal_inspiral_calc_snr
"""
from
optparse
import
OptionParser
import
numpy
import
os
import
sys
from
optparse
import
OptionParser
from
gstlal
import
plotsnr
from
gstlal
import
svd_bank_snr
...
...
@@ -70,12 +70,12 @@ acs_groups = zip(*autocorrelations_dict.values())
# Plot SNRs
#
#=============================================================================================
for
row
,
snrs_group
in
enumerate
(
snrs_groups
)
:
for
snrs_group
in
snrs_groups
:
figure
=
plotsnr
.
plot_snr
(
dict
(
zip
(
SNRs_dict
.
keys
(),
zip
(
snrs_group
))),
width
=
options
.
width
,
center
=
options
.
center
,
span
=
options
.
span
,
verbose
=
options
.
verbose
)
if
len
(
zip
(
*
SNRs_dict
.
values
()))
==
1
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
SNRs_dict
.
keys
()))
+
description
+
segment
+
suffix
))
else
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
SNRs_dict
.
keys
()))
+
description
+
"_"
+
str
(
row
)
+
segment
+
suffix
))
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
SNRs_dict
.
keys
()))
+
description
.
replace
(
"ALL_ALL"
,
"_"
.
join
(
snrs_group
[
0
].
name
.
split
(
"_"
)[
1
:
3
])
)
+
segment
+
suffix
))
if
len
(
snrs_groups
)
!=
len
(
acs_groups
):
...
...
@@ -86,14 +86,16 @@ if len(snrs_groups) != len(acs_groups):
# Plot SNRs with autocorrelation
#
#=============================================================================================
row
=
0
for
snrs_group
,
acs_group
in
zip
(
snrs_groups
,
acs_groups
):
figure
=
plotsnr
.
plot_snr_with_ac
(
dict
(
zip
(
SNRs_dict
.
keys
(),
zip
(
snrs_group
))),
dict
(
zip
(
autocorrelations_dict
.
keys
(),
zip
(
acs_group
))),
width
=
options
.
width
,
ref_trigger_time
=
options
.
center
,
verbose
=
options
.
verbose
)
all_instruments
=
set
(
SNRs_dict
)
&
set
(
autocorrelations_dict
)
# just pick one, they must be the same length
if
len
(
zip
(
*
SNRs_dict
.
values
()))
==
1
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
all_instruments
))
+
description
+
"_with_autocorrlation"
+
segment
+
suffix
))
else
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
all_instruments
))
+
description
+
"_"
+
str
(
row
)
+
segment
+
suffix
))
row
+=
1
# This is only useful when SNRs are complex time series.
if
numpy
.
iscomplexobj
(
SNRs_dict
.
values
()[
0
][
0
].
data
.
data
):
row
=
0
for
snrs_group
,
acs_group
in
zip
(
snrs_groups
,
acs_groups
):
figure
=
plotsnr
.
plot_snr_with_ac
(
dict
(
zip
(
SNRs_dict
.
keys
(),
zip
(
snrs_group
))),
dict
(
zip
(
autocorrelations_dict
.
keys
(),
zip
(
acs_group
))),
width
=
options
.
width
,
ref_trigger_time
=
options
.
center
,
verbose
=
options
.
verbose
)
all_instruments
=
set
(
SNRs_dict
)
&
set
(
autocorrelations_dict
)
# just pick one, they must be the same length
if
len
(
zip
(
*
SNRs_dict
.
values
()))
==
1
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
all_instruments
))
+
description
+
"_with_autocorrlation"
+
segment
+
suffix
))
else
:
figure
.
savefig
(
os
.
path
.
join
(
options
.
outdir
,
"%s-"
%
""
.
join
(
sorted
(
all_instruments
))
+
description
.
replace
(
"ALL_ALL"
,
"_"
.
join
(
snrs_group
[
0
].
name
.
split
(
"_"
)[
1
:
3
]))
+
"_with_autocorrlation"
+
segment
+
suffix
))
row
+=
1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment