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
50c4eed2
Commit
50c4eed2
authored
May 02, 2012
by
John Douglas Veitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write unique output files, fix logic
Original: b959b35c71976a89dc90b45f93919682c5b90f87
parent
51e70d90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
+9
-6
No files found.
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
View file @
50c4eed2
...
...
@@ -7,6 +7,7 @@ import os
from
lalapps
import
inspiralutils
import
uuid
import
ast
import
pdb
# We use the GLUE pipeline utilities to construct classes for each
# type of job. Each class has inputs and outputs, which are used to
...
...
@@ -161,7 +162,7 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
# datafindnode=self.get_datafind_node(gpstime)
enginenode
=
self
.
add_engine_node
(
gpstime
)
ifos
=
reduce
(
lambda
a
,
b
:
a
+
b
,
enginenode
.
ifos
)
pagedir
=
os
.
path
.
join
(
str
(
gpstime
)
+
'-'
+
str
(
id
(
enginenode
)
),
ifos
)
pagedir
=
os
.
path
.
join
(
self
.
basepath
,
str
(
gpstime
)
+
'-'
+
str
(
enginenode
.
uuid
),
ifos
)
mkdirs
(
pagedir
)
self
.
add_results_page_node
(
outdir
=
pagedir
,
parent
=
enginenode
)
...
...
@@ -218,7 +219,7 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
node
.
set_max_psdlength
(
self
.
config
.
getint
(
'input'
,
'max-psd-length'
))
out_dir
=
os
.
path
.
join
(
self
.
basepath
,
'engine'
)
mkdirs
(
out_dir
)
node
.
set_output_file
(
os
.
path
.
join
(
out_dir
,
node
.
engine
+
'-'
+
node
.
get_ifos
()
+
'-'
+
str
(
node
.
get_trig_time
())
+
str
(
id
(
self
))))
node
.
set_output_file
(
os
.
path
.
join
(
out_dir
,
node
.
engine
+
'-'
+
node
.
get_ifos
()
+
'-'
+
str
(
node
.
get_trig_time
())
+
'-'
+
'%x'
%
(
id
(
node
))))
return
node
def
add_results_page_node
(
self
,
outdir
=
None
,
parent
=
None
,
extra_options
=
None
):
...
...
@@ -253,6 +254,7 @@ class EngineNode(pipeline.CondorDAGNode):
self
.
psdlength
=
None
self
.
maxlength
=
None
self
.
psdstart
=
None
self
.
uuid
=
uuid
.
uuid1
()
def
set_seglen
(
self
,
seglen
):
self
.
seglen
=
seglen
...
...
@@ -317,6 +319,7 @@ class EngineNode(pipeline.CondorDAGNode):
first
=
False
else
:
delim
=
','
cache
=
self
.
scisegs
[
ifo
].
get_df_node
().
get_output_files
()[
0
]
self
.
add_input_file
(
cache
)
self
.
add_parent
(
self
.
scisegs
[
ifo
].
get_df_node
())
ifostring
=
ifostring
+
delim
+
ifo
cachestring
=
cachestring
+
delim
+
cache
...
...
@@ -324,9 +327,9 @@ class EngineNode(pipeline.CondorDAGNode):
ifostring
=
ifostring
+
']'
cachestring
=
cachestring
+
']'
channelstring
=
channelstring
+
']'
self
.
add_var_
arg
(
'--IFO '
+
ifostring
)
self
.
add_var_
arg
(
'--
channel
'
+
channelstring
)
self
.
add_var_
arg
(
'--
cache
'
+
cachestring
)
self
.
add_var_
opt
(
'IFO'
,
ifostring
)
self
.
add_var_
opt
(
'
channel
'
,
channelstring
)
self
.
add_var_
opt
(
'
cache
'
,
cachestring
)
# Start at earliest common time
# NOTE: We perform this arithmetic for all ifos to ensure that a common data set is
# Used when we are running the coherence test.
...
...
@@ -367,7 +370,7 @@ class LALInferenceNestNode(EngineNode):
self
.
outfilearg
=
'outfile'
def
set_output_file
(
self
,
filename
):
self
.
add_file_opt
(
self
.
outfilearg
+
'.dat'
,
filename
,
file_is_output_file
=
True
)
self
.
add_file_opt
(
self
.
outfilearg
,
filename
+
'.dat'
,
file_is_output_file
=
True
)
self
.
paramsfile
=
filename
+
'_params.txt'
self
.
Bfilename
=
filename
+
'_B.txt'
...
...
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