LoadedModel
symbolica.community.hepkit Class
LoadedModel()A normalized model, its parameter card, and its loading diagnostics.
This is the complete result returned by UfoLoader.load; use model for diagram generation and parameters for external numerical inputs.
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")
model = loaded.model
particle_names = [particle.name for particle in model.particles]
parameters = loaded.parametersMember details
model
Property · read-only#model: ModelReturn the normalized HEP model.
Examples
Using the setup in the LoadedModel class example:
model = loaded.model
particles = model.particlesparameters
Property · read-only#parameters: ParameterCardReturn the parameter card loaded alongside the model.
Examples
Using the setup in the LoadedModel class example:
parameters = loaded.parameters
shifted = loaded.model.with_parameter_card(parameters)diagnostics
Property · read-only#diagnostics: UfoLoadDiagnosticsReturn counts and options recorded while loading the UFO model.
Examples
Using the setup in the LoadedModel class example:
counts = (loaded.diagnostics.particle_count, loaded.diagnostics.vertex_rule_count)__repr__
Method#__repr__() -> strReturn a concise summary of the loaded model and its source.
Examples
Using the setup in the LoadedModel class example:
print(loaded)_repr_html_
Method#_repr_html_() -> strRender a compact overview of the normalized UFO model.
Examples
Using the setup in the LoadedModel class example:
from IPython.display import display
display(loaded)_repr_pretty_
Method#_repr_pretty_(pretty: Any, cycle: bool) -> None Write the concise loaded-model summary to an IPython pretty printer.
Examples
Using the setup in the LoadedModel class example:
from IPython.lib.pretty import pretty
text = pretty(loaded)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
pretty | Any | — | The IPython pretty-printer object. |
cycle | bool | — | Whether this object is part of a recursive formatting cycle. |
View generated signature source: docs/api/python/feynkit-community.pyi:6549