In the first mode the matching routine is initiated only with one
attribute specifying the sequence(s) the matching module will work on. In
this matching mode the periodicity of the optics functions is enforced
at the beginning and end of the selected range.
MATCH, SEQUENCE='name1', 'name2',..,nema-n';
In the second mode, called insertion matching, the matching routine
is initiated with two attributes: one specifying the sequence(s) the matching
module will work on and one specifying the initial conditions of the optic
functions for each sequence. In this case the initial values are assumed
as exact.
MATCH,sequence='name1','name2',..,'name-n',BETA0='beta01','beta02',..,'beta0n';or
MATCH,SEQUENCE='sequence-name', BETX=real,ALFX=real,MUX=real, BETY=real,ALFY=real,MUY=real, X=real,PX=real,Y=real,PY=real, DX=real,DY=real,DPX=real,DPY=real, DELTAP=real;> Examples:
CELL: SEQUENCE=(...) ; INSERT: SEQUENCE=(...) ; USE,PERIOD=cell; SAVEBETA,LABEL=bini,place=#e; TWISS,SEQUENCE=cell; USE,PERIOD=insert; MATCH,SEQUENCE=insert,BETA0=bini; CONSTRAINT,SEQUENCE=insert,RANGE=#e,MUX=9.345,MUY=9.876;This matches the sequence 'INSERT' with initial conditions to a new phase advance. The initial conditions are given by the periodic solution for the sequence CELL1.
USE,PERIOD=INSERT; MATCH,SEQUENCE=insert; CONSTRAINT,SEQUENCE=insert,RANGE=#e,MUX=9.345,MUY=9.876;This matches the beam line 'INSERT' with periodic boundary conditions to a new phase advance. The initial conditions can also be transmitted by a combination of a SAVEBETA command and explicit optic function specifications:
USE,CELL1; SAVEBETA,LABEL=bini,PLACE=#E; TWISS,SEQUENCE=CELL1; USE,PERIOD=LINE1; MATCH,SEQUENCE=LINE1,BETA0=bini,MUX=1.234,MUY=4.567;This example transmits all values of the SAVEBETA array 'bini' as initial values to the MATCH command and overrides the initial phase values by the given values. An additional CONSTRAINT may be imposed in other places, i.e. intermediate or end values of the optics functions at the transition point.
The matching module can act on more than one sequence simultaneously
by specifying more than one sequence after the MATCH command:
MATCH,SEQUENCE=LINE1,CELL1,BETA0=bini1,bini2;This example initiates the matching mode for the 'LINE1' and the 'CELL1' sequence. The Twiss module function of the two sequences are calculated with fixed initial conditions. The SAVEBETA array 'bini1' is used for calculating the optics functions of sequence 'LINE1' and the SAVEBETA array 'bini2' for calculating the optics functions of sequence 'CELL1'. Without the initial conditions the matching module will work in the CELL mode.
The "slow" attribute enforces the old and slow matching
procedure. Recently a number of parameter, like "RE56", have been
added to list of matchable parameters. Nevertheless, some parameters
might only be available when using the "slow" attribute.
Example 1: MATCH,RMATRIX,SEQUENCE='name',BETA0='beta-block-name'; CONSTRAINT,SEQUENCE=insert,RANGE=#e,RE11=-2.808058321,re22=2.748111197; VARY,NAME=kqf,STEP=1.0e-6; VARY,NAME=kqd,STEP=1.0e-6;This matches the sequence 'name' with initial conditions to new values for the matrix elements 'RE11' and 'RE22' by varying the strength of the main quadrupole circuits.
ENDMATCH;