ocelot.cpbd.elements¶
definition of magnetic lattice linear dimensions in [m]
Module Contents¶
Classes¶
Element is a basic beamline building element |
|
Element is a basic beamline building element |
|
Element is a basic beamline building element |
|
Aperture |
|
quadrupole |
|
sextupole |
|
octupole |
|
drift - free space |
|
bending magnet |
|
bending magnet |
|
sector bending magnet, |
|
rectangular bending magnet, |
|
Quadrupole with offsets (linear element). The element is to test a transport feature and it is not tested. |
|
horizontal corrector, |
|
horizontal corrector, |
|
Undulator |
|
Standing wave RF cavity |
|
Coupler Kick element for Cavity |
|
Traveling wave cavity |
|
Transverse deflecting cavity - by default kick in horizontal plane |
|
Solenoid |
|
kn - list of strengths |
|
Matrix element |
|
l - length of lens in [m] |
|
Functions¶
|
-
class
ocelot.cpbd.elements.Element(eid=None)¶ Bases:
objectElement is a basic beamline building element Accelerator optics elements are subclasses of Element Arbitrary set of additional parameters can be attached if necessary
-
__hash__(self)¶ Return hash(self).
-
__eq__(self, other)¶ Return self==value.
-
-
class
ocelot.cpbd.elements.Monitor(l=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementElement is a basic beamline building element Accelerator optics elements are subclasses of Element Arbitrary set of additional parameters can be attached if necessary
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Marker(eid=None)¶ Bases:
ocelot.cpbd.elements.ElementElement is a basic beamline building element Accelerator optics elements are subclasses of Element Arbitrary set of additional parameters can be attached if necessary
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Aperture(xmax=np.inf, ymax=np.inf, dx=0, dy=0, type='rect', eid=None)¶ Bases:
ocelot.cpbd.elements.ElementAperture xmax - half size in horizontal plane in [m], ymax - half size in vertical plane in [m], type - “rect” or “elliptical”.
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Quadrupole(l=0.0, k1=0, k2=0.0, tilt=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementquadrupole l - length of lens in [m], k1 - strength of quadrupole lens in [1/m^2], k2 - strength of sextupole lens in [1/m^3], tilt - tilt of lens in [rad].
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Sextupole(l=0.0, k2=0.0, tilt=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementsextupole l - length of lens in [m], k2 - strength of sextupole lens in [1/m^3].
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Octupole(l=0.0, k3=0.0, tilt=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementoctupole k3 - strength of octupole lens in [1/m^4], l - length of lens in [m].
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Drift(l=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementdrift - free space l - length of drift in [m]
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Bend(l=0.0, angle=0.0, k1=0.0, k2=0.0, e1=0.0, e2=0.0, tilt=0.0, gap=0.0, h_pole1=0.0, h_pole2=0.0, fint=0.0, fintx=None, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementbending magnet l - length of magnet in [m], angle - angle of bend in [rad], k1 - strength of quadrupole lens in [1/m^2], k2 - strength of sextupole lens in [1/m^3], tilt - tilt of lens in [rad], e1 - the angle of inclination of the entrance face [rad], e2 - the angle of inclination of the exit face [rad]. fint - fringe field integral fintx - allows (fintx > 0) to set fint at the element exit different from its entry value. gap - the magnet gap [m], NOTE in MAD and ELEGANT: HGAP = gap/2 h_pole1 - the curvature (1/r) of the entrance face h_pole1 - the curvature (1/r) of the exit face
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Edge(l=0.0, angle=0.0, k1=0.0, edge=0.0, tilt=0.0, dtilt=0.0, dx=0.0, dy=0.0, h_pole=0.0, gap=0.0, fint=0.0, pos=1, eid=None)¶ Bases:
ocelot.cpbd.elements.Bendbending magnet l - length of magnet in [m], angle - angle of bend in [rad], k1 - strength of quadrupole lens in [1/m^2], k2 - strength of sextupole lens in [1/m^3], tilt - tilt of lens in [rad], e1 - the angle of inclination of the entrance face [rad], e2 - the angle of inclination of the exit face [rad]. fint - fringe field integral fintx - allows (fintx > 0) to set fint at the element exit different from its entry value. gap - the magnet gap [m], NOTE in MAD and ELEGANT: HGAP = gap/2 h_pole1 - the curvature (1/r) of the entrance face h_pole1 - the curvature (1/r) of the exit face
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.SBend(l=0.0, angle=0.0, k1=0.0, k2=0.0, e1=0.0, e2=0.0, tilt=0.0, gap=0, h_pole1=0.0, h_pole2=0.0, fint=0.0, fintx=None, eid=None)¶ Bases:
ocelot.cpbd.elements.Bendsector bending magnet, l - length of magnet in [m], angle - angle of bend in [rad], k1 - strength of quadrupole lens in [1/m^2], k2 - strength of sextupole lens in [1/m^3], tilt - tilt of lens in [rad], e1 - the angle of inclination of the entrance face [rad], e2 - the angle of inclination of the exit face [rad]. fint - fringe field integral fintx - allows (fintx > 0) to set fint at the element exit different from its entry value. gap - the magnet gap [m], NOTE in MAD and ELEGANT: HGAP = gap/2 h_pole1 - the curvature (1/r) of the entrance face h_pole1 - the curvature (1/r) of the exit face
-
class
ocelot.cpbd.elements.RBend(l=0.0, angle=0.0, k1=0.0, k2=0.0, e1=None, e2=None, tilt=0.0, gap=0, h_pole1=0.0, h_pole2=0.0, fint=0.0, fintx=None, eid=None)¶ Bases:
ocelot.cpbd.elements.Bendrectangular bending magnet, l - length of magnet in [m], angle - angle of bend in [rad], k1 - strength of quadrupole lens in [1/m^2], k2 - strength of sextupole lens in [1/m^3], tilt - tilt of lens in [rad], e1 - the angle of inclination of the entrance face [rad], e2 - the angle of inclination of the exit face [rad]. fint - fringe field integral fintx - allows (fintx > 0) to set fint at the element exit different from its entry value. gap - the magnet gap [m], NOTE in MAD and ELEGANT: HGAP = gap/2 h_pole1 - the curvature (1/r) of the entrance face h_pole1 - the curvature (1/r) of the exit face
-
class
ocelot.cpbd.elements.XYQuadrupole(l=0.0, x_offs=0.0, y_offs=0.0, k1=0.0, tilt=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.SBendQuadrupole with offsets (linear element). The element is to test a transport feature and it is not tested.
l - length of magnet in [m], k1 - strength of quadrupole lens in [1/m^2], x_offs - offset in horizontal direction in [m] y_offs - offset in vertical direction in [m] tilt - tilt of lens in [rad],
-
class
ocelot.cpbd.elements.Hcor(l=0.0, angle=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.RBendhorizontal corrector, l - length of magnet in [m], angle - angle of bend in [rad],
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Vcor(l=0.0, angle=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.RBendhorizontal corrector, l - length of magnet in [m], angle - angle of bend in [rad],
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Undulator(lperiod=0.0, nperiods=0, Kx=0.0, Ky=0.0, field_file=None, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementUndulator lperiod - undulator period in [m];
nperiod - number of periods;
Kx - undulator paramenter for vertical field;
Ky - undulator parameter for horizantal field;
field_file - absolute path to magnetic field data;
mag_field - None by default, the magnetic field map function - (Bx, By, Bz) = f(x, y, z) eid - id of undulator.
-
validate(self)¶
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Cavity(l=0.0, v=0.0, phi=0.0, freq=0.0, vx_up=0, vy_up=0, vxx_up=0, vxy_up=0, vx_down=0, vy_down=0, vxx_down=0, vxy_down=0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementStanding wave RF cavity v - voltage [GV] freq - frequency [Hz] phi - phase in [deg] vx_{up/down}, vy_{up/down} - zero order kick of a {up/down}stream coupler vxx_{up/down}, vxy_{up/down} - first order kick a {up/down}stream coupler
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.CouplerKick(v=0.0, phi=0.0, freq=0.0, vx=0.0, vy=0.0, vxx=0.0, vxy=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementCoupler Kick element for Cavity v - voltage [GV] freq - frequency [Hz] phi - phase in [deg] vx, vy - zero order kick of a stream coupler vxx, vxy - first order kick a stream coupler
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.TWCavity(l=0.0, v=0.0, phi=0.0, freq=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementTraveling wave cavity v - voltage [GV] freq - frequency [Hz] phi - phase in [deg]
-
class
ocelot.cpbd.elements.TDCavity(l=0.0, freq=0.0, phi=0.0, v=0.0, tilt=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementTransverse deflecting cavity - by default kick in horizontal plane
l - length [m] v - voltage [GV/m] freq - frequency [Hz] phi - phase in [deg] tilt - tilt of cavity in [rad]
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Solenoid(l=0.0, k=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.ElementSolenoid l - length in m, k - strength B0/(2B*rho)
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Multipole(kn=0.0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementkn - list of strengths
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Matrix(l=0.0, delta_e=0, eid=None, **kwargs)¶ Bases:
ocelot.cpbd.elements.ElementMatrix element
l = 0 - m, length of the matrix element r = np.zeros((6, 6)) - R - elements, first order t = np.zeros((6, 6, 6)) - T - elements, second order delta_e = 0 - GeV, energy gain along the matrix element
-
__str__(self)¶ Return str(self).
-
-
class
ocelot.cpbd.elements.Pulse¶
-
class
ocelot.cpbd.elements.UnknownElement(l=0, kick=0, xsize=0, ysize=0, volt=0, lag=0, harmon=0, refer=0, vkick=0, hkick=0, eid=None)¶ Bases:
ocelot.cpbd.elements.Elementl - length of lens in [m]
-
class
ocelot.cpbd.elements.Sequence(l=0, refer=0)¶
-
ocelot.cpbd.elements.survey(lat, ang=0.0, x0=0, z0=0)¶
-
ocelot.cpbd.elements.a¶