DiagramStyle
symbolica.community.hepkit Class
DiagramStyle(*, show_particle: Optional[bool] = None, show_momentum: Optional[bool] = None, show_edge_index: Optional[bool] = None, show_node_index: Optional[bool] = None, momentum_arrows: Optional[bool] = None, split_initial_state: Optional[bool] = None, debug: Optional[bool] = None) Particle and momentum presentation for Feynman diagrams.
Examples
from symbolica.community import hepkit as hep
style = hep.DiagramStyle(show_momentum=True)
style.show_momentumConstructor
#Select physics presentation without changing graph layout or drawing settings.
Examples
style = hep.DiagramStyle(show_particle=False, show_momentum=True)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
show_particle | Optional[ | None | Show particle labels; None preserves the renderer default. |
show_momentum | Optional[ | None | Show momentum labels; None follows the render request. |
show_edge_index | Optional[ | None | Show the physical edge indices. |
show_node_index | Optional[ | None | Show the physical vertex indices. |
momentum_arrows | Optional[ | None | Draw momentum arrows beside particle lines. |
split_initial_state | Optional[ | None | Separate the incoming states of a cross-section drawing. |
debug | Optional[ | None | Show both vertex and edge indices unless individually overridden. |
Member details
show_particle
Property · read-only#show_particle: Optional[bool] Show particle labels; None preserves the renderer default.
Examples
hep.DiagramStyle(show_particle=True).show_particleshow_momentum
Property · read-only#show_momentum: Optional[bool] Show momentum labels; None follows the render request.
Examples
hep.DiagramStyle(show_momentum=True).show_momentumshow_edge_index
Property · read-only#show_edge_index: Optional[bool] Show the physical edge indices.
Examples
hep.DiagramStyle(show_edge_index=True).show_edge_indexshow_node_index
Property · read-only#show_node_index: Optional[bool] Show the physical vertex indices.
Examples
hep.DiagramStyle(show_node_index=True).show_node_indexmomentum_arrows
Property · read-only#momentum_arrows: Optional[bool] Draw momentum arrows beside particle lines.
Examples
hep.DiagramStyle(momentum_arrows=True).momentum_arrowssplit_initial_state
Property · read-only#split_initial_state: Optional[bool] Separate the incoming states of a cross-section drawing.
Examples
hep.DiagramStyle(split_initial_state=True).split_initial_statedebug
Property · read-only#debug: Optional[bool] Show both vertex and edge indices unless individually overridden.
Examples
hep.DiagramStyle(debug=True).debug__repr__
Method#__repr__() -> strSummarize the explicitly selected physics options.
Examples
repr(hep.DiagramStyle())View generated signature source: docs/api/python/feynkit-community.pyi:2243