set term eps color font "arial,10" enhanced size 12.9cm,14cm set output "g2_compare_truncated_2.eps" set encoding utf8 # raw data mercury_data="g2_mercury_raw.dat" RGG_data="g2_RGG_raw_truncated.dat" # mercury_fit="g2_mercury_fitted.dat" # RGG_fit="g2_RGG_fitted_truncated.dat" symbols_color = "#008000" # gaussian(time,c,A,tau_c) = c + A * exp(-(time/tau_c)**2) set multiplot # time_offset = 160 #bin number # bin_size = 2 #ns # Mercury tau_c= 0.41013377# +/- 0.03423110 (8.35%) (init = 0.3) c= 13196.16 #(fixed) A= 2309.11674# +/- 142.642957 (6.18%) (init = 2106.84) mercury_normalisation=7.577962064180994e-05 g2_exp(x) = c + A * exp(-abs(2*x/tau_c)) set samples 1000 mercury_lower_yrange = 0.98 mercury_higher_yrange = 1.20 mercury_lower_y2range = mercury_lower_yrange/mercury_normalisation mercury_higher_y2range = mercury_higher_yrange/mercury_normalisation set size 1,0.5 set origin 0,0.5 #set title "30.0 mA" set xrange [-2:2] set yrange [mercury_lower_yrange:mercury_higher_yrange] set ytics nomirror #set style histogram clustered set bars large set label 1 "(a) Hg lamp" at graph 0, 1.05 set ylabel "g^{(2)}({/Symbol t})" set xlabel "time difference {/Symbol t} (ns)" set ytics 1.0,0.1,1.2 format "%.2f" set xtics -2,1,2 format "%.1f" set y2tics nomirror 13000,1000,15000 format "%.0f" set y2label "coincidences" set y2range [mercury_lower_y2range:mercury_higher_y2range] # set label 1 "30.0mA" at -285,0.55 # plot mercury_data using 1:3:(sqrt($2)/$2*$3) with yerrorbars linestyle 1 ps 0 linetype rgb symbols_color notitle, mercury_fit using 1:3 smooth with lines linetype rgb "#000000" notitle plot mercury_data using 1:3:(sqrt($2)/$2*$3) with yerrorbars linestyle 1 ps 0 lw 2 linetype rgb symbols_color notitle, g2_exp(x)*mercury_normalisation with lines lw 2 linetype rgb "#000000" notitle # RGG tau_c_2= 164.683048 #+/- 1.92348684 (1.17%) (init = 150) # tau_0= 0.19277236 +/- 1.39295275 (722.59%) (init = 9) c_2= 12998.2 #(fixed) A_2= 11298.4858 #+/- 128.866152 (1.14%) (init = 11713.8) RGG_normalisation=7.693373732507077e-05 gaussian_2(x) = c_2 + A_2 * exp(-(x*1000/tau_c_2)**2) set samples 1000 RGG_lower_yrange = 0.9 RGG_higher_yrange = 2.1 RGG_lower_y2range = RGG_lower_yrange/RGG_normalisation RGG_higher_y2range = RGG_higher_yrange/RGG_normalisation unset label 1 set size 1,0.5 set origin 0,0 #set title "38.4 mA" set yrange [RGG_lower_yrange:RGG_higher_yrange] set label 2 "(b) RGG" at graph 0, 1.05 set xrange [-1:1] set ylabel "g^{(2)}({/Symbol t})" set xlabel "time difference {/Symbol t} ({/Symbol m}s)" set ytics 1.0,0.5,2 format "%.2f" set xtics -1,0.5,1 format "%.1f" set y2tics nomirror 10000,5000,25000 format "%.0f" set y2label "coincidences" set y2range [RGG_lower_y2range:RGG_higher_y2range] # set label 1 "38.4mA" at -285,0.55 plot RGG_data using ($1/1000):3:(sqrt($2)/$2*$3) with yerrorbars linestyle 1 pointsize 0 lw 2 linetype rgb "#FF0000" notitle,gaussian_2(x)*RGG_normalisation with lines lw 2 linetype rgb "#000000" notitle unset multiplot