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
2c869147
Commit
2c869147
authored
Feb 07, 2020
by
ChiWai Chan
Committed by
Patrick Godwin
Jul 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svd_bank_snr.py: improve accuracy of output time selection.
parent
24ddab81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
gstlal-inspiral/python/svd_bank_snr.py
gstlal-inspiral/python/svd_bank_snr.py
+4
-10
No files found.
gstlal-inspiral/python/svd_bank_snr.py
View file @
2c869147
...
...
@@ -185,9 +185,6 @@ class SNR(object):
def
start
(
self
):
"""float: The approximate start time of all SNRs timeseries based on the buffer timestamp.
Note:
This start time is not precise because the 'end_time' of each template was not added here.
Please refer to the epoch of each timeseries object for precise start time.
"""
try
:
self
.
finish
()
...
...
@@ -198,11 +195,8 @@ class SNR(object):
@
property
def
end
(
self
):
"""float: The
approximate
end time of all SNRs timeseries calculated from buffer timestamp and data.
"""float: The end time of all SNRs timeseries calculated from buffer timestamp and data.
Note:
This end time is not precise because the 'end_time' of each template was not added here.
Please refer to the epoch of each timeseries object for precise end time.
"""
try
:
self
.
finish
()
...
...
@@ -266,7 +260,7 @@ class SNR(object):
tmp_snrs
=
tmp_snrs
[
s
:
e
].
T
if
COMPLEX
else
numpy
.
abs
(
tmp_snrs
[
s
:
e
].
T
)
# parse data to tseries object
self
.
data
=
[
self
.
_make_series
(
array
,
self
.
epoch
+
row
.
end
)
for
array
,
row
in
zip
(
tmp_snrs
,
self
.
sngl_inspiral_table
)
]
self
.
data
=
[
self
.
_make_series
(
array
,
self
.
epoch
)
for
array
in
tmp_snrs
]
# .finish() again is forbidden
def
finish
():
...
...
@@ -321,8 +315,8 @@ class SNRHandlerMixin(object):
buf
=
sample
.
get_buffer
()
if
buf
.
mini_object
.
flags
&
Gst
.
BufferFlags
.
GAP
or
buf
.
n_memory
()
==
0
:
return
Gst
.
FlowReturn
.
OK
cur_time_stamp
=
LIGOTimeGPS
(
0
,
sample
.
get_buffer
().
pts
)
# add the time offset of template end time here, this offset should be the same for each templates
cur_time_stamp
=
LIGOTimeGPS
(
0
,
sample
.
get_buffer
().
pts
)
+
self
.
snr_document
.
snrdict
[
instrument
].
sngl_inspiral_table
[
0
].
end
if
self
.
snr_document
.
snrdict
[
instrument
].
s
>=
cur_time_stamp
and
self
.
snr_document
.
snrdict
[
instrument
].
e
>
cur_time_stamp
:
# record the first timestamp closet to start time
...
...
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