Parameter
symbolica.community.hepkit Class
Parameter()A numerical or symbolic parameter in a particle-physics model.
External parameters carry parameter-card coordinates and values; internal parameters carry expressions derived from the external inputs.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
mass = model.parameter("MM")
assert mass.nature == hep.ParameterNature.EXTERNALMember details
symbol
Property · read-only#symbol: ExpressionReturn the symbolic reference used by this model's expressions. TeX and Typst output use texname and typstname, respectively. Plain output keeps its symbolic name; no defining expression or numerical value is substituted.
Examples
from symbolica.community import hepkit as hep
model = hep.Model.standard_model()
reference = model.parameter("ee").symbol
mass = model.parameter("Me").symbol
assert "m_e" in (mass**2).to_latex()mathmlname
Property · read-only#mathmlname: Optional[str] The model's presentation MathML fragment for this symbol, or None when absent.
Examples
from symbolica.community import hepkit as hep
assert "<msub>" in hep.Model.standard_model().parameter("Me").mathmlnametypstname
Property · read-only#typstname: Optional[str] Native Typst math label without dollar delimiters, or None if not supplied.
Examples
from symbolica.community import hepkit as hep
hep.Model.phi4().parameter("lam").typstnamename
Property · read-only#name: strReturn the parameter name.
Examples
Using the setup in the Parameter class example:
assert mass.name == "MM"texname
Property · read-only#texname: Optional[str] The model's LaTeX display label, or None when no label was supplied. Native Typst output uses typstname independently.
hep.Model.standard_model().parameter("ee").texnameExamples
Using the setup in the Parameter class example:
label = model.parameter("ee").texname
assert label == "e"lhablock
Property · read-only#lhablock: Optional[str] Return the Les Houches block name, when defined.
Examples
Using the setup in the Parameter class example:
mass = model.parameter(model.particle_by_pdg(13).mass_parameter)
mass.lhablocklhacode
Property · read-only#lhacode: Optional[list[int]] Return the Les Houches entry indices, when defined.
Examples
Using the setup in the Parameter class example:
mass = model.parameter(model.particle_by_pdg(13).mass_parameter)
mass.lhacodenature
Property · read-only#nature: ParameterNatureReturn whether the parameter is external or internal.
Examples
Using the setup in the Parameter class example:
mass = model.parameter(model.particle_by_pdg(13).mass_parameter)
mass.nature == hep.ParameterNature.EXTERNALparameter_type
Property · read-only#parameter_type: ParameterTypeReturn whether the parameter is real or complex.
Examples
Using the setup in the Parameter class example:
mass = model.parameter(model.particle_by_pdg(13).mass_parameter)
mass.parameter_type == hep.ParameterType.REALvalue
Property · read-only#value: complexReturn the evaluated value as a native Python complex number.
Raises ModelError when this parameter has not been evaluated.
Examples
Using the setup in the Parameter class example:
mass_value = model.parameter("MM").value
print("mass:", mass_value.real, "width component:", mass_value.imag)expression
Property · read-only#expression: Optional[Expression] Return the defining expression for an internal parameter.
Examples
Using the setup in the Parameter class example:
internal = next(p for p in model.parameters if p.expression is not None)
formula = internal.expression__repr__
Method#__repr__() -> strSummarize the defining data as well as the parameter name.
Examples
Using the setup in the Parameter class example:
print(model.parameter(model.particle_by_pdg(13).mass_parameter))_repr_html_
Method#_repr_html_() -> strDisplay the model member's physical data and defining expressions.
Examples
Using the setup in the Parameter class example:
from IPython.display import display
display(mass)_repr_pretty_
Method#_repr_pretty_(pretty: Any, cycle: bool) -> None Write the complete text summary to an IPython pretty printer.
Examples
Using the setup in the Parameter class example:
from IPython.lib.pretty import pretty
text = pretty(mass)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pretty | Any | — | IPython pretty printer receiving the text. |
cycle | bool | — | Whether the object occurs recursively in the current display. |
View generated signature source: docs/api/python/feynkit-community.pyi:8517