Skip to content

Model Design and Base Lattices in Tao

David Sagan edited this page Sep 7, 2017 · 2 revisions

Tao instantiates three lattices:

  • Design Lattice -- The design lattice corresponds to the lattice read in from the lattice description file(s). Parameters of this lattice are never varied.
  • Model Lattice -- Initially, when Tao is started, Model = Design. Essentially all commands to vary lattice parameters vary parameters of this lattice.
  • Base Lattice -- A reference lattice used so that changes in the Model lattice may more easily be viewed.

Setup

beginning[beta_a] = 10.   ! m
beginning[beta_b] = 10.   ! m
beginning[e_tot] = 10e6   ! eV
parameter[geometry] = open  ! or closed

d: drift, L = 0.5
b: sbend, L = 0.5, g = 1, e1 = 0.01, e2 = 0.02, g_err = 0.001
q: quadrupole, L = 0.6, k1 = 0.23

lat: line = (d, b, q)
use, lat

Using the above as content, create a file 'mdb.bmad' and run tao on the command line:

 > tao -lat mdb.bmad

Changing Model Parameters

Now issue the following commands:

Tao> place r23 orbit
Tao> place r13 orbit
Tao> set plot r33 component = design
Tao> set plot r13 component = model - design
Tao> scale

The result is:

Since the Model parameters are the same as the Design parameters, the plot of the orbit of Model - Design is zero.

Now change some parameters in the Model

Tao> change element b vkick  -0.0005   ! **change** command changes a real parameter by a given delta
Tao> set element q hkick = 0.001       ! **set** command can be used with integer or logical parameters.
Tao> scale

And the result is:


Using the Base Lattice

Use the Base lattice to view changes when the reference lattice is not the Design lattice.

Tao> set lattice base = model  ! Set the Base lattice to be equal to the Model lattice.
Tao> set plot r33 component = model - base
Tao> set ele q vkick = 5e-4
Tao> scale