Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
gstlal
Commits
39bed653
Commit
39bed653
authored
Aug 17, 2019
by
Chad Hanna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inspiral_extrinsics.py, inspiral_lr.py: snr / chisq numerator tuning
parent
6d59542f
Pipeline
#75475
passed with stages
in 24 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
gstlal-inspiral/python/stats/inspiral_extrinsics.py
gstlal-inspiral/python/stats/inspiral_extrinsics.py
+4
-2
gstlal-inspiral/python/stats/inspiral_lr.py
gstlal-inspiral/python/stats/inspiral_lr.py
+1
-1
No files found.
gstlal-inspiral/python/stats/inspiral_extrinsics.py
View file @
39bed653
...
...
@@ -943,13 +943,15 @@ class NumeratorSNRCHIPDF(rate.BinnedLnPDF):
rcoss
,
drcoss
=
lnpdf
.
bins
[
1
].
centres
()[
rcossindices
],
lnpdf
.
bins
[
1
].
upper
()[
rcossindices
]
-
lnpdf
.
bins
[
1
].
lower
()[
rcossindices
]
snr2
=
snr
**
2.
snrchi2
=
numpy
.
outer
(
snr2
,
rcoss
)
*
df
ncparam_per_pf
=
snr2
# takes into account the mean depending on noncentrality parameter
snrchi2
=
numpy
.
outer
(
snr2
*
df
*
(
1.0
+
numpy
.
mean
(
pfs
)),
rcoss
)
arr
=
numpy
.
zeros_like
(
lnpdf
.
array
)
for
pf
in
pfs
:
if
progressbar
is
not
None
:
progressbar
.
increment
()
arr
[
snrindices
,
rcossindices
]
+=
gstlalstats
.
ncx2pdf
(
snrchi2
,
df
,
numpy
.
array
([
pf
*
snr2
]).
T
)
arr
[
snrindices
,
rcossindices
]
+=
gstlalstats
.
ncx2pdf
(
snrchi2
,
df
,
numpy
.
array
([
pf
*
ncparam_per_pf
]).
T
)
# convert to counts by multiplying by bin volume, and also
# multiply by an SNR powr law
...
...
gstlal-inspiral/python/stats/inspiral_lr.py
View file @
39bed653
...
...
@@ -423,7 +423,7 @@ class LnSignalDensity(LnLRDensity):
vtdict
=
self
.
horizon_history
.
functional_integral_dict
(
window
.
shift
(
float
(
gps
)),
lambda
D
:
D
**
3.
)
return
dict
((
instrument
,
(
vt
/
t
)
**
(
1.
/
3.
))
for
instrument
,
vt
in
vtdict
.
items
())
def
add_signal_model
(
self
,
prefactors_range
=
(
0.001
,
0.30
),
df
=
20
0
,
inv_snr_pow
=
4.
):
def
add_signal_model
(
self
,
prefactors_range
=
(
0.001
,
0.30
),
df
=
15
0
,
inv_snr_pow
=
4.
):
# normalize to 10 *mi*llion signals. this count makes the
# density estimation code choose a suitable kernel size
inspiral_extrinsics
.
NumeratorSNRCHIPDF
.
add_signal_model
(
self
.
densities
[
"snr_chi"
],
1e12
,
prefactors_range
,
df
,
inv_snr_pow
=
inv_snr_pow
,
snr_min
=
self
.
snr_min
)
...
...
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