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
68c692ec
Commit
68c692ec
authored
Jul 10, 2012
by
John Douglas Veitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let lalinference_pipe use outside cache file
Original: e7c4a301441c394c093913eab4164cb0a7f62dff
parent
16ab15c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
+23
-12
No files found.
lalapps/src/inspiral/posterior/lalinference_pipe_utils.py
View file @
68c692ec
...
...
@@ -167,7 +167,7 @@ def chooseEngineNode(name):
return
LALInferenceMCMCNode
return
EngineNode
def
scan_timefile
(
self
,
timefile
):
def
scan_timefile
(
timefile
):
import
re
p
=
re
.
compile
(
'[\d.]+'
)
times
=
[]
...
...
@@ -490,19 +490,25 @@ class LALInferencePipelineDAG(pipeline.CondorDAG):
gotdata
+=
node
.
add_ifo_data
(
ifo
,
seg
,
self
.
channels
[
ifo
],
timeslide
=
slide
)
if
self
.
config
.
has_option
(
'lalinference'
,
'fake-cache'
):
node
.
cachefiles
=
ast
.
literal_eval
(
self
.
config
.
get
(
'lalinference'
,
'fake-cache'
))
node
.
channels
=
ast
.
literal_eval
(
self
.
config
.
get
(
'data'
,
'channels'
))
if
len
(
ifos
)
==
0
:
node
.
ifos
=
node
.
cachefiles
.
keys
()
else
:
node
.
ifos
=
ifos
print
'added ifos %s'
%
(
str
(
ifos
))
node
.
timeslides
=
dict
([
(
ifo
,
0
)
for
ifo
in
node
.
ifos
])
gotdata
=
1
else
:
# Add the nodes it depends on
for
seg
in
node
.
scisegs
.
values
():
dfnode
=
seg
.
get_df_node
()
if
dfnode
is
not
None
and
dfnode
not
in
self
.
get_nodes
():
self
.
add_node
(
dfnode
)
self
.
add_node
(
node
)
if
gotdata
==
0
:
'Print no data found for time %f'
%
(
end_time
)
return
None
if
extra_options
is
not
None
:
for
opt
in
extra_options
.
keys
():
node
.
add_var_arg
(
'--'
+
opt
+
' '
+
extra_options
[
opt
])
# Add the nodes it depends on
for
seg
in
node
.
scisegs
.
values
():
dfnode
=
seg
.
get_df_node
()
if
dfnode
is
not
None
and
dfnode
not
in
self
.
get_nodes
():
self
.
add_node
(
dfnode
)
self
.
add_node
(
node
)
# Add control options
if
self
.
config
.
has_option
(
'input'
,
'injection-file'
):
node
.
set_injection
(
self
.
config
.
get
(
'input'
,
'injection-file'
),
event
.
event_id
)
...
...
@@ -691,8 +697,13 @@ class EngineNode(pipeline.CondorDAGNode):
# NOTE: We perform this arithmetic for all ifos to ensure that a common data set is
# Used when we are running the coherence test.
# Otherwise the noise evidence will differ.
starttime
=
max
([
int
(
self
.
scisegs
[
ifo
].
start
())
for
ifo
in
self
.
ifos
])
endtime
=
min
([
int
(
self
.
scisegs
[
ifo
].
end
())
for
ifo
in
self
.
ifos
])
if
self
.
scisegs
!=
{}:
print
self
.
scisegs
starttime
=
max
([
int
(
self
.
scisegs
[
ifo
].
start
())
for
ifo
in
self
.
ifos
])
endtime
=
min
([
int
(
self
.
scisegs
[
ifo
].
end
())
for
ifo
in
self
.
ifos
])
else
:
starttime
=
self
.
get_trig_time
()
-
0.5
*
self
.
maxlength
endtime
=
starttime
+
self
.
maxlength
self
.
GPSstart
=
starttime
self
.
__GPSend
=
endtime
length
=
endtime
-
starttime
...
...
@@ -708,9 +719,9 @@ class EngineNode(pipeline.CondorDAGNode):
if
self
.
psdstart
is
not
None
:
self
.
GPSstart
=
self
.
psdstart
print
'Over-riding start time to user-specified value %f'
%
(
self
.
GPSstart
)
if
self
.
GPSstart
<
starttime
or
self
.
GPSstart
>
endtime
:
print
'ERROR: Over-ridden time lies outside of science segment!'
raise
Exception
(
'Bad psdstart specified'
)
#
if self.GPSstart<starttime or self.GPSstart>endtime:
#
print 'ERROR: Over-ridden time lies outside of science segment!'
#
raise Exception('Bad psdstart specified')
self
.
add_var_opt
(
'psdstart'
,
str
(
self
.
GPSstart
))
if
self
.
psdlength
is
None
:
self
.
psdlength
=
self
.
__GPSend
-
self
.
GPSstart
...
...
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