#!/usr/bin/gnuplot f1 = 'tmp' #f2 = 'sat_curve_bg_2us/tmp' #set term pdf #set term pngcairo size 800, 600 #set output 'sat.png' attenuation = 0.00493 # from 15/07/2016 6pm #before 15/07/2016 6pm: attenuation =0.0073 #0.012 fibercoupling = 0.62 apdeff = 0.52 opticalpath = 0.9 bg_red= 300*1e-6 gamma = 1/26.24e-9 h = 6.626e-34 c = 3e8 lambda = 780.24e-9 probetime = 2 conversion_countrate_to_pW = 1/(apdeff*fibercoupling*attenuation*opticalpath*1e-6) * 6.626e-34*3e8/780.24e-9 *1e12 f(x)=a*x/(b+x) a=0.25 b=30 fit f(x) f1 u ($4*conversion_countrate_to_pW):($2-bg_red):(sqrt($3)/$8/probetime)via b,a set label 1 sprintf("Psat = %.1f pW\n", b) at graph 0.5,0.4 set label 2 sprintf("saturation count rate = %.3g cts/us\n", a) at graph 0.5,0.3 coupling = gamma / 8 * h*c/lambda / (1e-12*b) set label 3 sprintf("spatial overlap = %.3f ('tx~%.3f') \n", coupling, coupling*4*100) at graph 0.5,0.2 det_eff = a*1e6 / ( gamma/2 ) set label 4 sprintf("total detection eff = %.4f \n", det_eff) at graph 0.5,0.1 #set yrange [0:1.01] #set xrange [216:228] set title "saturation excitation" set xlabel 'power (pW)' set ylabel 'reflection counts (/us)' set grid set key top set key left plot f1 u ($4*conversion_countrate_to_pW):($2-bg_red):(sqrt($3)/$8/probetime) w yerr lt 7 lc 1 not , f(x) lc 1 not unset output pause -1