|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|

Public Member Functions | |
| None | __post_init__ (self) |
| flha (self) | |
| "BinnedObservableId" | from_flha (cls, Any lhaid) |
| "BinnedObservableId" | from_cpp (cls, common.BinnedObservableId cpp_obj) |
| common.BinnedObservableId | to_cpp (self) |
| dict | to_dict (self) |
| str | __repr__ (self) |
| str | __str__ (self) |
| bool | __eq__ (self, object other) |
| bool | __lt__ (self, "BinnedObservableId" other) |
| int | __hash__ (self) |
Public Attributes | |
| s | |
| p | |
Static Public Attributes | |
| Union | s = field(default_factory=lambda: ObservableId("NULL")) |
| tuple | p = (0.0, 0.0) |
Protected Attributes | |
| _cpp_obj | |
Static Protected Attributes | |
| common | _cpp_obj = field(init=False, repr=False) |
Python wrapper around the C++ ``BinnedObservableId`` composite identifier.
A ``BinnedObservableId`` uniquely identifies a *binned* observable by:
- an unbinned observable id (``ObservableId``),
- a bin range ``(low, high)`` stored as a pair of doubles.
This mirrors the C++ struct::
struct BinnedObservableId {
ObservableId s;
std::pair<double,double> p;
...
};
Args:
s (Union[ObservableId, str]): Unbinned observable identifier.
- If a ``str`` is provided, it is converted to ``ObservableId(str)``.
p (Tuple[float, float]): Bin range (low, high). Defaults to (0.0, 0.0).
Attributes:
s (ObservableId): Unbinned observable identifier (Python wrapper).
p (Tuple[float, float]): Bin range.
_cpp_obj (common.BinnedObservableId): Underlying bound C++ object.
Notes:
- ``flha()`` returns a bound C++ ``LhaID``.
- ``from_flha()`` reconstructs a binned id from such an ``LhaID``.
- Equality/ordering are implemented in C++ (== and <). This wrapper forwards them.
Definition at line 13 of file BinnedObservableId.py.
| bool pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__eq__ | ( | self, | |
| object | other | ||
| ) |
Value equality using the underlying C++ implementation.
Definition at line 141 of file BinnedObservableId.py.
| int pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__hash__ | ( | self | ) |
Hash using the underlying C++ hash (bound __hash__) if available. Falls back to hashing (s, p) in Python if needed.
Definition at line 153 of file BinnedObservableId.py.
| bool pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__lt__ | ( | self, | |
| "BinnedObservableId" | other | ||
| ) |
Strict ordering using the underlying C++ implementation.
Definition at line 147 of file BinnedObservableId.py.
| None pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__post_init__ | ( | self | ) |
Normalize inputs and construct the underlying C++ object.
Raises:
TypeError: If ``p`` is not a pair (low, high).
Definition at line 48 of file BinnedObservableId.py.
| str pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__repr__ | ( | self | ) |
Return a debug representation.
Definition at line 133 of file BinnedObservableId.py.
| str pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.__str__ | ( | self | ) |
Return a human-readable representation.
Definition at line 137 of file BinnedObservableId.py.
| pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.flha | ( | self | ) |
Convert this binned id to its FLHA/LHA representation.
Returns:
common.LhaID: Bound C++ ``LhaID`` for the binned observable.
Raises:
RuntimeError: If the mapping from ``ObservableId`` to FLHA is unknown.
Definition at line 80 of file BinnedObservableId.py.
| "BinnedObservableId" pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.from_cpp | ( | cls, | |
| common.BinnedObservableId | cpp_obj | ||
| ) |
Wrap an existing bound C++ ``BinnedObservableId`` instance.
Args:
cpp_obj (common.BinnedObservableId): C++ object coming from pybind.
Returns:
BinnedObservableId: Python wrapper around the provided C++ object.
Definition at line 109 of file BinnedObservableId.py.
| "BinnedObservableId" pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.from_flha | ( | cls, | |
| Any | lhaid | ||
| ) |
Construct a ``BinnedObservableId`` from a binned FLHA/LHA id.
Args:
lhaid: A bound C++ ``LhaID`` or a wrapper exposing ``to_cpp()``.
Returns:
BinnedObservableId: Wrapped instance reconstructed from the id.
Raises:
RuntimeError: If the id cannot be decoded or the mapping is unknown.
Definition at line 92 of file BinnedObservableId.py.
| common.BinnedObservableId pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.to_cpp | ( | self | ) |
Return the underlying bound C++ object.
Definition at line 125 of file BinnedObservableId.py.
| dict pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.to_dict | ( | self | ) |
Serialize this identifier into a debug-friendly dict.
Definition at line 129 of file BinnedObservableId.py.
|
staticprotected |
Definition at line 46 of file BinnedObservableId.py.
|
protected |
Definition at line 76 of file BinnedObservableId.py.
|
static |
Definition at line 45 of file BinnedObservableId.py.
| pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.p |
Definition at line 63 of file BinnedObservableId.py.
|
static |
Definition at line 44 of file BinnedObservableId.py.
| pyhyperiso.core.Common.BinnedObservableId.BinnedObservableId.s |
Definition at line 55 of file BinnedObservableId.py.