FeynKit · latest
On this page

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.EXTERNAL

Member details

symbol

Property · read-only#
symbol: Expression

Return 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").mathmlname

typstname

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").typstname

name

Property · read-only#
name: str

Return 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").texname

Examples

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.lhablock

lhacode

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.lhacode

nature

Property · read-only#
nature: ParameterNature

Return 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.EXTERNAL

parameter_type

Property · read-only#
parameter_type: ParameterType

Return 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.REAL

value

Property · read-only#
value: complex

Return 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__() -> str

Summarize 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_() -> str

Display 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

NameTypeDefaultDescription
prettyAny—

IPython pretty printer receiving the text.

cyclebool—

Whether the object occurs recursively in the current display.