Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gstlal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Duncan Macleod
gstlal
Commits
140baf6a
Commit
140baf6a
authored
6 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
streamthinca.py: enable a network SNR threshold
parent
eef07f9c
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
gstlal-inspiral/python/streamthinca.py
+5
-3
5 additions, 3 deletions
gstlal-inspiral/python/streamthinca.py
with
5 additions
and
3 deletions
gstlal-inspiral/python/streamthinca.py
+
5
−
3
View file @
140baf6a
...
...
@@ -89,7 +89,7 @@ class SnglInspiral(snglinspiraltable.GSTLALSnglInspiral):
class
StreamThinca
(
object
):
def
__init__
(
self
,
coincidence_threshold
,
thinca_interval
=
50.0
,
min_instruments
=
2
,
min_log_L
=
None
,
sngls_snr_threshold
=
None
):
def
__init__
(
self
,
coincidence_threshold
,
thinca_interval
=
50.0
,
min_instruments
=
2
,
min_log_L
=
None
,
sngls_snr_threshold
=
None
,
network_snrsq_threshold
=
49.
):
self
.
thinca_interval
=
thinca_interval
# seconds
self
.
last_coincs
=
{}
if
min_instruments
<
1
:
...
...
@@ -97,6 +97,7 @@ class StreamThinca(object):
self
.
min_instruments
=
min_instruments
self
.
min_log_L
=
min_log_L
self
.
sngls_snr_threshold
=
sngls_snr_threshold
self
.
network_snrsq_threshold
=
network_snrsq_threshold
self
.
sngl_inspiral_table
=
None
self
.
ln_likelihood_func
=
None
...
...
@@ -250,9 +251,10 @@ class StreamThinca(object):
# events with an SNR less than 5. Less than SNR 5 triggers
# will never produce an log LR greater than 4, so we can
# safely discard them.
def
ntuple_comparefunc
(
events
,
offset_vector
,
seg
=
segments
.
segment
(
self
.
last_boundary
-
self
.
coincidence_back_off
,
boundary
-
self
.
coincidence_back_off
)):
def
ntuple_comparefunc
(
events
,
offset_vector
,
seg
=
segments
.
segment
(
self
.
last_boundary
-
self
.
coincidence_back_off
,
boundary
-
self
.
coincidence_back_off
)
,
network_snrsq_threshold
=
self
.
network_snrsq_threshold
):
# False/0 = keep, True/non-0 = discard
if
len
(
events
)
==
1
and
events
[
0
].
snr
<
5
:
# Impose a network SNR cut of 7
if
sum
(
e
.
snr
**
2
for
e
in
events
)
<
network_snrsq_threshold
:
return
True
return
min
(
event
.
end
for
event
in
events
)
not
in
seg
...
...
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