pyfeyn2.feynmandiagram.Leg
- class pyfeyn2.feynmandiagram.Leg(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[str] = None, tension: Optional[float] = None, length: Optional[float] = None, target: Optional[str] = '', x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, sense: str = None, external: Optional[str] = None)[source]
Bases:
Point,Targeting,Connector- __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[str] = None, tension: ~typing.Optional[float] = None, length: ~typing.Optional[float] = None, target: ~typing.Optional[str] = '', x: ~typing.Optional[float] = None, y: ~typing.Optional[float] = None, z: ~typing.Optional[float] = None, sense: ~typing.Optional[str] = None, external: ~typing.Optional[str] = None) None
Methods
__init__([id, pdgid, name, type, particle, ...])put_style(key, value)raw_style()set_external(*args, **kwargs)Deprecated since version 2.0.7.1.
set_incoming(*args, **kwargs)Deprecated since version 2.0.7.1.
set_label(*args, **kwargs)Deprecated since version 2.0.7.1.
set_length(*args, **kwargs)Deprecated since version 2.0.7.1.
set_momentum(*args, **kwargs)Deprecated since version 2.0.7.1.
set_name(*args, **kwargs)Deprecated since version 2.0.7.1.
set_outgoing(*args, **kwargs)Deprecated since version 2.0.7.1.
set_pdgig(*args, **kwargs)Deprecated since version 2.0.7.1.
set_point(*args, **kwargs)Deprecated since version 2.0.7.1.
set_target(*args, **kwargs)Deprecated since version 2.0.7.1.
set_tension(*args, **kwargs)Deprecated since version 2.0.7.1.
set_type(*args, **kwargs)Deprecated since version 2.0.7.1.
set_xy(*args, **kwargs)Deprecated since version 2.0.7.1.
set_xyz(*args, **kwargs)Deprecated since version 2.0.7.1.
with_bend(bend)Deprecated since version 2.0.7.1.
with_class(clazz)with_external(value[, k])Set external to value and return self.
with_id(value[, k])Set id to value and return self.
with_incoming()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_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_style(style)with_target(target)with_tension(value[, k])Set tension to value and return self.
with_type(value[, k])Set type to value and return self.
with_xy(x, y)with_xyz(x, y, z)Attributes
bendCSS class string.
External text for leg
idLabel the object
Length of the connector
Momentum of the connector
Name of the particle
Particle object from the particle package
PDG ID of the particle
Sense of the leg, either 'incoming' or 'outgoing'
Target of the object
Tension of the connector
typex coordinate
y coordinate
z coordinate
- clazz: Optional[str] = None
CSS class string.
- external: Optional[str] = None
External text for leg
- label: Optional[str] = None
Label the object
- length: Optional[float] = None
Length of the connector
- momentum: Optional[str] = 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
- sense: str = None
Sense of the leg, either ‘incoming’ or ‘outgoing’
- set_external(*args, **kwargs)[source]
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_incoming(*args, **kwargs)[source]
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_label(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_length(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use style=”tension=”.
- set_momentum(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_name(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_outgoing(*args, **kwargs)[source]
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_pdgig(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_point(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_target(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_tension(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use style=”tension=”.
- set_type(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_xy(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- set_xyz(*args, **kwargs)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use with…().
- style: CSSStyleDeclaration
CSS style string.
- target: Optional[str] = ''
Target of the object
- tension: Optional[float] = None
Tension of the connector
- with_bend(bend)
Deprecated since version 2.0.7.1: This will be removed in 2.2. Use style=”bend : true”.
- with_external(value, k='external')
Set external to value and return self.
- 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_sense(value, k='sense')
Set sense 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.
- x: Optional[float] = None
x coordinate
- y: Optional[float] = None
y coordinate
- z: Optional[float] = None
z coordinate