#input is 'comment = "+-2mm,+-0.9kV"' set term pdf fontscale 0.75 size 6in,4in outfile = 'efield_pitch.pdf' set output outfile stats 'all_efield_pitch.dat' u 3 records=sprintf("%4i",STATS_records) efield_rms = sprintf("%3.1f",STATS_stddev*1000) title = records.' configurations - '.comment reset set title title set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label '/plotting_scripts/efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set key right set label 4 at graph 0.05,0.95 comment font ',10' set ylabel 'Pitch (convolve) [ppb]' set xlabel 'Pitch (truth) [ppb]' #1 plot 'all_efield_pitch.dat' u ($6*1000):(-$2*1000) pt 5 not 't=35us start' #u 3:5 pt 4 t 't=0 start', print 'pause 13' pause -1 reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set label 4 at graph 0.05,0.95 comment font ',10' set key left set xlabel 'C_p(convolve)-C_p(truth) [ppb]' set ylabel 'C_e(convolve)-C_e(truth) [ppb]' #2 qy=0.33 qy=0.3275 ar=-0.604 br=54.6 qyp=.335 n1n = qy**2*(1-qy**2) z(x) = x**2*(1-x**2)/n1n y(x) = ar + br*x**.5 #plot 'all_efield_pitch.dat' u (1000*($6+$2)):(1000*(($8*z($10)-y($12)+$3))) pt 4 not plot 'all_efield_pitch.dat' u (1000*($6+$2)):(1000*(($8+$3))) pt 4 not print 'pause 23' pause -1 reset set timestamp offset graph 1.07,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance unset ylabel reset width=1 hist(x,width)=width*floor(x/width)+width/2.0 set boxwidth width*0.9 set style fill solid 0.5 #fillstyle set label 4 at graph 0.05,0.95 comment font ',10' norotate set xlabel 'Pitch correction error [ppb]' #3 stats 'all_efield_pitch.dat' u (-$4+$2)*1000 rms_x=sprintf("%3.2f",STATS_stddev) ave_x=sprintf("%3.2f",STATS_mean) set label 3 '<{/Symbol D}C_p> = '.ave_x.' ppb' at graph 0.05,0.9 font 'Verdana,10' set label 2 '{/Symbol s}_{/Symbol D} = '.rms_x.' ppb' at graph 0.05,0.85 font 'Verdana,10' set yrange [0:] plot 'all_efield_pitch.dat' u (hist( (1000*(-$4+$2)), width) ):(1.0) smooth freq w boxes lc rgb"green" t 'linear-truth' reset stats 'all_efield_pitch.dat' u ($6+$2)*1000 rms_x=sprintf("%3.2f",STATS_stddev) ave_x=sprintf("%3.2f",STATS_mean) set label 3 '<{/Symbol D}C_p> = '.ave_x.' ppb' at graph 0.05,0.9 set label 2 '{/Symbol s}_{/Symbol D} = '.rms_x.' ppb' at graph 0.05,0.85 plot 'all_efield_pitch.dat' u ( hist(1000*($6+$2),width) ):(1.0) smooth freq w boxes lc rgb"blue" t 'convolve-truth' #*$10**2/qy**2 print 'pause 36' pause -1 reset set timestamp offset graph 1.07,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance #set xrange [-50:50] set style fill solid 0.5 #fillstyle set label 4 at graph 0.05,0.95 comment font ',10' set yrange [0:] width=.5 set boxwidth width*0.9 set xlabel 'Efield correction error [ppb]' reset stats 'all_efield_pitch.dat' u (-$5+$3)*1000 set style fill solid 0.5 #fillstyle set label 4 at graph 0.05,0.95 comment font ',10' set xlabel 'Efield correction error [ppb]' width=0.5 width=1 set boxwidth width*0.9 rms_x=sprintf("%3.2f",STATS_stddev) ave_x=sprintf("%3.2f",STATS_mean) set label 4 at graph 0.15,0.95 comment font ',10' set label 3 '<{/Symbol D}C_e> = '.ave_x.' ppb' at graph 0.15,0.9 font 'Verdana,10' set label 2 '{/Symbol s}_{/Symbol D} = '.rms_x.' ppb' at graph 0.15,0.85 #set xrange [-30:] set yrange [0:] plot 'all_efield_pitch.dat' u (hist((1000*(-$5+$3)),width)):(1.0) smooth freq w boxes lc rgb"green" t 'linear-truth' set label 4 at graph 0.05,0.95 comment font ',10' stats 'all_efield_pitch.dat' u ($8+$3)*1000 rms_x=sprintf("%3.2f",STATS_stddev) ave_x=sprintf("%3.2f",STATS_mean) set label 3 '<{/Symbol D}C_e> = '.ave_x.' ppb' at graph 0.05,0.9 font 'Verdana,10' set label 2 '{/Symbol s}_{/Symbol D} = '.rms_x.' ppb' at graph 0.05,0.85 plot 'all_efield_pitch.dat' u (hist(1000*($8+$3),width)):(1.0) smooth freq w boxes lc rgb"blue" t 'convolve-truth' print 'pause 46' pause -1 reset set timestamp offset graph 1.07,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set style fill solid 0.5 #fillstyle width=5 set boxwidth width*0.9 set yrange [0:] set xrange [-520:-380] #set xtics -540,20 set xlabel 'E-field correction (truth) [ppb]' print records #set label at graph 0.05,0.95 records.' configurations' font ',10' #set label at graph 0.05,0.9 'stddev = '.efield_rms.' ppb' font ',10' set label 4 at graph 0.05,0.95 comment font ',10' plot 'all_efield_pitch.dat' u (hist((-$3)*1000,width)):(1.0) smooth freq w boxes lc rgb"blue" not print 'pause 56' pause -1 reset set timestamp offset graph 1.07,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set style fill solid 0.5 #fillstyle width=5 set boxwidth width*0.9 set yrange [0:] #set xrange [-60:60] set xlabel 'E-field correction error (convolve-truth) [ppb]' set label 4 at graph 0.05,0.95 comment font ',10' plot 'all_efield_pitch.dat' u (hist(($8+$3)*1000,width)):(1.0) smooth freq w boxes lc rgb"green" t 'convolve 8' plot 'all_efield_pitch.dat' u (hist(($7+$3)*1000,width)):(1.0) smooth freq w boxes lc rgb"green" t 'convolve 7' print 'pause 66' pause -1 reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set label at graph 0.05,0.95 comment font ',10' set xlabel 'Efield Correction (truth) [ppb]' set ylabel 'Efield Correction (convolve) [ppb]' plot 'all_efield_pitch.dat' u (-1000*$3):(1000*($8)) pt 5 not 'efield' reset #set xrange [-200:-155] width=1 set style fill solid 0.5 #fillstyle set label at graph 0.05,0.95 comment font ',10' set boxwidth width*0.9 set xlabel 'Pitch correction (truth) [ppb]' stats 'all_efield_pitch.dat' u (-$2)*1000 rms_x=sprintf("%3.2f",STATS_stddev) ave_x=sprintf("%3.2f",STATS_mean) set label 3 '<{/Symbol D}C_p> = '.ave_x.' ppb' at graph 0.05,0.9 font 'Verdana,10' set label 2 '{/Symbol s}_{/Symbol D} = '.rms_x.' ppb' at graph 0.05,0.85 set yrange [0:] plot 'all_efield_pitch.dat' u (hist((1000*(-$2)),width)):(1.0) smooth freq w boxes lc rgb"blue" not 'truth' reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance #set xrange [0.106:0.1105] #set yrange [0.106:0.1105] set xtics font ',10' set ytics font ',10' set label at graph 0.05,0.95 comment font ',10' set xlabel 'effective index -x' set ylabel 'effective index - y' plot 'all_efield_pitch.dat' u 17:16 w p pt 4 not reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set label at graph 0.05,0.95 comment font ',10' set xtics font ',10' set ytics font ',10' set xlabel 'Q_x' set ylabel 'Q_y' plot 'all_efield_pitch.dat' u (1-$15):14 w p pt 4 not reset set timestamp offset graph 1.09,0.7 rotate font 'Verdana,6' set label 'efield_pitch_20190629.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set label at graph 0.05,0.95 comment font ',10' width=0.1 set style fill solid 0.5 #fillstyle set label at graph 0.05,0.95 comment font ',10' set boxwidth width*0.9 set xlabel 'y [mm]' plot 'all_efield_pitch.dat' u (hist((1000*($19)),width)):(1.0) smooth freq w boxes lc rgb"blue" not 'truth' reset #set yrange [0:] #set xrange [-200:-155] width=0.5 set style fill solid 0.5 #fillstyle set label at graph 0.05,0.95 comment font ',10' set boxwidth width*0.9 set xlabel 'Lifetime [{/Symbol m}s]' plot 'all_efield_pitch.dat' u (hist((1000000*($18)),width)):(1.0) smooth freq w boxes lc rgb"blue" not 'truth' print outfile