Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Michael William Coughlin
GraceDB Server
Commits
146c90cd
Commit
146c90cd
authored
15 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Added first cut at High Mass handling.
parent
4bb1ecf6
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
gracedb/translator.py
+43
-1
43 additions, 1 deletion
gracedb/translator.py
with
43 additions
and
1 deletion
gracedb/translator.py
+
43
−
1
View file @
146c90cd
...
...
@@ -3,7 +3,7 @@ import os
from
models
import
EventLog
import
glue
import
glue
,
glue
.
ligolw
.
utils
from
glue.gracedb.utils
import
InspiralCoincIdBase
,
InspiralCoincDef
from
glue.gracedb.utils
import
BurstCoincIdBase
,
BurstCoincDef
...
...
@@ -19,6 +19,48 @@ def handle_uploaded_data(event, datafilename,
log_filename
=
'
event.log
'
,
coinc_table_filename
=
'
coinc.xml
'
):
if
event
.
analysisType
==
'
HM
'
:
# Wildly speculative
xmldoc
=
glue
.
ligolw
.
utils
.
read_filename
(
datafilename
)
log_data
=
"
LOG DATA TBD
\n
"
output_dir
=
os
.
path
.
dirname
(
datafilename
)
write_output_files
(
output_dir
,
xmldoc
,
log_data
,
xml_fname
=
coinc_table_filename
,
log_fname
=
log_filename
)
# Create EventLog entries about these files.
private_data_url
=
os
.
path
.
join
(
event
.
weburl
(),
'
private
'
)
log
=
EventLog
(
event
=
event
,
filename
=
log_filename
,
issuer
=
event
.
submitter
,
comment
=
"
Log File Created
"
)
log
.
save
()
log
=
EventLog
(
event
=
event
,
filename
=
coinc_table_filename
,
issuer
=
event
.
submitter
,
comment
=
"
Coinc Table Created
"
)
log
.
save
()
# Extract relevant data from xmldoc.
coinc_table
=
glue
.
ligolw
.
table
.
getTablesByName
(
xmldoc
,
glue
.
ligolw
.
lsctables
.
CoincInspiralTable
.
tableName
)
coinc_table
=
coinc_table
[
0
]
event
.
gpstime
=
coinc_table
[
0
].
end_time
coinc_table
=
glue
.
ligolw
.
table
.
getTablesByName
(
xmldoc
,
glue
.
ligolw
.
lsctables
.
CoincTable
.
tableName
)
coinc_table
=
coinc_table
[
0
]
event
.
instruments
=
coinc_table
[
0
].
instruments
event
.
nevents
=
coinc_table
[
0
].
nevents
event
.
likelihood
=
coinc_table
[
0
].
likelihood
event
.
save
()
if
event
.
analysisType
==
'
MBTA
'
:
xmldoc
,
log_data
,
detectors
=
\
populate_inspiral_tables
(
datafilename
,
0
)
...
...
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