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 Coughlin
GraceDB Server
Commits
786e313d
Commit
786e313d
authored
8 years ago
by
Tanner Prestegard
Committed by
gracedb-dev1
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixing Fermi event overwrites for trigger_duration=0.000
parent
7cd54a74
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/translator.py
+14
-14
14 additions, 14 deletions
gracedb/translator.py
with
14 additions
and
14 deletions
gracedb/translator.py
+
14
−
14
View file @
786e313d
...
...
@@ -14,7 +14,7 @@ from gracedb.serialize import populate_inspiral_tables, \
populate_omega_tables
,
\
write_output_files
from
VOEventLib.Vutil
import
parse
,
getWhereWhen
,
findParam
from
VOEventLib.Vutil
import
parse
,
getWhereWhen
,
findParam
,
getParamNames
from
utils
import
isoToGps
,
isoToGpsFloat
from
utils.vfile
import
VersionedFile
...
...
@@ -675,20 +675,20 @@ def populateGrbEventFromVOEventFile(filename, event):
# try to find a trigger_duration value
# Fermi uses Trig_Dur or Data_Integ, while Swift uses Integ_Time
# One or the other may be present, but not both
VOEvent_params
=
[
pn
[
1
]
for
pn
in
getParamNames
(
v
)]
trig_dur_params
=
[
"
Trig_Dur
"
,
"
Data_Integ
"
,
"
Integ_Time
"
]
trigger_duration
=
None
try
:
trigger_duration
=
findParam
(
v
,
''
,
'
Trig_Dur
'
).
get_value
()
except
:
pass
try
:
trigger_duration
=
findParam
(
v
,
''
,
'
Integ_Time
'
).
get_value
()
except
:
pass
try
:
trigger_duration
=
findParam
(
v
,
''
,
'
Data_Integ
'
).
get_value
()
except
:
pass
event
.
trigger_duration
=
trigger_duration
for
param
in
trig_dur_params
:
if
(
param
in
VOEvent_params
):
trigger_duration
=
float
(
findParam
(
v
,
""
,
param
).
get_value
())
break
# Fermi GCNs (after the first one) often set Trig_Dur or Data_Integ
# to 0.000 (not sure why). We don't want to overwrite the currently
# existing value in the database with 0.000 if this has happened, so
# we only update the value if trigger_duration is non-zero.
if
trigger_duration
:
event
.
trigger_duration
=
trigger_duration
# try to find a trigger_id value
trigger_id
=
None
...
...
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