FeynKit · latest
On this page

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_momentum

Constructor

#

Select physics presentation without changing graph layout or drawing settings.

Examples

style = hep.DiagramStyle(show_particle=False, show_momentum=True)

Parameters

NameTypeDefaultDescription
show_particleOptional[bool]None

Show particle labels; None preserves the renderer default.

show_momentumOptional[bool]None

Show momentum labels; None follows the render request.

show_edge_indexOptional[bool]None

Show the physical edge indices.

show_node_indexOptional[bool]None

Show the physical vertex indices.

momentum_arrowsOptional[bool]None

Draw momentum arrows beside particle lines.

split_initial_stateOptional[bool]None

Separate the incoming states of a cross-section drawing.

debugOptional[bool]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_particle

show_momentum

Property · read-only#
show_momentum: Optional[bool]

Show momentum labels; None follows the render request.

Examples

hep.DiagramStyle(show_momentum=True).show_momentum

show_edge_index

Property · read-only#
show_edge_index: Optional[bool]

Show the physical edge indices.

Examples

hep.DiagramStyle(show_edge_index=True).show_edge_index

show_node_index

Property · read-only#
show_node_index: Optional[bool]

Show the physical vertex indices.

Examples

hep.DiagramStyle(show_node_index=True).show_node_index

momentum_arrows

Property · read-only#
momentum_arrows: Optional[bool]

Draw momentum arrows beside particle lines.

Examples

hep.DiagramStyle(momentum_arrows=True).momentum_arrows

split_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_state

debug

Property · read-only#
debug: Optional[bool]

Show both vertex and edge indices unless individually overridden.

Examples

hep.DiagramStyle(debug=True).debug

__repr__

Method#
__repr__() -> str

Summarize the explicitly selected physics options.

Examples

repr(hep.DiagramStyle())