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
4197e459
Commit
4197e459
authored
10 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
templates.py: trap ValueError for some time slices which are too short to have valid inspiral times
parent
d46e7b4b
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/templates.py
+5
-2
5 additions, 2 deletions
gstlal-inspiral/python/templates.py
with
5 additions
and
2 deletions
gstlal-inspiral/python/templates.py
+
5
−
2
View file @
4197e459
...
...
@@ -297,8 +297,11 @@ def time_slices(
if
segment_samples_min
>
segment_samples_max
:
raise
ValueError
(
"
The input template bank must have fewer than %d templates, but had %d.
"
%
(
segment_samples_max
,
2
*
len
(
sngl_inspiral_rows
)))
longest_chirp
=
max
(
spawaveform
.
imrchirptime
(
row
.
mass1
,
row
.
mass2
,
this_flow
,
spawaveform
.
computechi
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
))
for
row
in
sngl_inspiral_rows
)
try
:
longest_chirp
=
max
(
spawaveform
.
imrchirptime
(
row
.
mass1
,
row
.
mass2
,
this_flow
,
spawaveform
.
computechi
(
row
.
mass1
,
row
.
mass2
,
row
.
spin1z
,
row
.
spin2z
))
for
row
in
sngl_inspiral_rows
)
except
ValueError
as
e
:
print
"
Continuing decomposition by moving to next slice despite:
\n\t
"
,
e
continue
# Do any of the templates go beyond the accumulated time?
# If so, we need to add some blocks at this sampling rate.
# If not, we can skip this sampling rate and move on to the next lower one.
...
...
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