Definition at line 156 of file stringutils.py.
Inherits lalburst.snglcoinc.LnLRDensity.
Public Member Functions | |
| def | __init__ (self, instruments) |
| def | __call__ (self, **params) |
| Evaluate. More... | |
| def | __iadd__ (self, other) |
| Marginalize the two densities. More... | |
| def | increment (self, weight=1.0, **params) |
| Increment the counts defining this density at the given parameters. More... | |
| def | copy (self) |
| Return a duplicate copy of this object. More... | |
| def | mkinterps (self) |
| def | finish (self) |
| Ensure all internal densities are normalized, and initialize interpolator objects as needed for smooth evaluation. More... | |
| def | to_xml (self, name) |
| Serialize to an XML fragment and return the root element of the resulting XML tree. More... | |
| def | from_xml (cls, xml, name) |
| In the XML document tree rooted at xml, search for the serialized LnLRDensity object named name, and deserialize it. More... | |
Public Member Functions inherited from lalburst.snglcoinc.LnLRDensity | |
| def | __call__ (self, *args, **kwargs) |
| Evaluate. More... | |
| def | __iadd__ (self, other) |
| Marginalize the two densities. More... | |
| def | increment (self, *args, **kwargs) |
| Increment the counts defining this density at the given parameters. More... | |
| def | copy (self) |
| Return a duplicate copy of this object. More... | |
| def | finish (self) |
| Ensure all internal densities are normalized, and initialize interpolator objects as needed for smooth evaluation. More... | |
| def | samples (self) |
| Generator returning a sequence of parameter values drawn from the distribution density. More... | |
| def | to_xml (self, name) |
| Serialize to an XML fragment and return the root element of the resulting XML tree. More... | |
| def | get_xml_root (cls, xml, name) |
| Sub-classes can use this in their overrides of the .from_xml() method to find the root element of the XML serialization. More... | |
| def | from_xml (cls, xml, name) |
| In the XML document tree rooted at xml, search for the serialized LnLRDensity object named name, and deserialize it. More... | |
Data Fields | |
| densities | |
| interps | |
| def lalburst.stringutils.LnLRDensity.__init__ | ( | self, | |
| instruments | |||
| ) |
Definition at line 161 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.__call__ | ( | self, | |
| ** | args | ||
| ) |
Evaluate.
Return the natural logarithm of the density evaluated at the given parameters.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 176 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.__iadd__ | ( | self, | |
| other | |||
| ) |
Marginalize the two densities.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 184 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.increment | ( | self, | |
args = 1.0, |
|||
| ** | kwargs | ||
| ) |
Increment the counts defining this density at the given parameters.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 195 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.copy | ( | self | ) |
Return a duplicate copy of this object.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 199 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.mkinterps | ( | self | ) |
Definition at line 205 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.finish | ( | self | ) |
Ensure all internal densities are normalized, and initialize interpolator objects as needed for smooth evaluation.
Must be invoked before .__call__() will yield sensible results.
NOTE: for some implementations this operation will irreversibly alter the contents of the counts array, for example often this operation will involve the convolution of the counts with a density estimation kernel. If it is necessary to preserve a pristine copy of the counts data, use the .copy() method to obtain a copy of the data, first, and then .finish() the copy.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 208 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.to_xml | ( | self, | |
| name | |||
| ) |
Serialize to an XML fragment and return the root element of the resulting XML tree.
Subclasses must chain to this method, then customize the return value as needed.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 223 of file stringutils.py.
| def lalburst.stringutils.LnLRDensity.from_xml | ( | cls, | |
| xml, | |||
| name | |||
| ) |
In the XML document tree rooted at xml, search for the serialized LnLRDensity object named name, and deserialize it.
The return value is the deserialized LnLRDensity object.
Reimplemented from lalburst.snglcoinc.LnLRDensity.
Definition at line 232 of file stringutils.py.
| lalburst.stringutils.LnLRDensity.densities |
Definition at line 162 of file stringutils.py.
| lalburst.stringutils.LnLRDensity.interps |
Definition at line 206 of file stringutils.py.