#!/bin/bash # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # # Plots 2*np-panels for systems with "np" planets # # INPUT: - sp0#.dat [BLS spectrum of the #-th component] # - tr#.lc [decomposed, folded LC/fit of the #-th component] # - tr#_fit.lc [densely sampled best-fitting trapezoidal] # - multi_par.dat [parameters of the component candidates] # - ts_4.dat [needed ONLY for the target name] # # # OUTPUT: - mult_plot.png # # DATE: - 2020.09.04 # # NOTES: - run like: gnuplot mult_1.sh # - INPUT files are the outputs of "tran_k2" # - PLOT arangement: BLS #1 LC #1 # BLS #2 LC #2 # ... ... # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # #............... Get target name ! grep "TARGET" ts_4.dat > a.dat ! awk '{print $3}' a.dat > sname.txt target=system('head -n 1 sname.txt') # # #................. Set BLS plot parameters # fmin=-0.03 fmax=1.53 bls_min=-0.04 bls_max=1.09 # #................. Set LC plot parameters # ppt=1000.0 ph_min=-0.105 ph_max=0.105 yf1_1=0.30 yf2_1=0.10 yf1_2=0.40 yf2_2=0.20 yf1_3=1.20 yf2_3=0.60 # #................. This is specifically for 211314705 yf1_3=2.10 yf2_3=1.40 # #................. Set panel positions # x0=0.13 y0=0.13 dx=0.05 dy=0.02 xr=0.40 yr=0.25 # #................. BLS, LC ranges # stats "sp00.dat" using 2 noout fx1=1.0/STATS_max # stats "tr1.lc" using (ppt*$2) noout ymin1=STATS_min ymax1=STATS_max yr1=ymax1-ymin1 ymin1=ymin1-yr1*yf2_1 ymax1=ymax1+yr1*yf1_1 # #.................. Initialize plot # set term png size 800,800 crop enhanced set output 'mult_plot.png' set multiplot layout 2,3 # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1 PLANET # unset key unset label set border lc rgb "black" set border linewidth 1.3 # set bmargin at screen y0 set tmargin at screen y0+yr set lmargin at screen x0 set rmargin at screen x0+xr # set xrange [fmin:fmax] set yrange [bls_min:bls_max] # set object 1 rect from graph 0,0 rto 1,1 fc rgb "black" fs solid 0.07 behind lw 0 set label 11 "Frequency [c/d]" font "Helvetica-Bold, 20" at graph 0.18,-0.24 front tc rgb "black" # set xtics -2.0,0.5,60.0 font "Helvetica, 15" set xtics format '%3.1f' offset 0,0.2,0 set mxtics 5 set ytics -1.5,0.5,1.50 font "Helvetica, 15" set ytics format '%3.1f' offset 0.8,0,0 set mytics 5 # plot 'sp00.dat' using 1:(fx1*$2) with lines lw 1.5 lt -1 lc rgb "black" # unset label set lmargin at screen x0+xr+dx set rmargin at screen x0+2*xr+dx # set xrange [ph_min:ph_max] set yrange [ymin1:ymax1] set xtics -1.0,0.05,1.0 font "Helvetica, 15" set xtics format '%3.2f' offset 0,0.2,0 set mxtics 5 set ytics -20.0,0.2,20.0 font "Helvetica, 15" set ytics format '%2.1f' offset 1.0,0,0 set mytics 2 # if(ymax1-ymin1 > 1.5) { set ytics -20.0,0.5,20.0 font "Helvetica, 15" } if(ymax1-ymin1 > 1.5) { set ytics format '%2.1f' offset 1.0,0,0 } if(ymax1-ymin1 > 1.5) { set mytics 5 } # if(ymax1-ymin1 > 3.0) { set ytics -20.0,1.0,20.0 font "Helvetica, 15" } if(ymax1-ymin1 > 3.0) { set ytics format '%2.0f' offset 1.0,0,0 } if(ymax1-ymin1 > 3.0) { set mytics 5 } # set label 2 "pc01" font "Helvetica-Bold, 20" at graph 0.78,0.85 front tc rgb "brown" set label 12 "Phase" font "Helvetica-Bold, 20" at graph 0.38,-0.24 front tc rgb "black" # plot 'tr1.lc' using 1:(ppt*$2) with points pt 7 ps 1 lc rgb "#696969",\ 'tr1_fit.lc' using 1:(ppt*$2) with lines lw 4 lt -1 lc rgb "black" # exit #