Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Rhiannon Udall
bilby
Commits
a20400b7
Commit
a20400b7
authored
May 29, 2019
by
Colm Talbot
Browse files
make snrs add in quadrature
parent
5b34b551
Changes
1
Hide whitespace changes
Inline
Side-by-side
bilby/gw/likelihood.py
View file @
a20400b7
...
...
@@ -224,7 +224,7 @@ class GravitationalWaveTransient(likelihood.Likelihood):
d_inner_h
=
0.
optimal_snr_squared
=
0.
complex_matched_filter_snr
=
0.
complex_matched_filter_snr
_squared
=
0.
if
self
.
time_marginalization
:
d_inner_h_tc_array
=
np
.
zeros
(
self
.
interferometers
.
frequency_array
[
0
:
-
1
].
shape
,
...
...
@@ -237,7 +237,7 @@ class GravitationalWaveTransient(likelihood.Likelihood):
d_inner_h
+=
per_detector_snr
.
d_inner_h
optimal_snr_squared
+=
np
.
real
(
per_detector_snr
.
optimal_snr_squared
)
complex_matched_filter_snr
+=
per_detector_snr
.
complex_matched_filter_snr
complex_matched_filter_snr
_squared
+=
per_detector_snr
.
complex_matched_filter_snr
**
2
if
self
.
time_marginalization
:
d_inner_h_tc_array
+=
per_detector_snr
.
d_inner_h_squared_tc_array
...
...
@@ -246,9 +246,8 @@ class GravitationalWaveTransient(likelihood.Likelihood):
self
.
derived
[
interferometer
.
name
+
'_matched_filter_snr_phase'
]
=
np
.
angle
(
per_detector_snr
.
complex_matched_filter_snr
)
self
.
derived
[
interferometer
.
name
+
'_optimal_snr'
]
=
per_detector_snr
.
optimal_snr_squared
.
real
**
0.5
self
.
derived
[
'matched_filter_snr_amp'
]
=
abs
(
complex_matched_filter_snr
)
self
.
derived
[
'matched_filter_snr_phase'
]
=
np
.
angle
(
complex_matched_filter_snr
)
self
.
derived
[
'matched_filter_snr_amp'
]
=
abs
(
complex_matched_filter_snr_squared
**
0.5
)
self
.
derived
[
'matched_filter_snr_phase'
]
=
np
.
angle
(
complex_matched_filter_snr_squared
**
0.5
)
self
.
derived
[
'optimal_snr'
]
=
optimal_snr_squared
.
real
**
0.5
if
self
.
time_marginalization
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment