#!/usr/bin/gnuplot set terminal postscript eps color enhanced solid font "Helvetica,22" size 12.6cm,8cm set output "../tx_refl.eps" #set output "tx_refl.eps" set border linewidth 1.5 set border 3 #f1 = '2016-07-05/tx_2016_07_05' #f1 = '2016-07-18/2016-07-18' #f1 = '2016-07-19/2016-07-19' f1 = '2016-07-21_tx' #f2='2016-07-05/sat_spec_2016_07_05' #f2='2016-07-17_sat_refl/2016-07-17_sat_refl' f2 = '2016-07-22_refl' set samples 5000 set multiplot set nobar unset key ##### tx diff plots #### set origin 0.5,0 set size 0.47,1 set tmargin 2 set lmargin 8 set bmargin 4 set rmargin 0 set xtics nomirror set ytics nomirror tx=0.15 gamma0 = 7 x0 = 53 lorentz(x) = 1 - tx / ( 4*( (x0-x) / (gamma0) )**2 + 1 ) #tx1=0.15 #gamma1 = 7 #x1 = 53 #dis=0.02 #lorentz_dis(x) = 1 - tx1 / ( 4*( (x1-x) / (gamma1) )**2 + 1 ) + dis * (x1-x) / ( 4*( (x1-x) / (gamma1) )**2 + 1 ) #lorentz_dis_beta(x) = (b**2 + (4*b**2*Lambda_p**2 - 4*b**2*Lambda_p*cos(phi))*gamma2**2/ ( 4*(x2-x)**2 + (gamma2)**2 ) - ( 8*b**2*Lambda_p*sin(phi)*(x-x2)*gamma2 ) / ( 4*(x2-x)**2 + gamma2**2 ) ) / b**2 lorentz_dis_beta(x) = (1 + (4*Lambda_p**2 - 4*Lambda_p*cos(phi))*gamma2**2/ ( 4*(x2-x)**2 + (gamma2)**2 ) - ( 8*Lambda_p*sin(phi)*(x-x2)*gamma2 ) / ( 4*(x2-x)**2 + gamma2**2 ) ) gamma2 = 6.9 x2 = 46.4 coupling = 0.7 b = sqrt(coupling) phi = 0.01 a = 0.07 Lambda_p = 0.044 fit lorentz(x) f1 u (($1-190000)/1000*2):3:4 via tx,x0,gamma0 fit lorentz_dis_beta(x) f1 u (($1-190000)/1000*2):3:4 via x2, gamma2, Lambda_p, phi #set title 'transmission extinction' set xlabel 'detuning (MHz)' set ylabel 'transmission (%)' set key right bottom set yrange [81:101] set xrange [30:66] set xtic 10 set ytics 4 unset key plot f1 u (($1-190000)/1000*2):($3*100):($4*100) w yerr ps 1 pt 7 lw 3, lorentz_dis_beta(x)*100 lc 1 lw 3 ################################# ####### set origin 0,0 set size 0.47,1 unset key set border 3 set xtics nomirror attenuation = 0.00493 # from 15/07/2016 6pm #before 15/07/2016 6pm: attenuation =0.0073 #0.012 fibercoupling = 0.62 apdeff_blue = 0.56 apdeff_red = 0.59 opticalpath = 0.9 col_attn = 1.0 #0.726 bg_red = 300*20e-6 # bg per atom bin bg_blue = 155*20e-6 # bg per atom bin gamma = 1/26.24e-9 h = 6.626e-34 c = 3e8 lambda = 780.24e-9 eff_correction = apdeff_red/(fibercoupling*attenuation*opticalpath*apdeff_blue ) a=0 refl=0.008 gamma0 = 6.8 x0 = 54 lorentz(x) = refl * gamma0**2 * 1 / ( 4*(x0-x)**2 + (gamma0)**2 ) f(x) = 0.006 * 7**2 * 1 / ( 4*(x0-x)**2 + (7)**2 ) fit lorentz(x) f2 u (($1-190000)/1000*2):(($3-bg_red*$8)/(($5-bg_blue*$8)*eff_correction)*100):(sqrt ( (sqrt($3)/($5*eff_correction) )**2 + (sqrt($5)*$3/($5**2*eff_correction))**2 )*100) via refl,x0,gamma0 set ytics 0.2 set yrange [0:0.7] set xlabel 'detuning (MHz)' set ylabel 'reflection (%)' unset grid plot f2 u (($1-190000)/1000*2):(($3-bg_red*$8)/(($5-bg_blue*$8)*eff_correction)*100):(sqrt ( (sqrt($3)/($5*eff_correction) )**2 + (sqrt($5)*$3/($5**2*eff_correction))**2 )*100) w yerr ps 1 pt 7 lw 2 not , lorentz(x) lc 1 lw 3 not unset multiplot unset output pause -1