pyfeyn2.render.pyx.deco

A couple of classes for decorating diagram elements.

Module Contents

Classes

Arrow

Arrow for Feynman diagram lines

FreeArrow

Arrow not attached to any line in a diagram.

ParallelArrow

Arrow running parallel to a line, for momenta, helicities etc.

Label

General label, unattached to any diagram elements

PointLabel

Label attached to points on the diagram

LineLabel

Label for Feynman diagram lines

Functions

getarrowpath(arrowtopath, selfpos, var1, selfsize, ...)

pyfeyn2.render.pyx.deco.getarrowpath(arrowtopath, selfpos, var1, selfsize, var2, selfconstriction, constrictionlen)[source]
class pyfeyn2.render.pyx.deco.Arrow(pos=0.5, size=6 * pyx.unit.v_pt, angle=45, constriction=0.8)[source]

Bases: pyx.deco.deco, pyx.attr.attr

Arrow for Feynman diagram lines

Constructor.

decorate(dp)[source]

Attach arrow to a path (usually a line).

class pyfeyn2.render.pyx.deco.FreeArrow(length=0.5 * pyx.unit.v_cm, size=6 * pyx.unit.v_pt, angle=45, constriction=0.8, pos=None, x=None, y=None, direction=0)[source]

Bases: pyfeyn2.render.pyx.utils.Visible

Arrow not attached to any line in a diagram.

Constructor.

draw(canvas)[source]

Draw this arrow on the supplied canvas.

class pyfeyn2.render.pyx.deco.ParallelArrow(line, pos=0.5, displace=0.3, length=0.5 * pyx.unit.v_cm, size=6 * pyx.unit.v_pt, angle=45, constriction=0.8, sense=+1, curved=False, stems=1, stemsep=0.03)[source]

Bases: pyfeyn2.render.pyx.utils.Visible

Arrow running parallel to a line, for momenta, helicities etc.

Constructor.

draw(canvas)[source]

Draw this arrow on the supplied canvas.

class pyfeyn2.render.pyx.deco.Label(text, pos=None, x=None, y=None, size=pyx.text.size.normalsize, halign=CENTER, valign=None)[source]

Bases: pyfeyn2.render.pyx.utils.Visible

General label, unattached to any diagram elements

Constructor.

draw(canvas)[source]

Draw this label on the supplied canvas.

class pyfeyn2.render.pyx.deco.PointLabel(point, text, displace=0.3, angle=0, size=pyx.text.size.normalsize, halign=CENTER, valign=None)[source]

Bases: Label

Label attached to points on the diagram

Constructor.

getPoint()[source]

Get the point associated with this label.

setPoint(point)[source]

Set the point associated with this label.

draw(canvas)[source]

Draw this label on the supplied canvas.

class pyfeyn2.render.pyx.deco.LineLabel(line, text, pos=0.5, displace=0.3, angle=0, size=pyx.text.size.normalsize, halign=CENTER, valign=None)[source]

Bases: Label

Label for Feynman diagram lines

Constructor.

getLine()[source]

Get the associated line.

setLine(line)[source]

Set the associated line.

draw(canvas)[source]

Draw this label on the supplied canvas.