**BTS Lattice Definition for Matlab/AT**

September 1, 2006

Hiroshi Nishimura

Advanced Light Source

This note is for Greg Portmann to incorporate the ALS BTS lattice in
Matlab. I found that the way of defining the lattice in my Goemon#, a
new version of Goemon in C#, is very similar to that of Greg's in Matlab
for AT. Therefore, let me release it so that you can take the BTS
lattice easier. My notation is basically that of Tracy, which must be
very similar to that in AT/Matlab.

MARKER START = new MARKER(\"START\");

QUAD BR\_\_\_\_\_\_QD = new QUAD(\"BR\_\_\_\_\_\_QD\",
1.0E-001,-2.3256700E+0);

DRIFT L1 = new DRIFT(\"L1\", 2.0048900E-001);

BEND BR\_\_\_\_\_\_SEN = new BEND(\"BR\_\_\_\_\_\_SEN\", 6.0E-1, 2.0E+0,
0.0, 2.0, 0.0);

DRIFT L2 = new DRIFT(\"L2\", 2.0E-001);

BEND BR\_\_\_\_\_\_SEK = new BEND(\"BR\_\_\_\_\_\_SEK\", 9.0E-1, 1.0E+1,
5.0, 5.0, 0.0);

DRIFT L3 = new DRIFT(\"L3\", 7.9898900E-001);

HSTEER HCM1 = new HSTEER(\"HCM1\");

DRIFT L4 = new DRIFT(\"L4\", 6.4853500E-001);

BPMON BPM1 = new BPMON(\"BPM1\");

DRIFT L5 = new DRIFT(\"L5\", 3.8291700E-001);

VSTEER VCM1 = new VSTEER(\"VCM1\");

DRIFT L6 = new DRIFT(\"L6\", 3.0E-001);

MARKER TV1 = new MARKER(\"TV1\");

DRIFT L7 = new DRIFT(\"L7\", 2.0E-001);

QUAD BTS\_\_\_\_\_Q1 = new QUAD(\"BTS\_\_\_\_\_Q1\", 3.0E-001,
1.3921000E+0);

DRIFT L8 = new DRIFT(\"L8\", 2.0E-001);

HSTEER HCM2 = new HSTEER(\"HCM2\");

DRIFT L9 = new DRIFT(\"L9\", 2.5000000E-001);

VSTEER VCM2 = new VSTEER(\"VCM2\");

DRIFT L10 = new DRIFT(\"L10\", 3.4095580E+0);

MARKER TV2 = new MARKER(\"TV2\");

DRIFT L11 = new DRIFT(\"L11\", 2.0E-001);

QUAD BTS\_\_\_\_\_Q21 = new QUAD(\"BTS\_\_\_\_\_Q2.1\",
3.0E-001,-6.1290000E-001);

DRIFT L12 = new DRIFT(\"L12\", 3.0E-001);

QUAD BTS\_\_\_\_\_Q22 = new QUAD(\"BTS\_\_\_\_\_Q2.2\",
3.0E-001,-2.9980000E-001);

DRIFT L13 = new DRIFT(\"L13\", 1.6000000E-001);

HSTEER HCM3 = new HSTEER(\"HCM3\");

DRIFT L14 = new DRIFT(\"L14\", 1.7500000E-001);

VSTEER VCM3 = new VSTEER(\"VCM3\");

DRIFT L15 = new DRIFT(\"L15\", 4.5200000E-001);

BEND BTS\_\_\_\_\_B1 = new BEND(\"BTS\_\_\_\_\_B1\", 1.4E+0, 2.0E1,
1.0E1, 1.0E1, 0.0);

DRIFT L16 = new DRIFT(\"L16\", 1.6685430E+0);

BPMON BPM2 = new BPMON(\"BPM2\");

DRIFT L17 = new DRIFT(\"L17\", 3.5642900E-001);

QUAD BTS\_\_\_\_\_Q31 = new QUAD(\"BTS\_\_\_\_\_Q3.1\",
3.0E-001,-3.9970000E-001);

DRIFT L18 = new DRIFT(\"L18\", 3.0E-001);

QUAD BTS\_\_\_\_\_Q32 = new QUAD(\"BTS\_\_\_\_\_Q3.2\", 3.0E-001,
1.6189000E+0);

DRIFT L19 = new DRIFT(\"L19\", 1.5000000E-001);

HSTEER HCM4 = new HSTEER(\"HCM4\");

DRIFT L20 = new DRIFT(\"L20\", 1.7500000E-001);

VSTEER VCM4 = new VSTEER(\"VCM4\");

DRIFT L21 = new DRIFT(\"L21\", 2.0E-001);

MARKER TV3 = new MARKER(\"TV3\");

DRIFT L22 = new DRIFT(\"L22\", 1.1710280E+0);

BEND BTS\_\_\_\_\_B2 = new BEND(\"BTS\_\_\_\_\_B2\", 1.4, 2.0E1, 1.0E1,
1.0E1, 0.0);

DRIFT L23 = new DRIFT(\"L23\", 6.0719400E-001);

QUAD BTS\_\_\_\_\_Q4 = new QUAD(\"BTS\_\_\_\_\_Q4\", 3.0E-001,
2.2984000E+0);

DRIFT L24 = new DRIFT(\"L24\", 3.0359400E-001);

MARKER TV4 = new MARKER(\"TV4\");

DRIFT L25 = new DRIFT(\"L25\", 1.1918470E+0);

HSTEER HCM5 = new HSTEER(\"HCM5\");

DRIFT L26 = new DRIFT(\"L26\", 1.7500000E-001);

VSTEER VCM5 = new VSTEER(\"VCM5\");

DRIFT L27 = new DRIFT(\"L27\", 1.5000000E-001);

QUAD BTS\_\_\_\_\_Q51 = new QUAD(\"BTS\_\_\_\_\_Q5.1\",
3.0E-001,-2.9246000E+0);

DRIFT L28 = new DRIFT(\"L28\", 3.0E-001);

QUAD BTS\_\_\_\_\_Q52 = new QUAD(\"BTS\_\_\_\_\_Q5.2\", 3.0E-001,
2.7048000E+0);

DRIFT L29 = new DRIFT(\"L29\", 2.0426500E-001);

BPMON BPM3 = new BPMON(\"BPM3\");

DRIFT L30 = new DRIFT(\"L30\", 9.1510000E-001);

BEND BTS\_\_\_\_\_B3 = new BEND(\"BTS\_\_\_\_\_B3\", 1.4, 2.0E1, 1.0E1,
1.0E1, 0.0);

DRIFT L31 = new DRIFT(\"L31\", 5.7968200E-001);

HSTEER HCM6 = new HSTEER(\"HCM6\");

DRIFT L32 = new DRIFT(\"L32\", 1.7500000E-001);

VSTEER VCM6 = new VSTEER(\"VCM6\");

DRIFT L33 = new DRIFT(\"L33\", 2.3067730E+0);

BPMON BPM4 = new BPMON(\"BPM4\");

DRIFT L34 = new DRIFT(\"L34\", 3.5634900E-001);

QUAD BTS\_\_\_\_\_Q61 = new QUAD(\"BTS\_\_\_\_\_Q6.1\", 3.0E-001,
2.1585000E+0);

DRIFT L35 = new DRIFT(\"L35\", 3.0E-001);

QUAD BTS\_\_\_\_\_Q62 = new QUAD(\"BTS\_\_\_\_\_Q6.2\",
3.0E-001,-2.0719000E+0);

DRIFT L36 = new DRIFT(\"L36\", 1.4944600E-001);

HSTEER HCM7 = new HSTEER(\"HCM7\");

DRIFT L37 = new DRIFT(\"L37\", 1.7500000E-001);

VSTEER VCM7 = new VSTEER(\"VCM7\");

DRIFT L38 = new DRIFT(\"L38\", 8.7103000E-001);

BEND BTS\_\_\_\_\_B4 = new BEND(\"BTS\_\_\_\_\_B4\", 1.3989E+0, 1.84E1,
9.2, 9.2, 0.0);

DRIFT L39 = new DRIFT(\"L39\", 6.8926600E-001);

MARKER TV5 = new MARKER(\"TV5\");

DRIFT L40 = new DRIFT(\"L40\", 1.3422340E+0);

BPMON BPM5 = new BPMON(\"BPM5\");

DRIFT L41 = new DRIFT(\"L41\", 3.5634900E-001);

QUAD BTS\_\_\_\_\_Q7 = new QUAD(\"BTS\_\_\_\_\_Q7\", 3.0E-001,
1.7455000E+0);

DRIFT L42 = new DRIFT(\"L42\", 2.0E-001);

HSTEER HCM8 = new HSTEER(\"HCM8\");

DRIFT L43 = new DRIFT(\"L43\", 2.5000000E-001);

VSTEER VCM8 = new VSTEER(\"VCM8\");

DRIFT L44 = new DRIFT(\"L44\", 1.3856790E+0);

BPMON BPM6 = new BPMON(\"BPM6\");

DRIFT L45 = new DRIFT(\"L45\", 9.5542700E-001);

HSTEER HCM9 = new HSTEER(\"HCM9\");

DRIFT L46 = new DRIFT(\"L46\", 2.4727900E-001);

VSTEER VCM9 = new VSTEER(\"VCM9\");

DRIFT L47 = new DRIFT(\"L47\", 3.9287300E-001);

MARKER TV6 = new MARKER(\"TV6\");

DRIFT L48 = new DRIFT(\"L48\", 8.0712800E-001);

BEND SR\_\_\_\_\_\_SIK = new BEND(\"SR\_\_\_\_\_\_SIK\", 9.0E-1,
1.007E1, 1.007E1, 0.0, 0.0);

DRIFT L49 = new DRIFT(\"L49\", 2.7700000E-001);

BEND SR\_\_\_\_\_\_SIN = new BEND(\"SR\_\_\_\_\_\_SIN\", 6.0E-1, 2.0E+0,
2.0E+0, 0.0, 0.0);

DRIFT L50 = new DRIFT(\"L50\", 2.2743000E-001);

BEND SRBMP3 = new BEND(\"SRBMP3\", 7.0E-001, 0.0E+0, 0.0E+0, 0.0E+0,
0.0E0);

BEND SRBMP4 = new BEND(\"SRBMP4\", 7.0E-001, 0.0E+0, 0.0E+0, 0.0E+0,
0.0E0);

DRIFT L51 = new DRIFT(\"L51\", 3.0E-001);

MARKER CTR_SRQF = new MARKER(\"CTR_SRQF\");

Eline BTS
=START+BR\_\_\_\_\_\_QD+L1+BR\_\_\_\_\_\_SEN+L2+BR\_\_\_\_\_\_SEK+L3+

HCM1+L4+BPM1+L5+VCM1+L6+TV1+L7+BTS\_\_\_\_\_Q1+L8+HCM2+L9+VCM2+

L10+TV2+L11+BTS\_\_\_\_\_Q2.1+L12+BTS\_\_\_\_\_Q2.2+L13+HCM3+L14+

VCM3+L15+BTS\_\_\_\_\_B1+L16+BPM2+L17+BTS\_\_\_\_\_Q3.1+L18+BTS\_\_\_\_\_Q3.2+

L19+HCM4+L20+VCM4+L21+TV3+L22+BTS\_\_\_\_\_B2+L23+BTS\_\_\_\_\_Q4+

L24+TV4+L25+HCM5+L26+VCM5+L27+BTS\_\_\_\_\_Q5.1+L28+BTS\_\_\_\_\_Q5.2+

L29+BPM3+L30+BTS\_\_\_\_\_B3+L31+HCM6+L32+VCM6+L33+BPM4+L34+

BTS\_\_\_\_\_Q6.1+L35+BTS\_\_\_\_\_Q6.2+L36+HCM7+L37+VCM7+L38+BTS\_\_\_\_\_B4+

L39+TV5+L40+BPM5+L41+BTS\_\_\_\_\_Q7+L42+HCM8+L43+VCM8+L44+

BPM6+L45+HCM9+L46+VCM9+L47+TV6+L48+SR\_\_\_\_\_\_SIK+L49+SR\_\_\_\_\_\_SIN+

L50+SRBMP3+L50+SRBMP4+L51+CTR_SRQF;

This lattice will be made available as a file. Contact me if you need it
now.

BTS Length = 0.000000 meters

BTS Length = 0.000000 meters

BTS Length = 0.000000 meters

BTS Length = 0.200489 meters

BTS Length = 0.800489 meters

BTS Length = 1.000489 meters

BTS Length = 1.900489 meters

BTS Length = 2.699478 meters

BTS Length = 2.999478 meters

BTS Length = 3.648013 meters

BTS Length = 3.648013 meters

BTS Length = 4.030930 meters

BTS Length = 4.330930 meters

BTS Length = 4.630930 meters

BTS Length = 4.630930 meters

BTS Length = 4.830930 meters

BTS Length = 5.130930 meters

BTS Length = 5.330930 meters

BTS Length = 5.630930 meters

BTS Length = 5.880930 meters

BTS Length = 6.180930 meters

BTS Length = 9.590488 meters

BTS Length = 9.590488 meters

BTS Length = 9.790488 meters

BTS Length = 10.090488 meters

BTS Length = 10.390488 meters

BTS Length = 10.690488 meters

BTS Length = 10.850488 meters

BTS Length = 11.150488 meters

BTS Length = 11.325488 meters

BTS Length = 11.625488 meters

BTS Length = 12.077488 meters

BTS Length = 13.477488 meters

BTS Length = 15.146031 meters

BTS Length = 15.146031 meters

BTS Length = 15.502460 meters

BTS Length = 15.802460 meters

BTS Length = 16.102460 meters

BTS Length = 16.402460 meters

BTS Length = 16.552460 meters

BTS Length = 16.852460 meters

BTS Length = 17.027460 meters

BTS Length = 17.327460 meters

BTS Length = 17.527460 meters

BTS Length = 17.527460 meters

BTS Length = 18.698488 meters

BTS Length = 20.098488 meters

BTS Length = 20.705682 meters

BTS Length = 21.005682 meters

BTS Length = 21.309276 meters

BTS Length = 21.309276 meters

BTS Length = 22.501123 meters

BTS Length = 22.801123 meters

BTS Length = 22.976123 meters

BTS Length = 23.276123 meters

BTS Length = 23.426123 meters

BTS Length = 23.726123 meters

BTS Length = 24.026123 meters

BTS Length = 24.326123 meters

BTS Length = 24.530388 meters

BTS Length = 24.530388 meters

BTS Length = 25.445488 meters

BTS Length = 26.845488 meters

BTS Length = 27.425170 meters

BTS Length = 27.725170 meters

BTS Length = 27.900170 meters

BTS Length = 28.200170 meters

BTS Length = 30.506943 meters

BTS Length = 30.506943 meters

BTS Length = 30.863292 meters

BTS Length = 31.163292 meters

BTS Length = 31.463292 meters

BTS Length = 31.763292 meters

BTS Length = 31.912738 meters

BTS Length = 32.212738 meters

BTS Length = 32.387738 meters

BTS Length = 32.687738 meters

BTS Length = 33.558768 meters

BTS Length = 34.957668 meters

BTS Length = 35.646934 meters

BTS Length = 35.646934 meters

BTS Length = 36.989168 meters

BTS Length = 36.989168 meters

BTS Length = 37.345517 meters

BTS Length = 37.645517 meters

BTS Length = 37.845517 meters

BTS Length = 38.145517 meters

BTS Length = 38.395517 meters

BTS Length = 38.695517 meters

BTS Length = 40.081196 meters

BTS Length = 40.081196 meters

BTS Length = 41.036623 meters

BTS Length = 41.336623 meters

BTS Length = 41.583902 meters

BTS Length = 41.883902 meters

BTS Length = 42.276775 meters

BTS Length = 42.276775 meters

BTS Length = 43.083903 meters

BTS Length = 43.983903 meters

BTS Length = 44.260903 meters

BTS Length = 44.860903 meters

BTS Length = 45.088333 meters

BTS Length = 45.788333 meters

BTS Length = 46.015763 meters

BTS Length = 46.715763 meters

BTS Length = 47.015763 meters

BTS Length = 47.015763 meters