# script to display both RF pulse and optical pulse in one graphic # set terminal png medium size 800,600 font "Helvetica,12" # set output "combined.png" set terminal postscript eps size 8cm,6cm font "Helvetica,14" set output "RF_pin_combined_rev1.eps" # define some styles set style line 13 lt 1 lc rgb "blue" set style line 14 lt 1 lc rgb "red" set style line 15 lt 1 lc rgb "black" # define data file separator set datafile separator "," # have both plots in same image set multiplot # RF signal is the top plot set size 1,0.5 set origin 0,0.5 # No x text on this plot set format x "" set ylabel 'EOM amplitude (V)' offset 1,0 set yrange [-0.5:0.5] set ytics 0.2 set grid xtics ytics # Do the actual plot plot [-80:20] [:] 'raw_data_files/C2optspect20110120-100001.txt' \ using ($1*1E9-5500):2 '%lf,%lf' w lines ls 13 notitle # Second plot, for optical signal set size 1,0.55 set origin 0,0 # text on this plot; x is standard set format x "% g" set xlabel 'time (ns)' set ylabel 'Photodiode response' offset 1,0 set yrange [-0.2:2.0] set xrange [-80:20] set ytics 0.5 # fit function for exponential pulse a0=1.1 ; x0=17 fifu(x)=a0*exp(x/x0) fit [-80:0] fifu(x) 'raw_data_files/C3optspect20110120-100000.txt' every ::6 using ($1*1E9-5516):($2*1000-0.4) via a0, x0 set pointsize 0.2 # Do the actual plot plot 'raw_data_files/C3optspect20110120-100000.txt' \ using ($1*1E9-5516):($2*1000-0.4) '%lf,%lf' ls 14 notitle, \ fifu(x) ls 15 notitle