pyfeyn2.feynmandiagram.Connector

class pyfeyn2.feynmandiagram.Connector(id: Optional[str] = None, pdgid: Optional[int] = None, name: Optional[str] = None, type: Optional[str] = None, particle: Optional[particle.particle.particle.Particle] = None, style: cssutils.css.cssstyledeclaration.CSSStyleDeclaration = <factory>, clazz: Optional[str] = None, bend: Optional[float] = None, label: Optional[str] = None, momentum: Optional[pyfeyn2.feynmandiagram.Momentum] = None, tension: Optional[float] = None, length: Optional[float] = None)[source]

Bases: Labeled, Bending, Styled, PDG

__init__(id: ~typing.Optional[str] = None, pdgid: ~typing.Optional[int] = None, name: ~typing.Optional[str] = None, type: ~typing.Optional[str] = None, particle: ~typing.Optional[~particle.particle.particle.Particle] = None, style: ~cssutils.css.cssstyledeclaration.CSSStyleDeclaration = <factory>, clazz: ~typing.Optional[str] = None, bend: ~typing.Optional[float] = None, label: ~typing.Optional[str] = None, momentum: ~typing.Optional[~pyfeyn2.feynmandiagram.Momentum] = None, tension: ~typing.Optional[float] = None, length: ~typing.Optional[float] = None) None

Methods

__init__([id, pdgid, name, type, particle, ...])

put_style(key, value)

raw_style()

set_label(*args, **kwargs)

set_length(*args, **kwargs)

set_momentum(*args, **kwargs)

set_name(*args, **kwargs)

set_pdgig(*args, **kwargs)

set_tension(*args, **kwargs)

set_type(*args, **kwargs)

with_bend(bend)

with_class(clazz)

with_id(value[, k])

Set id to value and return self.

with_label(value[, k])

Set label to value and return self.

with_length(value[, k])

Set length to value and return self.

with_momentum(value[, k])

Set momentum to value and return self.

with_name(value[, k])

Set name to value and return self.

with_particle(value[, k])

Set particle to value and return self.

with_pdgid(value[, k])

Set pdgid to value and return self.

with_style(style)

with_tension(value[, k])

Set tension to value and return self.

with_type(value[, k])

Set type to value and return self.

Attributes

bend

clazz

CSS class string.

id

label

Label the object

length

Length of the connector

momentum

Momentum of the connector

name

Name of the particle

particle

Particle object from the particle package

pdgid

PDG ID of the particle

tension

Tension of the connector

type

Type of the particle, e.g.

clazz: Optional[str] = None

CSS class string.

label: Optional[str] = None

Label the object

length: Optional[float] = None

Length of the connector

momentum: Optional[Momentum] = None

Momentum of the connector

name: Optional[str] = None

Name of the particle

particle: Optional[Particle] = None

Particle object from the particle package

pdgid: Optional[int] = None

PDG ID of the particle

style: CSSStyleDeclaration

CSS style string.

tension: Optional[float] = None

Tension of the connector

type: Optional[str] = None

Type of the particle, e.g. fermion, boson, etc.

with_id(value, k='id')

Set id to value and return self.

with_label(value, k='label')

Set label to value and return self.

with_length(value, k='length')

Set length to value and return self.

with_momentum(value, k='momentum')

Set momentum to value and return self.

with_name(value, k='name')

Set name to value and return self.

with_particle(value, k='particle')

Set particle to value and return self.

with_pdgid(value, k='pdgid')

Set pdgid to value and return self.

with_tension(value, k='tension')

Set tension to value and return self.

with_type(value, k='type')

Set type to value and return self.