Skip to content

Machine Coordinates and Patch Elements

David Sagan edited this page Sep 6, 2017 · 6 revisions

Coordinate Systems

There are three coordinate systems:

  • The global (also called floor) coordinate system is independent of the accelerator and is "attached" to the building the accelerator is in. Typically, the Y-axis is taken to be pointing vertically up and (X, Z) is the horizontal plane.
  • The global coordinate system is not convenient for describing where particles are as they move through the lattice. For this the local (also called laboratory, also called reference) curvilinear coordinate system is used to describe particle positions and also to describe the nominal position of the lattice elements.
  • Traveling on the s curve of the local coordinate system there is imagined to be a reference particle. Frequently, this reference particle is thought of as describing the center of a bunch of particles.
  • Elements can be shifted from their nominal position ("misalignments"). So to describe things like electric and magnetic fields or apertures (which depend upon the elements actual position), element body coordinates are used. The element body coordinates are the coordinates attached to the physical element. Without any "misalignments", the element coordinates correspond to the laboratory coordinates.

**Element Body Coordinate Types

For all elements, the element body coordinates has an entrance coordinate frame, and an exit coordinate frame.

There are three types of elements:

  • With straight elements (like drift and quadrupole, etc.) the entrance and exit coordinates are co-linear.
  • With bend (sbend and rbend) elements the entrance and exit coordinates lie on a circle. The default transformation from entrance to exit coordinates is a rotation about the -y axis.
  • With patch elements the exit coordinates can be arbitrarily positioned with respect to the entrance coordinates (see below).

Construction of the Local Coordinate System

The local coordinate system is constructed by taking the ordered list of lattice elements and connecting the exit frame of one element to the entrance frame of the next (just like LEGO blocks).

lat: line = (A, B, C)


Patch Element Parameters

There are six parameters that are used to set the placement of the exit frame relative to the entrance frame for a patch element:

x_offset, y_offset, z_offset
x_pitch, y_pitch
tilt

The transformation from entrance coordinates to exit coordinate is:

  1. Initially the exit coordinates coincide with the entrance coordinates.
  2. The origin of the exit coordinates is translated by (x_offset, y_offset, z_offset)
  3. The x_pitch and y_pitch rotations (in radians) are applied. The x_pitch rotation rotates the +z axis towards the +x axis (rotation around the +y axis). The y_pitch rotation rotates the +z axis towards the +y axis (rotation around the -x axis).
  4. The tilt rotation (in radians) rotates the exit coordinates around the exit coordinate's +z axis.

Notes:

  • For elements like quadrupoles, drifts, etc., the x_offset, y_offset, z_offset, x_pitch, y_pitch, and tilt parameters are used to misalign the element.
  • For elements like quadrupoles, drifts, etc., the misalignment parameters, unlike a patch, do not affect the reference orbit.

Laboratory Coordinates Relative to Global Coordinates

For any given position on the reference orbit, the local coordinate system is described with respect to the global coordinate system by 6 parameters:

  • (X, Y, Z) global position
  • θ azimuth angle in the (X, Z) plane.
  • φ elevation angle
  • ψ roll angle.

Notes:

  • The default is for the beginning of the lattice (s = 0) is to have the local (x, y, z) aligned with the global (X, Y, Z).
  • For a machine that lies in the horizontal plane, φ and ψ angles are zero

Example

beginning[beta_a] = 10.   ! m  a-mode beta function
beginning[beta_b] = 10.   ! m  b-mode beta function
beginning[e_tot] = 10e6   ! eV
parameter[geometry] = open  ! or closed

b: sbend, L = 0.5, g = 1    ! g = 1 / bending_radius
p: patch, z_offset = 1, x_pitch = pi/4
q: quadrupole, L = 0.6, k1 = 0.23

lat: line = (b, p, q)   ! List of lattice elements
use, lat                ! Line used to construct the lattice

Save to a file coords.bmad and run Tao:

> tao -lat coords.bmad
Tao> place r11 floor

By default, patch elements are not drawn.

Tao> show lat -floor
      Values at End of Element:
 Index  name      key                       s           X           Y           Z       Theta         Phi         Psi
     0  BEGINNING Beginning_Ele         0.000     0.00000     0.00000     0.00000     0.00000     0.00000     0.00000
     1  B         Sbend                 0.500    -0.12242     0.00000     0.47943    -0.50000     0.00000     0.00000
     2  P         Patch                 1.207    -0.60184     0.00000     1.35701     0.28540     0.00000     0.00000
     3  Q         Quadrupole            1.807    -0.43292     0.00000     1.93274     0.28540     0.00000     0.00000
     4  END       Marker                1.807    -0.43292     0.00000     1.93274     0.28540     0.00000     0.00000
 Index  name      key                       s           X           Y           Z       Theta         Phi         Psi
      Values at End of Element: