slactrac.Bend

class slactrac.Bend(length=0, angle=0, order=1, rotate=0, name=None, **kwargs)[source]

Represents a bend element.

Parameters:

length : float

The length of the magnet.

angle : float

The bend angle of the magnet.

rotate : float

The rotation about z of the magnet.

order : float

Order to calculate matrix elements.

name : str

Unique name to identify the element.

Attributes

K1
R The first-order transfer matrix.
angle The bend angle of the magnet in degrees.
ele_name Returns the elegant-styled name.
ele_string Returns the full elegant entry.
length The length of the magnet.
name
order
radlength
rotate The rotation about z of the magnet.
thickness
tilt The bend angle of the magnet in radians.

Methods

change_E(old_gamma, new_gamma) Scale the setpoint energy of the magnet from the old energy old_gamma to new energy new_gamma.