Skip to content

UfoLoadDiagnostics

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

UfoLoadDiagnostics

class UfoLoadDiagnostics

Provenance, options, and entity counts from loading a UFO model.

Diagnostics make it easy to verify which restriction was applied and how many particles, interactions, and auxiliary structures were normalized.

Examples

Replace path/to/MyUFO with the directory containing your UFO model (particles.py, vertices.py, and related files).

from symbolica import S, E
from symbolica.community import hepkit as hep
loaded = hep.UfoLoader().load("path/to/MyUFO")
diagnostics = loaded.diagnostics
print(diagnostics.source, diagnostics.particle_count, diagnostics.vertex_rule_count)

Attributes

Name Description
coupling_count Return the number of couplings loaded.
form_factor_count Return the number of form factors loaded.
function_count Return the number of model functions loaded.
lorentz_structure_count Return the number of Lorentz structures loaded.
model_parameter_count Return the number of model parameters loaded.
order_count Return the number of coupling orders loaded from the UFO model.
parameter_value_count Return the number of parameter values loaded into the parameter card.
particle_count Return the number of particles loaded.
propagator_count Return the number of propagators loaded.
restriction_name Return the applied restriction-card name, if any.
simplify_model Return whether model expressions were simplified while loading.
source Return the UFO source directory.
vertex_rule_count Return the number of vertex rules loaded.
wrap_indices_in_lorentz_structures Return whether normalized Lorentz indices were wrapped.

coupling_count

UfoLoadDiagnostics.coupling_count: builtins.int

Return the number of couplings loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

coupling_count = diagnostics.coupling_count

form_factor_count

UfoLoadDiagnostics.form_factor_count: builtins.int

Return the number of form factors loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

form_factor_count = diagnostics.form_factor_count

function_count

UfoLoadDiagnostics.function_count: builtins.int

Return the number of model functions loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

function_count = diagnostics.function_count

lorentz_structure_count

UfoLoadDiagnostics.lorentz_structure_count: builtins.int

Return the number of Lorentz structures loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

lorentz_structure_count = diagnostics.lorentz_structure_count

model_parameter_count

UfoLoadDiagnostics.model_parameter_count: builtins.int

Return the number of model parameters loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

model_parameter_count = diagnostics.model_parameter_count

order_count

UfoLoadDiagnostics.order_count: builtins.int

Return the number of coupling orders loaded from the UFO model.

Examples

Using the setup in the UfoLoadDiagnostics class example:

order_count = diagnostics.order_count

parameter_value_count

UfoLoadDiagnostics.parameter_value_count: builtins.int

Return the number of parameter values loaded into the parameter card.

Examples

Using the setup in the UfoLoadDiagnostics class example:

parameter_value_count = diagnostics.parameter_value_count

particle_count

UfoLoadDiagnostics.particle_count: builtins.int

Return the number of particles loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

particle_count = diagnostics.particle_count

propagator_count

UfoLoadDiagnostics.propagator_count: builtins.int

Return the number of propagators loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

propagator_count = diagnostics.propagator_count

restriction_name

UfoLoadDiagnostics.restriction_name: typing.Optional[builtins.str]

Return the applied restriction-card name, if any.

Examples

Using the setup in the UfoLoadDiagnostics class example:

restriction_name = diagnostics.restriction_name

simplify_model

UfoLoadDiagnostics.simplify_model: builtins.bool

Return whether model expressions were simplified while loading.

Examples

Using the setup in the UfoLoadDiagnostics class example:

simplify_model = diagnostics.simplify_model

source

UfoLoadDiagnostics.source: pathlib.Path

Return the UFO source directory.

Examples

Using the setup in the UfoLoadDiagnostics class example:

source = diagnostics.source

vertex_rule_count

UfoLoadDiagnostics.vertex_rule_count: builtins.int

Return the number of vertex rules loaded.

Examples

Using the setup in the UfoLoadDiagnostics class example:

vertex_rule_count = diagnostics.vertex_rule_count

wrap_indices_in_lorentz_structures

UfoLoadDiagnostics.wrap_indices_in_lorentz_structures: builtins.bool

Return whether normalized Lorentz indices were wrapped.

Examples

Using the setup in the UfoLoadDiagnostics class example:

wrap_indices_in_lorentz_structures = diagnostics.wrap_indices_in_lorentz_structures

Methods

Name Description
__repr__ Return a concise summary of the UFO import diagnostics.
_repr_html_ Render the UFO source and imported object counts as a notebook table.
_repr_pretty_ Write the concise diagnostic summary to an IPython pretty printer.

__repr__

UfoLoadDiagnostics.__repr__() -> builtins.str

Return a concise summary of the UFO import diagnostics.

Examples

Using the setup in the UfoLoadDiagnostics class example:

print(loaded.diagnostics)

_repr_html_

UfoLoadDiagnostics._repr_html_() -> builtins.str

Render the UFO source and imported object counts as a notebook table.

Examples

Using the setup in the UfoLoadDiagnostics class example:

from IPython.display import display
display(diagnostics)

_repr_pretty_

UfoLoadDiagnostics._repr_pretty_(pretty: typing.Any, cycle: builtins.bool) -> None

Write the concise diagnostic summary to an IPython pretty printer.

Examples

Using the setup in the UfoLoadDiagnostics class example:

from IPython.lib.pretty import pretty
text = pretty(diagnostics)

Parameters

  • pretty (object) The IPython pretty-printer object.
  • cycle (bool) Whether this object is part of a recursive formatting cycle.