|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Public Member Functions | |
| None | __init__ (self) |
| bool | check_flag (self, ExternalFlag ext_flag) |
| str | get_path (self, APIPath path_type) |
| Set[BlockName] | get_all_blocks (self) |
| Set[BlockName] | get_blocks_list (self, ParameterType param_type=ParameterType.SM) |
| dict[LhaID, Scalar] | get_block_infos (self, str block_name, ParameterType param_type=ParameterType.SM) |
| list[ParameterType] | get_type_of_block (self, str block_name) |
Protected Attributes | |
| _cpp_obj | |
Inspection wrapper around the C++ ``APIAdapter``.
The adapter reads process-wide state managed by the C++ core. It should
normally be used after ``HyperisoMaster.init(...)`` has loaded a model and
an LHA input file.
Examples:
>>> from pyhyperiso.core.Core.HyperisoMaster import HyperisoMaster
>>> from pyhyperiso.core.Core.HyperisoConfig import HyperisoConfig
>>> hyp = HyperisoMaster()
>>> hyp.init("lha/si_input.flha", HyperisoConfig())
>>> api = APIAdapter()
>>> api.check_flag(ExternalFlag.IS_LHA_SPECTRUM)
False
>>> api.get_path(APIPath.USER_SM_PARAMS)
'/path/to/user_sm_params.yaml'
>>> "MASS" in {str(b) for b in api.get_blocks_list(ParameterType.SM)}
True
Definition at line 58 of file APIAdapter.py.
| None pyhyperiso.core.Core.APIAdapter.APIAdapter.__init__ | ( | self | ) |
Create an adapter bound to the current C++ runtime state.
Definition at line 79 of file APIAdapter.py.
| bool pyhyperiso.core.Core.APIAdapter.APIAdapter.check_flag | ( | self, | |
| ExternalFlag | ext_flag | ||
| ) |
Return whether an external initialization flag is enabled.
Args:
ext_flag: Python wrapper for a C++ ``ExternalFlag`` value.
Returns:
``True`` if the flag is active in the current Hyperiso session,
otherwise ``False``.
Definition at line 83 of file APIAdapter.py.
| Set[BlockName] pyhyperiso.core.Core.APIAdapter.APIAdapter.get_all_blocks | ( | self | ) |
Return all known block names across parameter namespaces.
Returns:
Set of Python ``BlockName`` wrappers.
Definition at line 108 of file APIAdapter.py.
| dict[LhaID, Scalar] pyhyperiso.core.Core.APIAdapter.APIAdapter.get_block_infos | ( | self, | |
| str | block_name, | ||
| ParameterType | param_type = ParameterType.SM |
||
| ) |
Return all entries stored in a parameter block.
Args:
block_name: Name of the LHA-style block, such as ``"MASS"`` or
``"SMINPUTS"``.
param_type: Parameter namespace containing the block.
Returns:
Mapping from LHA code to scalar value.
Definition at line 131 of file APIAdapter.py.
| Set[BlockName] pyhyperiso.core.Core.APIAdapter.APIAdapter.get_blocks_list | ( | self, | |
| ParameterType | param_type = ParameterType.SM |
||
| ) |
Return the block names available in one parameter namespace.
Args:
param_type: Parameter namespace to inspect. For example,
``ParameterType.SM`` reads Standard Model input blocks, while
``ParameterType.WILSON`` reads Wilson-coefficient blocks.
Returns:
Set of available block names.
Definition at line 117 of file APIAdapter.py.
| str pyhyperiso.core.Core.APIAdapter.APIAdapter.get_path | ( | self, | |
| APIPath | path_type | ||
| ) |
Return a configured path from the C++ runtime.
Args:
path_type: Path key to query.
Returns:
Path string associated with ``path_type``. Provider-backed paths
reflect any valid pre-init override registered through
``HyperisoMaster.pre_init_set_paths(...)``.
Definition at line 95 of file APIAdapter.py.
| list[ParameterType] pyhyperiso.core.Core.APIAdapter.APIAdapter.get_type_of_block | ( | self, | |
| str | block_name | ||
| ) |
Return namespaces in which a block name exists.
Args:
block_name: Name of the block to locate.
Returns:
List of ``ParameterType`` values containing ``block_name``.
Definition at line 152 of file APIAdapter.py.
|
protected |
Definition at line 81 of file APIAdapter.py.