feynml.leg.Leg
- class feynml.leg.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, label: Optional[str] = None, momentum: Optional[feynml.momentum.Momentum] = 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: str | None = None, pdgid: int | None = None, name: str | None = None, type: str | None = None, particle: ~particle.particle.particle.Particle | None = None, style: ~cssutils.css.cssstyledeclaration.CSSStyleDeclaration = <factory>, clazz: str | None = None, label: str | None = None, momentum: ~feynml.momentum.Momentum | None = None, target: str | None = '', x: float | None = None, y: float | None = None, z: float | None = None, sense: str | None = None, external: str | None = None) None
Methods
__init__([id, pdgid, name, type, particle, ...])Get length of the connector
get_style_property(key)Get tension of the connector
Return True if the leg is incoming, False otherwise.
Return True if the leg is outgoing, False otherwise.
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(value[, k])Set id to value and return self.
with_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_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_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_xy(x, y)with_xyz(x, y, z)Attributes
CSS class string.
External text for leg
idlabelMomentum 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
Type of the particle, e.g.
x coordinate
y coordinate
z coordinate
CSS style string.
- clazz: str | None = None
CSS class string.
- external: str | None = None
External text for leg
- get_length()
Get length of the connector
- get_tension()
Get tension of the connector
- name: str | None = None
Name of the particle
- 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’
- 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(value, k='id')
Set id to value and return self.
- 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_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(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