UfoLoadDiagnostics
UfoLoadDiagnostics
class UfoLoadDiagnosticsProvenance, 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.intReturn the number of couplings loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
coupling_count = diagnostics.coupling_countform_factor_count
UfoLoadDiagnostics.form_factor_count: builtins.intReturn the number of form factors loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
form_factor_count = diagnostics.form_factor_countfunction_count
UfoLoadDiagnostics.function_count: builtins.intReturn the number of model functions loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
function_count = diagnostics.function_countlorentz_structure_count
UfoLoadDiagnostics.lorentz_structure_count: builtins.intReturn the number of Lorentz structures loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
lorentz_structure_count = diagnostics.lorentz_structure_countmodel_parameter_count
UfoLoadDiagnostics.model_parameter_count: builtins.intReturn the number of model parameters loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
model_parameter_count = diagnostics.model_parameter_countorder_count
UfoLoadDiagnostics.order_count: builtins.intReturn the number of coupling orders loaded from the UFO model.
Examples
Using the setup in the UfoLoadDiagnostics class example:
order_count = diagnostics.order_countparameter_value_count
UfoLoadDiagnostics.parameter_value_count: builtins.intReturn 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_countparticle_count
UfoLoadDiagnostics.particle_count: builtins.intReturn the number of particles loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
particle_count = diagnostics.particle_countpropagator_count
UfoLoadDiagnostics.propagator_count: builtins.intReturn the number of propagators loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
propagator_count = diagnostics.propagator_countrestriction_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_namesimplify_model
UfoLoadDiagnostics.simplify_model: builtins.boolReturn whether model expressions were simplified while loading.
Examples
Using the setup in the UfoLoadDiagnostics class example:
simplify_model = diagnostics.simplify_modelsource
UfoLoadDiagnostics.source: pathlib.PathReturn the UFO source directory.
Examples
Using the setup in the UfoLoadDiagnostics class example:
source = diagnostics.sourcevertex_rule_count
UfoLoadDiagnostics.vertex_rule_count: builtins.intReturn the number of vertex rules loaded.
Examples
Using the setup in the UfoLoadDiagnostics class example:
vertex_rule_count = diagnostics.vertex_rule_countwrap_indices_in_lorentz_structures
UfoLoadDiagnostics.wrap_indices_in_lorentz_structures: builtins.boolReturn 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_structuresMethods
| 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.strReturn 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.strRender 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) -> NoneWrite 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.