|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Public Member Functions | |
| None | __init__ (self, *bool configure_default_paths=True, Optional[PathLike] assets_root=None, Optional[PathLike] cache_root=None) |
| None | configure_default_paths (self, *Optional[PathLike] assets_root=None, Optional[PathLike] cache_root=None) |
| None | init (self, PathLike lha_file, Optional[HyperisoConfig] config=None) |
| None | pre_init_add_block (self, str block_name, int item_count=2, int value_idx=1, int scale_idx=-1, int rg_idx=-1, int bin_idx=-1, bool global_scale=False) |
| None | pre_init_set_marty_path (self, PathLike marty_path) |
| None | pre_init_set_softsusy_path (self, PathLike softsusy_path) |
| None | pre_init_set_paths (self, Mapping[Any, PathLike] path_overrides) |
| None | pre_init_set_marty_cache_dir (self, PathLike cache_dir) |
| None | pre_init_set_spectrum_cache_dir (self, PathLike cache_dir) |
| None | switch_lha (self, PathLike lha_file, Optional[HyperisoConfig] config=None) |
| bool | check_flag (self, ExternalFlag flag) |
| Model | model (self) |
| str | __repr__ (self) |
Public Attributes | |
| config | |
Static Protected Member Functions | |
| Optional[Path] | _packaged_assets_root () |
| Optional[Path] | _legacy_source_assets_root () |
| Path | _default_cache_root () |
| Any | _to_cpp_api_path (Any path_key) |
| str | _resolve_lha_path (PathLike lha_file) |
Protected Attributes | |
| _cpp_obj | |
High-level Python wrapper around the C++ ``HyperisoMaster``. The wrapper configures package-friendly defaults before initialization: read-only assets are looked up under ``pyhyperiso/assets`` when available, and writable caches are placed under the user cache directory unless the caller provides explicit directories.
Definition at line 51 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.__init__ | ( | self, | |
| *bool | configure_default_paths = True, |
||
| Optional[PathLike] | assets_root = None, |
||
| Optional[PathLike] | cache_root = None |
||
| ) |
Create an uninitialized Hyperiso controller.
Args:
configure_default_paths: When ``True``, configure packaged assets
and cache directories before any call to ``init``.
assets_root: Optional replacement for the packaged read-only
assets directory.
cache_root: Optional root used to create ``MartyTemp`` and
``Spectrum`` writable cache directories.
Definition at line 60 of file HyperisoMaster.py.
| str pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.__repr__ | ( | self | ) |
Return a compact representation including the active model.
Definition at line 277 of file HyperisoMaster.py.
|
staticprotected |
Return a writable cache root without adding a hard platformdirs dependency.
Definition at line 104 of file HyperisoMaster.py.
|
staticprotected |
Return the historical source-tree ``Assets`` directory when present.
Definition at line 96 of file HyperisoMaster.py.
|
staticprotected |
Return ``pyhyperiso/assets`` when it is available as a filesystem path.
Definition at line 84 of file HyperisoMaster.py.
|
staticprotected |
Prepare an LHA path for the C++ layer. Absolute paths are forwarded as absolute paths. Relative paths are kept relative so that the C++ ``MemoryManager`` resolves them under the active ``ASSETS_ROOT``. This is important for wheels where ``Assets`` no longer lives next to the source checkout.
Definition at line 165 of file HyperisoMaster.py.
|
staticprotected |
Convert a Python APIPath-like value to the bound C++ enum value.
Definition at line 121 of file HyperisoMaster.py.
| bool pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.check_flag | ( | self, | |
| ExternalFlag | flag | ||
| ) |
Return whether an external flag is active.
Definition at line 268 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.configure_default_paths | ( | self, | |
| *Optional[PathLike] | assets_root = None, |
||
| Optional[PathLike] | cache_root = None |
||
| ) |
Configure package assets and writable cache directories before init.
Args:
assets_root: Optional read-only assets directory. When omitted, the
wrapper first tries ``pyhyperiso/assets`` and then the historical
source-tree ``Assets`` directory.
cache_root: Optional writable root. ``MartyTemp`` and ``Spectrum``
are created below it. When omitted, a standard user cache root is
used.
Definition at line 131 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.init | ( | self, | |
| PathLike | lha_file, | ||
| Optional[HyperisoConfig] | config = None |
||
| ) |
Initialize Hyperiso with an LHA file.
Args:
lha_file: Absolute LHA path, or path relative to the active
``ASSETS_ROOT``.
config: Optional initialization config. When omitted, the C++
default configuration is used and ``self.config`` is set to a
default :class:`HyperisoConfig` instance.
Definition at line 176 of file HyperisoMaster.py.
| Model pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.model | ( | self | ) |
Return the physics model currently active in C++.
Definition at line 273 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_add_block | ( | self, | |
| str | block_name, | ||
| int | item_count = 2, |
||
| int | value_idx = 1, |
||
| int | scale_idx = -1, |
||
| int | rg_idx = -1, |
||
| int | bin_idx = -1, |
||
| bool | global_scale = False |
||
| ) |
Register an additional LHA block prototype before initialization.
Definition at line 194 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_set_marty_cache_dir | ( | self, | |
| PathLike | cache_dir | ||
| ) |
Set the writable MARTY generated-code/cache directory before init.
Definition at line 245 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_set_marty_path | ( | self, | |
| PathLike | marty_path | ||
| ) |
Register an existing MARTY installation before initialization.
Definition at line 215 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_set_paths | ( | self, | |
| Mapping[Any, PathLike] | path_overrides | ||
| ) |
Override selected Hyperiso filesystem paths before initialization.
Args:
path_overrides: Mapping from ``APIPath`` keys to replacement paths.
Keys may be this wrapper's ``APIPath`` enum, the low-level C++
``APIPath`` enum, another wrapper enum exposing a ``.value``
C++ enum, or a string matching an ``APIPath`` name. Values may
be strings or ``os.PathLike`` objects.
Definition at line 229 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_set_softsusy_path | ( | self, | |
| PathLike | softsusy_path | ||
| ) |
Register a SOFTSUSY executable or installation directory before initialization. ``softsusy_path`` may point directly to ``softpoint.x`` or to a local SOFTSUSY installation/source directory containing one of the usual executable locations: ``softpoint.x``, ``bin/softpoint.x`` or ``src/SOFTSUSY/softpoint.x``.
Definition at line 219 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.pre_init_set_spectrum_cache_dir | ( | self, | |
| PathLike | cache_dir | ||
| ) |
Set the writable spectrum cache directory before init.
Definition at line 249 of file HyperisoMaster.py.
| None pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.switch_lha | ( | self, | |
| PathLike | lha_file, | ||
| Optional[HyperisoConfig] | config = None |
||
| ) |
Switch the active LHA input file.
Definition at line 253 of file HyperisoMaster.py.
|
protected |
Definition at line 77 of file HyperisoMaster.py.
| pyhyperiso.core.Core.HyperisoMaster.HyperisoMaster.config |
Definition at line 189 of file HyperisoMaster.py.