#filename = 'FiberHarp.dat' generated by analyze_harp from harp_plane_hit.dat and by analyze_fibers_harp from fiber_hits.dat #time_bin = 10.e-9 min(a,b)=(a< b) ? a:b do for [harp=1:4] { set terminal pdf enhanced fontscale 0.5 size 6.0in, 4.0in harp_num=sprintf("%i",harp) tbin=sprintf("%i",time_bin*1.e9) output_file = 'FiberHarp'.harp_num.'-'.tbin.'-hits.pdf' set out output_file print 'Harp '.harp_num #set label 'Harp '.harp_num at graph 0.1, 1.04 title = 'harp '.harp_num set multiplot #title noenhance num_fft_bins = 16384 set label 'plotting_scripts/harp_plot.gnu' at graph 1.02,0.02 rotate left font 'Verdana,6' noenhance set size 0.5,0.5 set origin 0.,0. set xlabel 'Time [micro-s]' set ylabel 'dN/dt' set xrange [0:100] set xtics 0,10 time_scale = time_bin/1.e-6 set timestamp font 'Verdana,6' plot filename u ($2*time_scale):($1 == harp ? $5:1/0) w l t title.' FR' unset timestamp unset label set origin 0.5,0. unset ylabel set xlabel'frequency [MHz]' freq_max = 1./time_scale/2 set xrange [0.1:min(freq_max,50)] set xtics 0.,5 plot filename u ($6):($1 == harp ? ($7**2+$8**2)**.5 :1/0) w l t title.' FR fft' set origin 0., 0.5 set xrange [0.1:min(freq_max,10)] set xtics 0,1 plot filename u 6:($1 == harp ? ($7**2+$8**2)**.5 :1/0) w l t title.' FR fft' set xrange [5:21] set xtics 6,2 set origin 0.5,0.5 plot filename u 6:($1 == harp ? ($7**2+$8**2)**.5 :1/0) w l t title.' FR fft' unset multiplot unset terminal print 'write '.output_file }