#!/usr/bin/gnuplot set terminal postscript eps color enhanced solid font "Helvetica,22" size 12.6cm,8cm set output "../saturation.eps" set border linewidth 1.5 set border 3 #f1 = '2016-07-05/sat_curve_2us/sat_curve_2016_07_05' #f1 = '2016-07-15/sat_2us_2015_07_15' f1 = '2016-07-22_sat_curve_4us' attenuation = 0.00493 # use 0.0073 for '2016-07-05/sat_curve_2us/sat_curve_2016_07_05' fibercoupling = 0.62 apdeff_blue = 0.56 # 0.52 opticalpath = 0.9 bg_red= 300*1e-6 bg_blue= 155*1e-6 gamma = 1/26.24e-9 h = 6.626e-34 c = 3e8 lambda = 780.24e-9 probetime = 4 conversion_countrate_to_pW = 1/(apdeff_blue*fibercoupling*attenuation*opticalpath*1e-6) * h*c/lambda *1e12 f(x)=a*x/(b+x) a=0.25 b=30 fit f(x) f1 u (($4-bg_blue)*conversion_countrate_to_pW):($2-bg_red):(sqrt($3)/$8/probetime)via b,a set ytics 0.1 nomirror format "%g" set xtics autofreq nomirror set logscale x set yrange [0:0.33] set xrange [0.61:250] unset title set xlabel 'incident probe power (pW)' set ylabel 'reflection counts (1/{/Symbol m}s)' unset grid unset key plot f1 u (($4-bg_blue)*conversion_countrate_to_pW):($2-bg_red):(sqrt($3)/$8/probetime) w yerr pt 7 ps 1.0 lc rgb "red" lw 3 , f(x) lw 3 lc rgb "red" unset output pause -1