1 | ps = 0; eps = 0; norm = 0; mom_aper = 1; delta = "2.5"; phys_app = 0; |
---|
2 | |
---|
3 | file1 = "dynap.out"; |
---|
4 | file2 = "dynap_dp".delta.".out"; |
---|
5 | file3 = "dynap_dp-".delta.".out"; |
---|
6 | |
---|
7 | if (!ps) set terminal x11; |
---|
8 | if (ps && !eps) \ |
---|
9 | set terminal postscript enhanced color solid lw 2 "Times-Roman" 20; |
---|
10 | if (ps && eps) \ |
---|
11 | set terminal postscript eps enhanced color solid lw 2 "Times-Roman" 20; |
---|
12 | |
---|
13 | set grid; |
---|
14 | |
---|
15 | set style line 1 lt 1 lw 1 lc rgb "blue"; |
---|
16 | set style line 2 lt 1 lw 1 lc rgb "green"; |
---|
17 | set style line 3 lt 1 lw 1 lc rgb "red"; |
---|
18 | |
---|
19 | # draw projection of mechanical aperture |
---|
20 | Ax = 17.5; Ay = 12.5; |
---|
21 | beta_max_y = 25.5; beta_inj_y = 3.1; |
---|
22 | |
---|
23 | if (phys_app) \ |
---|
24 | x_hat = Ax; y_hat = Ay*sqrt(beta_inj_y/beta_max_y); \ |
---|
25 | set arrow from -x_hat, 0.0 to -x_hat, y_hat nohead \ |
---|
26 | lt 1 lw 1 lc rgb "black"; \ |
---|
27 | set arrow from -x_hat, y_hat to x_hat, y_hat nohead \ |
---|
28 | lt 1 lw 1 lc rgb "black"; \ |
---|
29 | set arrow from x_hat, y_hat to x_hat, 0.0 nohead \ |
---|
30 | lt 1 lw 1 lc rgb "black"; |
---|
31 | |
---|
32 | if (ps) set output "dynap.ps"; |
---|
33 | |
---|
34 | if (!norm) \ |
---|
35 | set title "Dynamic Aperture (bare lattice, 2.5 DOF)"; \ |
---|
36 | set xlabel "x [mm]"; set ylabel "y [mm]"; |
---|
37 | if (norm) \ |
---|
38 | set title "Normalized Dynamic Aperture"; \ |
---|
39 | set xlabel "x^"; set ylabel "y^"; \ |
---|
40 | set xrange [-0.01:0.01]; set yrange[0.0:0.01]; |
---|
41 | # set xrange [-0.012:0.012]; set yrange[0.0:0.012]; |
---|
42 | |
---|
43 | if (!mom_aper) \ |
---|
44 | plot file1 using 1:2 title "{/Symbol d}=0" with linespoints ls 1; |
---|
45 | |
---|
46 | if (mom_aper) \ |
---|
47 | plot file1 using 1:2 title "{/Symbol d}=0.0%" with linespoints ls 1, \ |
---|
48 | file2 using 1:2 title "{/Symbol d}=".delta."%" with linespoints ls 2, \ |
---|
49 | file3 using 1:2 title "{/Symbol d}=-".delta."%" with linespoints ls 3; |
---|
50 | |
---|
51 | if (!ps) pause -1; |
---|