Example #1
0
import pylatt as latt

# === Element definition:
b1g3c01a = latt.bend("b1g3c01a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g3c30a = latt.bend("b1g3c30a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g5c01b = latt.bend("b1g5c01b",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g5c30b = latt.bend("b1g5c30b",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
Example #2
0
S02A_Q7 = latt.quad('S02A_Q7', L = 0.4380272654291702, K1 = 3.561735626)
S02A_Q8 = latt.quad('S02A_Q8', L = 0.5919580159179285, K1 = 4.086463203)
S02B_Q8 = latt.quad('S02B_Q8', L = 0.5919580159179285, K1 = 4.086463203)
S02B_Q7 = latt.quad('S02B_Q7', L = 0.4380272654291702, K1 = 3.561735626)
S02B_Q6 = latt.quad('S02B_Q6', L = 0.2380672529059152, K1 = -2.443794135)
S02B_S3Q = latt.quad('S02B_S3Q', L = 0.05, K1 = 0)
S02B_FS2 = latt.quad('S02B_FS2', L = 0.05, K1 = 0)
S02B_Q5 = latt.quad('S02B_Q5', L = 0.2380672529059152, K1 = 1.692792848)
S02B_S2Q = latt.quad('S02B_S2Q', L = 0.05, K1 = 0)
S02B_Q4 = latt.quad('S02B_Q4', L = 0.2380672529059152, K1 = 3.202540564)
S02B_S1Q = latt.quad('S02B_S1Q', L = 0.05, K1 = 0)
S02B_Q3 = latt.quad('S02B_Q3', L = 0.2380672529059152, K1 = -2.25581057)
S02B_Q2 = latt.quad('S02B_Q2', L = 0.2380672529059152, K1 = -2.786797084)
S02B_FS1 = latt.quad('S02B_FS1', L = 0.05, K1 = 0)
S02B_Q1 = latt.quad('S02B_Q1', L = 0.2380672529059152, K1 = 3.600743379)
S01A_M1_1 = latt.bend('S01A_M1_1',L=0.1530952392902245,angle=0.004865679953432768,e1=0,e2=0,K1=0,K2=0)
S01A_M1_2 = latt.bend('S01A_M1_2',L=0.2030627998950036,angle=0.004158900729536947,e1=0,e2=0,K1=0,K2=0)
S01A_M1_3 = latt.bend('S01A_M1_3',L=0.612026355013666,angle=0.007383515118898546,e1=0,e2=0,K1=0,K2=0)
S01A_M1_4 = latt.bend('S01A_M1_4',L=0.7440776566254219,angle=0.005481509444037826,e1=0,e2=0,K1=0,K2=0)
S01A_M1_5 = latt.bend('S01A_M1_5',L=0.3882170181275113,angle=0.002467438313081708,e1=0,e2=0,K1=0,K2=0)
S01A_M2_1 = latt.bend('S01A_M2_1',L=0.3858604697873582,angle=0.00221760763219635,e1=0,e2=0,K1=0,K2=0)
S01A_M2_2 = latt.bend('S01A_M2_2',L=0.3452817628306986,angle=0.002314877925997122,e1=0,e2=0,K1=0,K2=0)
S01A_M2_3 = latt.bend('S01A_M2_3',L=0.5572542137430611,angle=0.005985026687108127,e1=0,e2=0,K1=0,K2=0)
S01A_M2_4 = latt.bend('S01A_M2_4',L=0.3212231955922798,angle=0.004240111573206663,e1=0,e2=0,K1=0,K2=0)
S01A_M2_5 = latt.bend('S01A_M2_5',L=0.5075485931289772,angle=0.008060775454499651,e1=0,e2=0,K1=0,K2=0)
S01A_M3_1 = latt.bend('S01A_M3_1',L=0.3898980549659178,angle=0.01077344823264051,e1=0,e2=0,K1=-2.267027755,K2=0)
S01A_M3_2 = latt.bend('S01A_M3_2',L=0.3898980549659178,angle=0.01077344823264051,e1=0,e2=0,K1=-2.267027755,K2=0)
S01A_M4_1 = latt.bend('S01A_M4_1',L=0.3250011325443404,angle=0.009817477042468103,e1=0,e2=0,K1=-2.359140894,K2=0)
S01A_M4_2 = latt.bend('S01A_M4_2',L=0.3250011325443404,angle=0.009817477042468103,e1=0,e2=0,K1=-2.359140894,K2=0)
S01B_M3_1 = latt.bend('S01B_M3_1',L=0.3898980549659178,angle=0.01077344823264051,e1=0,e2=0,K1=-2.267027755,K2=0)
S01B_M3_2 = latt.bend('S01B_M3_2',L=0.3898980549659178,angle=0.01077344823264051,e1=0,e2=0,K1=-2.267027755,K2=0)
Example #3
0
# ---  ch +2/+2 with 9 knobs
import pylatt as latt

# === Element definition:
b1g3c01a = latt.bend("b1g3c01a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g3c02a = latt.bend("b1g3c02a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g3c04a = latt.bend("b1g3c04a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
                     K2=0.0)
b1g3c05a = latt.bend("b1g3c05a",
                     L=2.62,
                     angle=0.10471975512,
                     e1=0.05236,
                     e2=0.05236,
                     K1=0.0,
Example #4
0
QDE = latt.quad('QDE', L=0.30526555, K1=-1.956341478)
QFAE = latt.quad('QFAE', L=0.3533895, K1=1.39670881)
QDXAE = latt.quad('QDXAE', L=0.3533895, K1=-0.5327236987)
QFXAE = latt.quad('QFXAE', L=0.6105311, K1=1.483170144)
QDYAE = latt.quad('QDYAE', L=0.3533895, K1=-1.34242105)
QFYAE = latt.quad('QFYAE', L=0.5123803, K1=1.459183676)
QDZAE = latt.quad('QDZAE', L=0.3533895, K1=-1.049153851)
QFZAE = latt.quad('QFZAE', L=0.3533895, K1=1.844307786)
QFM3E = latt.quad('QFM3E', L=0.3533895, K1=1.963832428)
QDM3E = latt.quad('QDM3E', L=0.1634591, K1=-2.019449853)
QDM4E = latt.quad('QDM4E', L=0.1634591, K1=-1.474936034)
QFM4E = latt.quad('QFM4E', L=0.3533895, K1=1.839614707)
B34 = latt.bend('B34',
                L=1.14329,
                angle=0.138599675893667,
                e1=0.069299837946834,
                e2=0.069299837946834,
                K1=-0.31537858,
                K2=0)
BEND = latt.bend('BEND',
                 L=1.5048,
                 angle=0.184799567858223,
                 e1=0.09239978392911199,
                 e2=0.09239978392911199,
                 K1=-0.31537858,
                 K2=0)
B1E = latt.bend('B1E', L=0.11, angle=0.002, e1=0.001, e2=0.001, K1=0, K2=0)
B2E = latt.bend('B2E',
                L=0.11,
                angle=0.0048325,
                e1=0.00241625,