Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
lalsuite
Commits
27f00e36
Commit
27f00e36
authored
Apr 27, 2012
by
John Douglas Veitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Works as far as running segfind
Original: d4307cf8331d330d73e540f051fd672fefe45ca8
parent
e0836110
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
8 deletions
+18
-8
lalapps/src/inspiral/posterior/lalinference_pipe.in
lalapps/src/inspiral/posterior/lalinference_pipe.in
+1
-1
lalapps/src/inspiral/posterior/lalinference_pipe_example.ini
lalapps/src/inspiral/posterior/lalinference_pipe_example.ini
+2
-0
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
+15
-7
No files found.
lalapps/src/inspiral/posterior/lalinference_pipe.in
View file @
27f00e36
...
...
@@ -55,7 +55,7 @@ if opts.single_triggers is not None:
cp.set('input','sngl-inspiral-file',opts.single_triggers)
if opts.injections is not None:
cp.set('input','injection-file')
cp.set('input','injection-file'
,opts.injections
)
# Create the DAG from the configparser object
dag=pipe_utils.LALInferencePipelineDAG(cp)
...
...
lalapps/src/inspiral/posterior/lalinference_pipe_example.ini
View file @
27f00e36
...
...
@@ -34,6 +34,8 @@ lalinferencenest=/home/jveitch/bin/lalinference_nest
lalinferencemcmc
=
/home/jveitch/bin/lalinference_mcmc
segfind
=
/home/jveitch/bin/ligolw_segment_query
datafind
=
/home/jveitch/bin/ligo_data_find
resultspage
=
/home/jveitch/bin/cbcBayesPostProc.py
ligolw_print
=
/home/jveitch/bin/ligolw_print
[resultspage]
skyres
=
0.5
...
...
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
View file @
27f00e36
...
...
@@ -2,9 +2,11 @@
# (C) 2012 John Veitch, Kiersten Ruisard, Kan Wang
import
glue
from
glue
import
pipeline
from
glue
import
pipeline
,
segmentsUtils
import
os
from
lalapps
import
inspiralutils
import
uuid
import
ast
# We use the GLUE pipeline utilities to construct classes for each
# type of job. Each class has inputs and outputs, which are used to
...
...
@@ -46,8 +48,9 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
else
:
self
.
basepath
=
os
.
getcwd
()
print
'No basepath specified, using current directory: %s'
%
(
self
.
basepath
)
self
.
daglogfile
=
os
.
path
.
join
(
cp
.
get
(
'paths'
,
'daglogdir'
),
'lalinference_pipeline-'
+
id
(
self
)
+
'.log'
)
pipeline
.
CondorDAG
.
__init__
(
self
,
log
,
dax
)
daglogdir
=
cp
.
get
(
'paths'
,
'daglogdir'
)
self
.
daglogfile
=
os
.
path
.
join
(
daglogdir
,
'lalinference_pipeline-'
+
str
(
uuid
.
uuid1
())
+
'.log'
)
pipeline
.
CondorDAG
.
__init__
(
self
,
self
.
daglogfile
,
dax
)
if
cp
.
has_option
(
'paths'
,
'cachedir'
):
self
.
cachepath
=
cp
.
get
(
'paths'
,
'cachedir'
)
else
:
...
...
@@ -57,14 +60,17 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
else
:
self
.
logpath
=
os
.
path
.
join
(
self
.
basepath
,
'log'
)
if
cp
.
has_option
(
'analysis'
,
'ifos'
):
self
.
ifos
=
cp
.
get
(
'analysis'
,
'ifos'
)
self
.
ifos
=
ast
.
literal_eval
(
cp
.
get
(
'analysis'
,
'ifos'
)
)
else
:
self
.
ifos
=
[
'H1'
,
'L1'
,
'V1'
]
self
.
segments
=
{}
for
ifo
in
ifos
:
if
cp
.
has_option
(
'datafind'
,
'veto-categories'
):
self
.
veto_categories
=
cp
.
get
(
'datafind'
,
'veto-categories'
)
else
:
self
.
veto_categories
=
[]
for
ifo
in
self
.
ifos
:
self
.
segments
[
ifo
]
=
[]
self
.
dq
=
{}
self
.
frtypes
=
cp
.
get
(
'datafind'
,
'types'
)
self
.
frtypes
=
ast
.
literal_eval
(
cp
.
get
(
'datafind'
,
'types'
)
)
self
.
use_available_data
=
False
self
.
webdir
=
cp
.
get
(
'paths'
,
'webdir'
)
# Set up necessary job files.
...
...
@@ -74,6 +80,7 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
self
.
engine_job
=
EngineJob
(
self
.
config
,
os
.
path
.
join
(
self
.
basepath
,
'lalinference.sub'
),
self
.
logpath
)
self
.
results_page_job
=
ResultsPageJob
(
self
.
config
,
os
.
path
.
join
(
self
.
basepath
,
'resultspage.sub'
),
self
.
logpath
)
# Process the input to build list of analyses to do
self
.
times
=
[]
if
cp
.
has_option
(
'input'
,
'gps-time-file'
):
...
...
@@ -141,8 +148,9 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
# Query the segment database for science segments and
# add them to the pool of segments
for
ifo
in
self
.
ifos
:
segFileName
=
inspiralutils
.
findSegmentsToAnalyze
(
self
.
config
,
ifo
,
self
.
veto_categories
,
generate_segments
=
True
,
\
(
segFileName
,
dqVetoes
)
=
inspiralutils
.
findSegmentsToAnalyze
(
self
.
config
,
ifo
,
self
.
veto_categories
,
generate_segments
=
True
,
\
use_available_data
=
self
.
use_available_data
,
data_quality_vetoes
=
False
)
self
.
dqVetoes
=
dqVetoes
segfile
=
open
(
segFileName
)
(
segs
,
self
.
dq
[
ifo
])
=
segmentsUtils
.
fromsegwizard
(
segfile
)
segs
.
coalesce
()
...
...
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