#!/usr/bin/gnuplot # plots the tx curves, with and without atom, for 7ns set border linewidth 1.5 set encoding utf8 ## input file ## infile_long_dec='2015_10_30-11_03_non_reversed_combined_histo_tx_1ns' t_offset=908.5 #### variables #### timebin=1e-9 bg_atom = 6.6504587e-06 # avg bg per bin for atom histogram, see python script: tx_7ns.py bg_no_atom = 6.7534357e-06 # avg bg per bin for no-atom histogram, see python script: tx_7ns.py decaying_data_integral=0.004919967575 # summed no-atom counts corrected for bg, see python script: tx_7ns.py ################# ########################## ## theory : # parameters: gamma0 = 1/26.2e-9 gammap = 1/7.08e-9 lambda = 0.032 #---- exp_rise(x) = x<0 ? exp(gammap/2*x) : 0 exp_decay(x) = x<0 ? 0: exp(-gammap/2*x) # solutions of diff eq for excited state population P_e(t) p_decay(x) = x<0 ? 0 : 4*lambda*gamma0*gammap / (gammap-gamma0)**2 * ( exp(-gamma0/2*x) - exp(-gammap/2*x) )**2 # difference in transmission diff_decay(x) = 2*sqrt( lambda*gamma0*gammap*p_decay(x))*exp_decay(x) - lambda*gamma0*p_decay(x) #------------------ unset label # remove any previous labels set terminal postscript eps color enhanced solid "Helvetica,22" size 12.6cm, 8cm set output "tx_w_wo_atom_7ns.eps" set border linewidth 1.5 set border 3 set samples 5000 set multiplot set nobar unset key set origin 0.0,0 set size 0.5,1 set key at graph 1.15,1 spacing 1.3 samplen 0 set key #set tmargin 1.5 set lmargin 7 set bmargin 4 #set rmargin 0 set xtics nomirror set logscale y 10 set ytics scale 2.5,1 nomirror format " " set ytics add ("10^{-3}" 1e-3,"10^{-4}" 1e-4, "10^{-5}" 1e-5) set xr [-10:52] set yr [0.4e-5:10e-4] set xtics 20 set xlabel "Time from heralding event, {/Times-Italic t_i} (ns)" offset graph 0.55,0 # set ylabel "Coincidence probability" unset bars plot infile_long_dec u (($2-t_offset)):($9):($10) with yerrorbars pt 7 ps 0.9 lc rgb "black" t "{/Times-Italic G_{f,0}} , no atom",\ infile_long_dec u (($2-t_offset)):($5):($6) with yerrorbars pt 13 ps 0.9 lc rgb "red" t "{/Times-Italic G_{f}} , with atom" #------------- set origin 0.5,0 set size 0.5,1 unset key set border 3 unset xlabel set nologscale y set ylabel "{/Times-Italic G_{f,0}} -{/Times-Italic G_{f}} (x10^{-6})" set yr [-2:11] set ytics 4 #set ytics scale 2.5,1 nomirror format " " set ytics add ("0" 0,"4" 4, "8" 8) plot infile_long_dec u ($2-t_offset):(( 1e6*(($9-bg_atom)-($5-bg_no_atom)))):(1e6*sqrt($10**2+$6**2)) w yerrorbars pt 6 lc rgb "red" lw 2 unset multiplot # exit multiplot mode (prompt changes back to 'gnuplot') unset output pause -1