# type the following command in gnuplot, in the directory that contains the .gnu and .txt datafile, as below: # load "PSF.gnu" # use this setting for .eps, common choice for use in LaTeX set terminal postscript eps color enhanced font "Helvetica,16pt" size 8.6cm,6cm # use this for .png, everyday use easier to open #set terminal pngcairo enhanced font "Helvetica,8pt" size 1920,1080 # common formatting settings set format x "%2.0f" set format y "%2.1f" set tics scale 1 set tics nomirror set xrange [-300:300] set xtics 100 set mxtics 2 set yrange [-0.15:1.05] set ytics 0.2 set mytics 2 set border linewidth 2 set xlabel "Off-axis angle (milliarcseconds)" set ylabel "Amplitude" # PSF of star 6mas, planet 10% obstruction, combined, using 1-m aperture diameter set output 'before.eps' set arrow 1 from 0,-0.15 to 0,1.05 lw 1 lc rgb 'black' nohead set arrow 2 from -3,-0.15 to -3,1.05 lw 2 lc rgb 'blue' dt 3 nohead plot 'PSF.txt' using 1:2 w l lc rgb "black" lw 2 notitle, 'PSF.txt' using 1:(-1*$3) w l lc rgb "blue" lw 2 notitle, 'PSF.txt' using 1:4 w l lc rgb "red" lw 2 notitle unset arrow 1 unset arrow 2 # 50% of PSF combined, 50% inversion, dark port output, compare areas under the curve for signal to noise ratio gain set output 'after.eps' set multiplot set yrange [-0.05:0.5] set ytics 0.1 plot 'PSF.txt' using 1:(0.5*$4) w l lc rgb "black" lw 2 notitle, 'PSF.txt' using 1:(0.5*$5) w l lc rgb "blue" lw 2 dt 2 notitle, 'PSF.txt' using 1:6 w l lc rgb "red" lw 2 notitle set origin 0.11, 0.47 set size 0.38, 0.35 set xr [-12:12] set yr [0.44:0.451] set xtics 10 set ytics 0.01 set ticscale 1 set format y "%2.2f" unset xlabel unset ylabel set arrow 3 from -12,0.451 to 23.5,0.4575 lw 2 lc rgb 'black' dt 2 nohead set arrow 4 from 23.5,0.4575 to 28,0.4575 lw 2 lc rgb 'black' dt 2 nohead set arrow 5 from 28,0.4575 to 28,0.4545 lw 2 lc rgb 'black' dt 2 nohead set arrow 6 from 28,0.4545 to 23.5,0.4545 lw 2 lc rgb 'black' dt 2 nohead set arrow 7 from 23.5,0.4545 to 23.5,0.4575 lw 2 lc rgb 'black' dt 2 nohead set arrow 8 from 28,0.4545 to 12,0.44 lw 2 lc rgb 'black' dt 2 nohead plot 'PSF.txt' using 1:(0.5*$4) w l lc rgb "black" lw 1 notitle, 'PSF.txt' using 1:(0.5*$5) w l lc rgb "blue" lw 1 dt 2 notitle set origin 0.58, 0.58 set size 0.38, 0.35 set xr [-100:100] set yr [0:0.004] set xtics 100 set ytics 0.002 set ticscale 1 set format y "%2.3f" set arrow 9 from -100,0.004 to -468,-0.0083 lw 2 lc rgb 'black' dt 2 nohead set arrow 10 from -468,-0.0083 to -160,-0.0083 lw 2 lc rgb 'black' dt 2 nohead set arrow 11 from -160,-0.0083 to -160,-0.0090 lw 2 lc rgb 'black' dt 2 nohead set arrow 12 from -160,-0.0090 to -468,-0.0090 lw 2 lc rgb 'black' dt 2 nohead set arrow 13 from -468,-0.0090 to -468,-0.0083 lw 2 lc rgb 'black' dt 2 nohead set arrow 14 from -160,-0.0090 to 100,0 lw 2 lc rgb 'black' dt 2 nohead plot 'PSF.txt' using 1:6 w l lc rgb "red" lw 1 notitle unset multiplot reset