LoadedModel
LoadedModel
class LoadedModelA 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.parametersAttributes
| Name | Description |
|---|---|
diagnostics |
Return counts and options recorded while loading the UFO model. |
model |
Return the normalized HEP model. |
parameters |
Return the parameter card loaded alongside the model. |
diagnostics
LoadedModel.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)model
LoadedModel.model: ModelReturn the normalized HEP model.
Examples
Using the setup in the LoadedModel class example:
model = loaded.model
particles = model.particlesparameters
LoadedModel.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)Methods
| Name | Description |
|---|---|
__repr__ |
Return a concise summary of the loaded model and its source. |
_repr_html_ |
Render a compact overview of the normalized UFO model. |
_repr_pretty_ |
Write the concise loaded-model summary to an IPython pretty printer. |
__repr__
LoadedModel.__repr__() -> builtins.strReturn a concise summary of the loaded model and its source.
Examples
Using the setup in the LoadedModel class example:
print(loaded)_repr_html_
LoadedModel._repr_html_() -> builtins.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_
LoadedModel._repr_pretty_(pretty: typing.Any, cycle: builtins.bool) -> NoneWrite 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
pretty(object) The IPython pretty-printer object.cycle(bool) Whether this object is part of a recursive formatting cycle.