pyfeyn2.feynmandiagram.Leg

class pyfeyn2.feynmandiagram.Leg(*args, **kwargs)[source]

Bases: Leg

__init__(*args, **kwargs)[source]

Deprecated since version 2.2.6.

Methods

__init__(*args, **kwargs)

Deprecated since version 2.2.6.

conjugate()

Set incoming to outgoing and vice versa.

get_length()

Get length of the connector

get_style_property(key)

get_tension()

Get tension of the connector

goes_into(vertex)

Return True if the leg goes into the vertex, False otherwise.

goes_out_of(vertex)

Return True if the leg goes out of the vertex, False otherwise.

incoming()

Set the leg to be incoming.

is_anti()

Return True if the particle is an anti particle, False otherwise.

is_anti_fermion()

Return True if the particle is an anti fermion, False otherwise.

is_any_fermion()

Return True if the particle is a fermion or anti fermion, False otherwise.

is_fermion()

Return True if the particle is a fermion, False otherwise.

is_incoming()

Return True if the leg is incoming, False otherwise.

is_outgoing()

Return True if the leg is outgoing, False otherwise.

outgoing()

Set the leg to be outgoing.

put_style(key, value)

Deprecated since version 0.0.0.

put_styles(**kwargs)

Deprecated since version 0.0.0.

raw_style()

with_class(clazz)

with_color(color)

with_external(value[, k])

Set external to value and return self.

with_id(id)

set id

with_incoming()

Set the leg to be incoming.

with_label(value[, k])

Set label to value and return self.

with_length(length)

Add length to the connector

with_momentum(value[, k])

Set momentum to value and return self.

with_name(value[, k])

Set name to value and return self.

with_new_id()

generate new id

with_outgoing()

Set the leg to be outgoing.

with_particle(value[, k])

Set particle to value and return self.

with_pdgid(value[, k])

Set pdgid to value and return self.

with_point(p)

with_sense(value[, k])

Set sense to value and return self.

with_shape(value[, k])

Set shape to value and return self.

with_style(style)

with_style_properties(**kwargs)

with_style_property(key, value)

with_target(target)

with_tension(tension)

Add tension to the connector

with_type(value[, k])

Set type to value and return self.

with_x(x)

with_xy(x, y)

with_xyz(x, y, z)

with_y(y)

Attributes

clazz

CSS class string.

external

External text for leg

id

label

momentum

Momentum of the connector

name

Name of the particle

particle

Particle object from the particle package

pdgid

PDG ID of the particle

sense

Sense of the leg, either 'incoming' or 'outgoing'

shape

Shape of the leg end

target

Target of the object

type

Type of the particle, e.g.

x

x coordinate

y

y coordinate

z

z coordinate

style

CSS style string.

clazz: str | None = None

CSS class string.

conjugate()[source]

Set incoming to outgoing and vice versa.

external: str | None = None

External text for leg

get_length()

Get length of the connector

get_tension()

Get tension of the connector

goes_into(vertex)[source]

Return True if the leg goes into the vertex, False otherwise.

goes_out_of(vertex)[source]

Return True if the leg goes out of the vertex, False otherwise.

incoming()

Set the leg to be incoming.

is_anti()

Return True if the particle is an anti particle, False otherwise.

is_anti_fermion()

Return True if the particle is an anti fermion, False otherwise.

is_any_fermion()

Return True if the particle is a fermion or anti fermion, False otherwise.

is_fermion()

Return True if the particle is a fermion, False otherwise.

is_incoming()[source]

Return True if the leg is incoming, False otherwise.

is_outgoing()[source]

Return True if the leg is outgoing, False otherwise.

momentum: Momentum | None = None

Momentum of the connector

name: str | None = None

Name of the particle

outgoing()

Set the leg to be outgoing.

particle: Particle | None = None

Particle object from the particle package

pdgid: int | None = None

PDG ID of the particle

put_style(key, value)

Deprecated since version 0.0.0.

put_styles(**kwargs)

Deprecated since version 0.0.0.

sense: str = None

Sense of the leg, either ‘incoming’ or ‘outgoing’

shape: str | None = None

Shape of the leg end

style: CSSString

CSS style string.

target: str | None = ''

Target of the object

type: str | None = None

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

with_external(value, k='external')

Set external to value and return self.

with_id(id: str)

set id

with_incoming()[source]

Set the leg to be incoming.

with_label(value, k='label')

Set label to value and return self.

with_length(length: float)

Add length to the connector

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_new_id()

generate new id

with_outgoing()[source]

Set the leg to be outgoing.

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_sense(value, k='sense')

Set sense to value and return self.

with_shape(value, k='shape')

Set shape to value and return self.

with_tension(tension: float)

Add tension to the connector

with_type(value, k='type')

Set type to value and return self.

x: float | None = None

x coordinate

y: float | None = None

y coordinate

z: float | None = None

z coordinate