1 | ps = 0; eps = 0; phys_app = 0; |
---|
2 | |
---|
3 | if (!ps) set terminal x11; |
---|
4 | if (ps && !eps) \ |
---|
5 | set terminal postscript enhanced color solid lw 2 "Times-Roman" 20; |
---|
6 | if (ps && eps) \ |
---|
7 | set terminal postscript eps enhanced color solid lw 2 "Times-Roman" 20; |
---|
8 | |
---|
9 | set grid; |
---|
10 | |
---|
11 | set style line 1 lt 1 lw 1 lc rgb "blue"; |
---|
12 | set style line 2 lt 1 lw 1 lc rgb "green"; |
---|
13 | set style line 3 lt 1 lw 1 lc rgb "red"; |
---|
14 | |
---|
15 | # draw projection of mechanical aperture |
---|
16 | Ax = 17.5; Ay = 12.5; |
---|
17 | beta_max_y = 25.5; beta_inj_y = 3.1; |
---|
18 | |
---|
19 | if (phys_app) \ |
---|
20 | x_hat = Ax; y_hat = Ay*sqrt(beta_inj_y/beta_max_y); \ |
---|
21 | set arrow from -x_hat, 0.0 to -x_hat, y_hat nohead \ |
---|
22 | lt 1 lw 1 lc rgb "black"; \ |
---|
23 | set arrow from -x_hat, y_hat to x_hat, y_hat nohead \ |
---|
24 | lt 1 lw 1 lc rgb "black"; \ |
---|
25 | set arrow from x_hat, y_hat to x_hat, 0.0 nohead \ |
---|
26 | lt 1 lw 1 lc rgb "black"; |
---|
27 | |
---|
28 | if (ps) set output "dynap_err_1.ps" |
---|
29 | set title "Dynamic Aperture\n"; |
---|
30 | set xlabel "x [mm]"; set ylabel "y [mm]"; |
---|
31 | plot "DA_bare_0.0.out" using 1:2 title "bare" with linespoints ls 1, \ |
---|
32 | "DA_real_0.0.out" using 1:2 notitle with points ls 3; |
---|
33 | if (!ps) pause -1; |
---|
34 | |
---|
35 | unset arrow; |
---|
36 | |
---|
37 | if (ps) set output "dynap_err_2.ps" |
---|
38 | set title "Horizontal Momentum Aperture\n"; |
---|
39 | set xlabel "{/Symbol d} [%]"; set ylabel "x^ [mm]"; |
---|
40 | set yrange [0:]; |
---|
41 | plot "DA_bare.out" using 1:5 title "bare" with linespoints ls 2, \ |
---|
42 | "DA_real.out" using 1:11:13 title "w errors" with errorbars ls 1, \ |
---|
43 | "DA_real.out" using 1:11 notitle with lines ls 1; |
---|
44 | if (!ps) pause -1; |
---|
45 | |
---|
46 | if (ps) set output "dynap_err_3.ps" |
---|
47 | set title "Vertical Momentum Aperture\n"; |
---|
48 | set xlabel "{/Symbol d} [%]"; set ylabel "y^ [mm]"; |
---|
49 | set yrange [0:]; |
---|
50 | plot "DA_bare.out" using 1:6 title "bare" with linespoints ls 2, \ |
---|
51 | "DA_real.out" using 1:14:16 title "w errors" with errorbars ls 3, \ |
---|
52 | "DA_real.out" using 1:14 notitle with lines ls 3; |
---|
53 | if (!ps) pause -1; |
---|
54 | |
---|
55 | if (ps) set output "dynap_err_4.ps" |
---|
56 | set title "Horizontal Momentum Acceptance\n"; |
---|
57 | set xlabel "{/Symbol d} [%]"; set ylabel "A_x [mm{/Symbol \327}mrad]"; |
---|
58 | set yrange [0:]; |
---|
59 | plot "DA_bare.out" using 1:3 title "bare" with linespoints ls 2, \ |
---|
60 | "DA_real.out" using 1:5:7 title "w errors" with errorbars ls 1, \ |
---|
61 | "DA_real.out" using 1:5 notitle with lines ls 1; |
---|
62 | if (!ps) pause -1; |
---|
63 | |
---|
64 | |
---|
65 | if (ps) set output "dynap_err_5.ps" |
---|
66 | set title "Vertical Momentum Acceptance\n"; |
---|
67 | set xlabel "{/Symbol d} [%]"; set ylabel "A_y [mm{/Symbol \327}mrad]"; |
---|
68 | set yrange [0:]; |
---|
69 | plot "DA_bare.out" using 1:4 title "bare" with linespoints ls 2, \ |
---|
70 | "DA_real.out" using 1:8:10 title "w errors" with errorbars ls 3, \ |
---|
71 | "DA_real.out" using 1:8 notitle with lines ls 3; |
---|
72 | if (!ps) pause -1; |
---|