set term pdf fontscale 0.75 size 6in,4in outfile = 'efield_pitch.pdf' set output outfile reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label '/plotting_scripts/efield_pitch.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set key right 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.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set key left set xlabel 'C_p(convolve)-Cp(truth) [ppb]' set ylabel 'C_e(convolve)-Ce(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*(($7*z($10)-y($12)+$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.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance unset ylabel width=2 hist(x,width)=width*floor(x/width)+width/2.0 set boxwidth width*0.9 set style fill solid 0.5 #fillstyle set yrange [0:] set xlabel 'Pitch correction error [ppb]' #3 plot 'all_efield_pitch.dat' u (hist((1000*(-$4+$2)),width)):(1.0) smooth freq w boxes lc rgb"green" t 'linear-truth',\ '' u (hist((1000*(($6*$10**2/qyp**2)+$2)),width)):(1.0) smooth freq w imp lw 14 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.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set style fill solid 0.5 #fillstyle set yrange [0:] width=4 set boxwidth width*0.9 set xlabel 'Efield correction error [ppb]' plot 'all_efield_pitch.dat' u (hist((1000*(-$5+$3)),width)):(1.0) smooth freq w boxes lc rgb"green" t 'linear-truth',\ 'all_efield_pitch.dat' u (hist(1000*($7*z($10)-y($12)+$3),width)):(1.0) smooth freq w imp lw 14 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.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 [-540:-340] set xtics -540,20 set xlabel 'E-field correction (truth) [ppb]' stats 'all_efield_pitch.dat' u 3 records=sprintf("%4i",STATS_records) efield_rms = sprintf("%3.1f",STATS_stddev*1000) 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' 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.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 xlabel 'E-field correction error (convolve-truth) [ppb]' plot 'all_efield_pitch.dat' u (hist(($7*z($10)-y($12)+$3)*1000,width)):(1.0) smooth freq w boxes lc rgb"green" not print 'pause 66' pause -1 reset set timestamp offset graph 1.04,0.7 rotate font 'Verdana,6' set label 'efield_pitch.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set xlabel 'Efield Correction (truth) [ppb]' set ylabel 'Efield Correction (convolve) [ppb]' plot 'all_efield_pitch.dat' u (-1000*$3):(1000*($7*z($10)-y($12))) pt 5 not 'efield' reset set yrange [0:] set xrange [-190:-160] width=1 set style fill solid 0.5 #fillstyle set boxwidth width*0.9 set xlabel 'Pitch correction (truth) [ppb]' #THIS IS WRONG plot 'all_efield_pitch.dat' u (hist((1000*($6)),width)):(1.0) smooth freq w boxes lc rgb"blue" not 'truth' plot 'all_efield_pitch.dat' u (hist((1000*(-$2)),width)):(1.0) smooth freq w boxes lc rgb"blue" not 'truth' print outfile