Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue Class Reference
Collaboration diagram for pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue:

Public Member Functions

None __post_init__ (self)
 
"ObservableValue" from_observable (cls, Observables obs, float value, Optional[Tuple[float, float]] bin=None)
 
"ObservableValue" from_cpp (cls, cpp_obj)
 
 to_cpp (self)
 

Public Attributes

 id
 
 bin
 
 value
 

Static Public Attributes

ObservableId id
 
float value
 
Optional bin = None
 

Detailed Description

Value returned by an observable computation.

Attributes:
    id: Internal observable identifier.
    value: Numerical prediction or experimental value.
    bin: Optional bin range ``(low, high)``. ``None`` means that the
        observable is unbinned or that the C++ value did not carry bin
        information.

Example:
    >>> from pyhyperiso.core.BusinessLogic.ObservableValue import ObservableValue
    >>> from pyhyperiso.core.Common.GeneralEnum import Observables
    >>> ov = ObservableValue.from_observable(Observables.BR_BS_MUMU, 3.6e-9)
    >>> ov.value
    3.6e-09

Definition at line 31 of file ObservableValue.py.

Member Function Documentation

◆ __post_init__()

None pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.__post_init__ (   self)
Validate and normalize the immutable dataclass fields.

Raises:
    TypeError: If ``id`` is not an ``ObservableId`` or if ``bin`` is
        neither ``None`` nor a two-entry tuple.

Definition at line 53 of file ObservableValue.py.

◆ from_cpp()

"ObservableValue" pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.from_cpp (   cls,
  cpp_obj 
)
Wrap a bound C++ ``ObservableValue`` object.

Args:
    cpp_obj: Bound C++ object exposing ``id``, ``value`` and optional
        ``bin`` fields.

Returns:
    Equivalent Python ``ObservableValue`` instance.

Definition at line 92 of file ObservableValue.py.

◆ from_observable()

"ObservableValue" pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.from_observable (   cls,
Observables  obs,
float  value,
Optional[Tuple[float, float]]   bin = None 
)
Create an observable value from a public observable enum.

Args:
    obs: Public observable enum value.
    value: Numerical value to store.
    bin: Optional bin range ``(low, high)`` for binned observables.

Returns:
    A normalized ``ObservableValue`` instance.

Raises:
    TypeError: If ``obs`` is not an ``Observables`` enum value.

Definition at line 68 of file ObservableValue.py.

◆ to_cpp()

pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.to_cpp (   self)
Convert this value to the bound C++ representation.

Returns:
    A C++ ``ObservableValue`` pybind11 object.

Definition at line 107 of file ObservableValue.py.

Member Data Documentation

◆ bin [1/2]

Optional pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.bin = None
static

Definition at line 51 of file ObservableValue.py.

◆ bin [2/2]

pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.bin

Definition at line 62 of file ObservableValue.py.

◆ id [1/2]

ObservableId pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.id
static

Definition at line 49 of file ObservableValue.py.

◆ id [2/2]

pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.id

Definition at line 60 of file ObservableValue.py.

◆ value [1/2]

float pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.value
static

Definition at line 50 of file ObservableValue.py.

◆ value [2/2]

pyhyperiso.core.BusinessLogic.ObservableValue.ObservableValue.value

Definition at line 65 of file ObservableValue.py.


The documentation for this class was generated from the following file: