Commit 6ccd6a9b authored by Kipp Cannon's avatar Kipp Cannon

lalburst: remove use of two deprecated functions

- instrument_set_from_ifos() and ifos_from_instrument_set()
Original: 09ca982e642199f4c547c51d3453befdda6d0379
parent f685dc7d
......@@ -111,7 +111,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
xml = super(LnLRDensity, self).to_xml(name)
instruments = set(key.split("_", 2)[0] for key in self.densities if key.endswith("_dt"))
instruments |= set(key.split("_", 2)[1] for key in self.densities if key.endswith("_dt"))
xml.appendChild(ligolw_param.Param.from_pyvalue("instruments", lsctables.ifos_from_instrument_set(instruments)))
xml.appendChild(ligolw_param.Param.from_pyvalue("instruments", lsctables.instrumentsproperty.set(instruments)))
for key, pdf in self.densities.items():
xml.appendChild(pdf.to_xml(key))
return xml
......@@ -119,7 +119,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
@classmethod
def from_xml(cls, xml, name):
xml = cls.get_xml_root(xml, name)
self = cls(lsctables.instrument_set_from_ifos(ligolw_param.get_pyvalue(xml, "instruments")))
self = cls(lsctables.instrumentsproperty.get(ligolw_param.get_pyvalue(xml, "instruments")))
for key in self.densities:
self.densities[key] = rate.BinnedLnPDF.from_xml(xml, key)
return self
......
......@@ -168,7 +168,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
def to_xml(self, name):
xml = super(LnLRDensity, self).to_xml(name)
instruments = set(key.split("_", 1)[0] for key in self.densities if key.endswith("_snr2_chi2"))
xml.appendChild(ligolw_param.Param.from_pyvalue("instruments", lsctables.ifos_from_instrument_set(instruments)))
xml.appendChild(ligolw_param.Param.from_pyvalue("instruments", lsctables.instrumentsproperty.set(instruments)))
for key, pdf in self.densities.items():
xml.appendChild(pdf.to_xml(key))
return xml
......@@ -176,7 +176,7 @@ class LnLRDensity(snglcoinc.LnLRDensity):
@classmethod
def from_xml(cls, xml, name):
xml = cls.get_xml_root(xml, name)
self = cls(lsctables.instrument_set_from_ifos(ligolw_param.get_pyvalue(xml, "instruments")))
self = cls(lsctables.instrumentsproperty.get(ligolw_param.get_pyvalue(xml, "instruments")))
for key in self.densities:
self.densities[key] = rate.BinnedLnPDF.from_xml(xml, key)
return self
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment