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
6507840b
Commit
6507840b
authored
6 years ago
by
Kipp Cannon
Browse files
Options
Downloads
Patches
Plain Diff
inspiral_lr: remove FIXME thanks to new glue.ligolw feature
parent
37cd7e02
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-inspiral/python/stats/inspiral_lr.py
+5
-10
5 additions, 10 deletions
gstlal-inspiral/python/stats/inspiral_lr.py
with
5 additions
and
10 deletions
gstlal-inspiral/python/stats/inspiral_lr.py
+
5
−
10
View file @
6507840b
...
...
@@ -198,10 +198,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
def
to_xml
(
self
,
name
):
xml
=
super
(
LnLRDensity
,
self
).
to_xml
(
name
)
# None is mapped to an empty string
# FIXME: glue can now encode None-valued Params, but we
# don't rely on that mechanism. switch to it
xml
.
appendChild
(
ligolw_param
.
Param
.
from_pyvalue
(
u
"
template_ids
"
,
"
,
"
.
join
(
"
%d
"
%
template_id
for
template_id
in
sorted
(
self
.
template_ids
if
self
.
template_ids
else
[]))))
xml
.
appendChild
(
ligolw_param
.
Param
.
from_pyvalue
(
u
"
template_ids
"
,
"
,
"
.
join
(
"
%d
"
%
template_id
for
template_id
in
sorted
(
self
.
template_ids
))
if
self
.
template_ids
is
not
None
else
None
))
xml
.
appendChild
(
ligolw_param
.
Param
.
from_pyvalue
(
u
"
instruments
"
,
lsctables
.
instrumentsproperty
.
set
(
self
.
instruments
)))
xml
.
appendChild
(
ligolw_param
.
Param
.
from_pyvalue
(
u
"
min_instruments
"
,
self
.
min_instruments
))
xml
.
appendChild
(
ligolw_param
.
Param
.
from_pyvalue
(
u
"
delta_t
"
,
self
.
delta_t
))
...
...
@@ -215,13 +212,11 @@ class LnLRDensity(snglcoinc.LnLRDensity):
@classmethod
def
from_xml
(
cls
,
xml
,
name
):
xml
=
cls
.
get_xml_root
(
xml
,
name
)
template_ids
=
ligolw_param
.
get_pyvalue
(
xml
,
u
"
template_ids
"
),
if
template_ids
is
not
None
:
template_ids
=
frozenset
(
int
(
i
)
for
i
in
template_ids
.
split
(
"
,
"
))
self
=
cls
(
# an empty string is assumed to mean None
# FIXME: remove or "" after glue is upgraded
# FIXME: glue can now encode None-valued Params,
# but we don't rely on that mechanism. switch to
# it
template_ids
=
frozenset
(
int
(
i
)
for
i
in
(
ligolw_param
.
get_pyvalue
(
xml
,
u
"
template_ids
"
)
or
""
).
split
(
"
,
"
)
if
i
)
or
None
,
template_ids
=
template_ids
,
instruments
=
lsctables
.
instrumentsproperty
.
get
(
ligolw_param
.
get_pyvalue
(
xml
,
u
"
instruments
"
)),
delta_t
=
ligolw_param
.
get_pyvalue
(
xml
,
u
"
delta_t
"
),
min_instruments
=
ligolw_param
.
get_pyvalue
(
xml
,
u
"
min_instruments
"
)
...
...
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