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
8221a95f
Commit
8221a95f
authored
6 years ago
by
Chad Hanna
Browse files
Options
Downloads
Patches
Plain Diff
construct_skymap_test_dag: update
parent
82a3959b
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-ugly/share/construct_skymap_test_dag
+41
-4
41 additions, 4 deletions
gstlal-ugly/share/construct_skymap_test_dag
with
41 additions
and
4 deletions
gstlal-ugly/share/construct_skymap_test_dag
+
41
−
4
View file @
8221a95f
...
...
@@ -38,7 +38,9 @@ CREATE TEMPORARY TABLE
AS
SELECT a.event_id as sid,
coinc_event.coinc_event_id as cid,
coinc_event.likelihood as lr
coinc_event.likelihood as lr,
coinc_event.nevents as nevents,
coinc_event.instruments as instruments
FROM coinc_event_map as a
JOIN coinc_event_map AS b ON (b.coinc_event_id == a.coinc_event_id)
JOIN coinc_event ON (coinc_event.coinc_event_id == b.event_id)
...
...
@@ -49,6 +51,10 @@ AS
connection
.
cursor
().
execute
(
"
CREATE INDEX IF NOT EXISTS sim_coinc_map_helper_index ON sim_coinc_map_helper (sid, cid);
"
)
#
# FIXME NOTE FIXME this selects triple times with no more than two ifos to test the itacac sub threshold stuff
#
connection
.
cursor
().
execute
(
"""
CREATE TEMPORARY TABLE
sim_coinc_map
...
...
@@ -62,6 +68,10 @@ AS
sim_coinc_map_helper
WHERE
sid = simulation_id
AND
nevents < 3
AND
instruments =
"
H1,L1,V1
"
ORDER BY
lr
DESC
...
...
@@ -180,6 +190,7 @@ master_opts_dict = {
"
gracedb-search
"
:
"
AllSky
"
,
"
channel-name
"
:
None
,
"
singles-threshold
"
:
"
inf
"
,
"
local-frame-caching
"
:
""
,
"
verbose
"
:
""
}
...
...
@@ -214,6 +225,9 @@ gstlalInspiralInjJob = dagparts.DAGJob("gstlal_inspiral",
"
want_graceful_removal
"
:
"
True
"
,
"
kill_sig
"
:
"
15
"
}
)
noIlwdcharJob
=
dagparts
.
DAGJob
(
"
ligolw_no_ilwdchar
"
)
bashJob
=
dagparts
.
DAGJob
(
"
bash
"
)
def
updatedict
(
x
,
y
):
for
k
in
x
:
...
...
@@ -246,6 +260,25 @@ try:
except
OSError
:
pass
bayesdir
=
"
bayestar_input
"
try
:
os
.
mkdir
(
bayesdir
)
except
OSError
:
pass
f
=
open
(
"
process.sh
"
,
"
w
"
)
f
.
write
(
"""
#!/usr/bin/bash
ID=$1
FILE=$(gstlal_inspiral_best_coinc_file lloid_files/${ID}/*CBC_AllSky-*-0.xml)
ligolw_no_ilwdchar ${FILE}
mkdir -p bayestar_input/${ID}/
gstlal_ligolw_add_without_reassign ${FILE} inj_files/${ID}_inj.xml.gz --output bayestar_input/${ID}/${ID}_event.xml.gz
lalapps_inspinjfind --time-window 0.9 bayestar_input/${ID}/${ID}_event.xml.gz
gstlal_ilwdify bayestar_input/${ID}/${ID}_event.xml.gz
"""
)
f
.
close
()
for
job_id
,
(
bankid
,
process_id
,
simid
)
in
enumerate
(
sim_row
,
start
=
1
):
# FIXME Need to add option for dist stats output
print
"
++ job_id: %s ++
"
%
job_id
...
...
@@ -264,7 +297,7 @@ for job_id, (bankid, process_id, simid) in enumerate(sim_row, start=1):
# make a custom injection file
inj_file_name
=
"
inj_files/%d_%d_%d_inj.xml.gz
"
%
(
job_id
,
bankid
,
process_id
)
new_inj_file
(
sim_row
[(
bank
_
id
,
process_id
,
simid
)],
inj_file_name
)
new_inj_file
(
sim_row
[(
bankid
,
process_id
,
simid
)],
inj_file_name
)
this_input_dict
[
"
injections
"
]
=
inj_file_name
# FIXME hacks for the svd
...
...
@@ -282,13 +315,17 @@ for job_id, (bankid, process_id, simid) in enumerate(sim_row, start=1):
os
.
mkdir
(
outdir
)
except
OSError
:
pass
output_file_name
=
"
%s/%d_%d_%d_lloid.xml.gz
"
%
(
outdir
,
job_id
,
bankid
,
process_id
)
this_output_dict
[
"
output
"
]
=
output_file_name
this_opts_dict
[
"
gracedb-service-url
"
]
=
"
file://%s/%s
"
%
(
os
.
getcwd
(),
outdir
)
dagparts
.
DAGNode
(
gstlalInspiralInjJob
,
dag
,
parent_nodes
=
[],
opts
=
this_opts_dict
,
input_files
=
this_input_dict
,
output_files
=
this_output_dict
)
node
=
dagparts
.
DAGNode
(
gstlalInspiralInjJob
,
dag
,
parent_nodes
=
[],
opts
=
this_opts_dict
,
input_files
=
this_input_dict
,
output_files
=
this_output_dict
)
# all the remaining post processing
node
=
dagparts
.
DAGNode
(
bashJob
,
dag
,
parent_nodes
=
[
node
],
opts
=
{
""
:[
"
process.sh
"
,
"
%d_%d_%d
"
%
(
job_id
,
bankid
,
process_id
)]})
dag
.
write_sub_files
()
dag
.
write_dag
()
...
...
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