DiagramStyle

class DiagramStyle

Particle and momentum presentation for Feynman diagrams.

Examples

from symbolica.community import hepkit as hep
style = hep.DiagramStyle(show_momentum=True)
style.show_momentum
True

Attributes

Name Description
debug Show both vertex and edge indices unless individually overridden.
momentum_arrows Draw momentum arrows beside particle lines.
show_edge_index Show the physical edge indices.
show_momentum Show momentum labels; None follows the render request.
show_node_index Show the physical vertex indices.
show_particle Show particle labels; None preserves the renderer default.
split_initial_state Separate the incoming states of a cross-section drawing.

debug

DiagramStyle.debug: typing.Optional[builtins.bool]

Show both vertex and edge indices unless individually overridden.

Examples

hep.DiagramStyle(debug=True).debug
True

momentum_arrows

DiagramStyle.momentum_arrows: typing.Optional[builtins.bool]

Draw momentum arrows beside particle lines.

Examples

hep.DiagramStyle(momentum_arrows=True).momentum_arrows
True

show_edge_index

DiagramStyle.show_edge_index: typing.Optional[builtins.bool]

Show the physical edge indices.

Examples

hep.DiagramStyle(show_edge_index=True).show_edge_index
True

show_momentum

DiagramStyle.show_momentum: typing.Optional[builtins.bool]

Show momentum labels; None follows the render request.

Examples

hep.DiagramStyle(show_momentum=True).show_momentum
True

show_node_index

DiagramStyle.show_node_index: typing.Optional[builtins.bool]

Show the physical vertex indices.

Examples

hep.DiagramStyle(show_node_index=True).show_node_index
True

show_particle

DiagramStyle.show_particle: typing.Optional[builtins.bool]

Show particle labels; None preserves the renderer default.

Examples

hep.DiagramStyle(show_particle=True).show_particle
True

split_initial_state

DiagramStyle.split_initial_state: typing.Optional[builtins.bool]

Separate the incoming states of a cross-section drawing.

Examples

hep.DiagramStyle(split_initial_state=True).split_initial_state
True

Methods

Name Description
__new__ Select physics presentation without changing graph layout or drawing settings.
__repr__ Summarize the explicitly selected physics options.

__new__

DiagramStyle.__new__(
    *,
    show_particle: typing.Optional[builtins.bool] = None,
    show_momentum: typing.Optional[builtins.bool] = None,
    show_edge_index: typing.Optional[builtins.bool] = None,
    show_node_index: typing.Optional[builtins.bool] = None,
    momentum_arrows: typing.Optional[builtins.bool] = None,
    split_initial_state: typing.Optional[builtins.bool] = None,
    debug: typing.Optional[builtins.bool] = None,
) -> DiagramStyle

Select physics presentation without changing graph layout or drawing settings.

Examples

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

Parameters

  • show_particle (bool or None, optional) Show particle labels; None preserves the renderer default.
  • show_momentum (bool or None, optional) Show momentum labels; None follows the render request.
  • show_edge_index (bool or None, optional) Show the physical edge indices.
  • show_node_index (bool or None, optional) Show the physical vertex indices.
  • momentum_arrows (bool or None, optional) Draw momentum arrows beside particle lines.
  • split_initial_state (bool or None, optional) Separate the incoming states of a cross-section drawing.
  • debug (bool or None, optional) Show both vertex and edge indices unless individually overridden.

__repr__

DiagramStyle.__repr__() -> builtins.str

Summarize the explicitly selected physics options.

Examples

repr(hep.DiagramStyle())
'DiagramStyle()'