Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GstLAL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
lscsoft
GstLAL
Commits
af808d22
Commit
af808d22
authored
10 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
Revert "inspiral.py: make svd bank reading parallel"
This reverts commit
203726a7
.
parent
11e4482b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gstlal-inspiral/python/inspiral.py
+13
-17
13 additions, 17 deletions
gstlal-inspiral/python/inspiral.py
with
13 additions
and
17 deletions
gstlal-inspiral/python/inspiral.py
+
13
−
17
View file @
af808d22
...
...
@@ -44,7 +44,6 @@ import threading
import
time
import
httplib
import
tempfile
import
multiprocessing
# The following snippet is taken from http://gstreamer.freedesktop.org/wiki/FAQ#Mypygstprogramismysteriouslycoredumping.2Chowtofixthis.3F
import
pygtk
...
...
@@ -212,19 +211,6 @@ def parse_iirbank_string(bank_string):
out
.
setdefault
(
ifo
,
[]).
append
(
bank
)
return
out
def
parse_bank_file
((
instrument
,
filename
,
verbose
,
snr_threshold
)):
for
n
,
bank
in
enumerate
(
svd_bank
.
read_banks
(
filename
,
contenthandler
=
LIGOLWContentHandler
,
verbose
=
verbose
)):
# Write out sngl inspiral table to temp file for trigger generator
# FIXME teach the trigger generator to get this information a better way
bank
.
template_bank_filename
=
tempfile
.
NamedTemporaryFile
(
suffix
=
"
.gz
"
,
delete
=
False
).
name
xmldoc
=
ligolw
.
Document
()
xmldoc
.
appendChild
(
ligolw
.
LIGO_LW
()).
appendChild
(
bank
.
sngl_inspiral_table
)
ligolw_utils
.
write_filename
(
xmldoc
,
bank
.
template_bank_filename
,
gz
=
True
,
verbose
=
verbose
)
xmldoc
.
unlink
()
# help garbage collector
bank
.
logname
=
"
%sbank%d
"
%
(
instrument
,
n
)
if
snr_threshold
is
not
None
:
bank
.
snr_threshold
=
snr_threshold
return
instrument
,
bank
def
parse_bank_files
(
svd_banks
,
verbose
,
snr_threshold
=
None
):
"""
...
...
@@ -234,9 +220,19 @@ def parse_bank_files(svd_banks, verbose, snr_threshold = None):
banks
=
{}
pool
=
multiprocessing
.
Pool
(
processes
=
4
)
for
instrument
,
bank
in
pool
.
map
(
parse_bank_file
,
[(
instrument
,
filename
,
verbose
,
snr_threshold
)
for
instrument
,
filename
in
svd_banks
.
items
()]):
banks
.
setdefault
(
instrument
,
[]).
append
(
bank
)
for
instrument
,
filename
in
svd_banks
.
items
():
for
n
,
bank
in
enumerate
(
svd_bank
.
read_banks
(
filename
,
contenthandler
=
LIGOLWContentHandler
,
verbose
=
verbose
)):
# Write out sngl inspiral table to temp file for trigger generator
# FIXME teach the trigger generator to get this information a better way
bank
.
template_bank_filename
=
tempfile
.
NamedTemporaryFile
(
suffix
=
"
.gz
"
,
delete
=
False
).
name
xmldoc
=
ligolw
.
Document
()
xmldoc
.
appendChild
(
ligolw
.
LIGO_LW
()).
appendChild
(
bank
.
sngl_inspiral_table
)
ligolw_utils
.
write_filename
(
xmldoc
,
bank
.
template_bank_filename
,
gz
=
True
,
verbose
=
verbose
)
xmldoc
.
unlink
()
# help garbage collector
bank
.
logname
=
"
%sbank%d
"
%
(
instrument
,
n
)
banks
.
setdefault
(
instrument
,
[]).
append
(
bank
)
if
snr_threshold
is
not
None
:
bank
.
snr_threshold
=
snr_threshold
# FIXME remove when this is no longer an issue
if
not
banks
:
...
...
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