From 851ce89ac9cbb8ede6c4b3c4eb0b20c67ab93928 Mon Sep 17 00:00:00 2001 From: caes Date: Thu, 22 Jun 2017 09:28:23 -0400 Subject: [PATCH] 4bins and 7bins mostly successful --- scripts/compute_psdlags.sh | 3 ++ scripts/plot.sh | 8 ++-- scripts/psdlag_4bin.py | 7 +++- scripts/psdlag_7bin.py | 15 ++++++-- ..._overlay_atlas.gp => lag_atlas_overlay.gp} | 38 +++++++++---------- 5 files changed, 43 insertions(+), 28 deletions(-) mode change 100644 => 100755 scripts/psdlag_7bin.py rename scripts/templates/{lag_overlay_atlas.gp => lag_atlas_overlay.gp} (53%) diff --git a/scripts/compute_psdlags.sh b/scripts/compute_psdlags.sh index a9dc16f..6764f34 100755 --- a/scripts/compute_psdlags.sh +++ b/scripts/compute_psdlags.sh @@ -36,6 +36,9 @@ do scripts/process_output.pl $echo_band + # So if one fails we don't read the previous output + rm *.out + # saves the tables to data/tables/ mv -v tmp.echopsd $echopsd_tabfile mv -v tmp.refpsd $refpsd_tabfile diff --git a/scripts/plot.sh b/scripts/plot.sh index c83af96..5d6b229 100755 --- a/scripts/plot.sh +++ b/scripts/plot.sh @@ -45,8 +45,8 @@ case $1 in rm $gnuplot_file ;; - "twolags"|"2lags") - gnuplot_file=lag_overlay_atlas.gp + "twolags"|"2lags"|"overlay") + gnuplot_file=lag_atlas_overlay.gp gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n|␤|g') for tabfile in data/tables/${2}/lag_*.tab; do @@ -56,7 +56,7 @@ case $1 in sed 's|lag_[0-9]\{4\}A_\([0-9]\{4\}A\).tab|\1|') if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi gnuplot_input_edit=$(echo "$gnuplot_input"| - sed "s|%FILE%|$tabfile|"| + sed "s|%FILEA%|$tabfile|"| sed "s|%LABEL%|$echo_band|") gnuplot_input="${gnuplot_input_edit}" done @@ -68,7 +68,7 @@ case $1 in sed 's|lag_[0-9]\{4\}A_\([0-9]\{4\}A\).tab|\1|') if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi gnuplot_input_edit=$(echo "$gnuplot_input"| - sed "s|%FILE%|$tabfile|"| + sed "s|%FILEB%|$tabfile|"| sed "s|%LABEL%|$echo_band|") gnuplot_input="${gnuplot_input_edit}" done diff --git a/scripts/psdlag_4bin.py b/scripts/psdlag_4bin.py index 6dfc843..2c78827 100755 --- a/scripts/psdlag_4bin.py +++ b/scripts/psdlag_4bin.py @@ -30,8 +30,11 @@ t1, l1, l1e = np.loadtxt(ref_file).T # 0.10747115, 0.62032418]) #C -fqL = np.array([0.0049999999, 0.044733049, 0.10747115, - 0.22, 0.56]) +#fqL = np.array([0.0049999999, 0.044733049, 0.10747115, +# 0.22, 0.56]) + +#D +fqL = np.logspace(np.log10(0.0049999999),np.log10(0.340002000),5) nfq = len(fqL) - 1 fqd = 10**(np.log10( (fqL[:-1]*fqL[1:]) )/2.) diff --git a/scripts/psdlag_7bin.py b/scripts/psdlag_7bin.py old mode 100644 new mode 100755 index 367621f..2d4e5a4 --- a/scripts/psdlag_7bin.py +++ b/scripts/psdlag_7bin.py @@ -21,11 +21,20 @@ dt = 0.01 t1, l1, l1e = np.loadtxt(ref_file).T # errorbar(t1, l1, yerr=l1e, fmt='o') +#A +fqL = np.logspace(np.log10(0.0049999999),np.log10(0.340002000),8) + +#B +#fqL = np.array([0.0049999999, 0.018619375, 0.044733049, +# 0.069336227, 0.10747115, 0.16658029, +# 0.25819945, 0.40020915]) -fqL = np.array([0.0049999999, 0.018619375, 0.044733049, 0.069336227, 0.10747115, 0.16658029, - 0.25819945, 0.40020915]) -#fqL = np.logspace(np.log10(0.005),np.log10(0.4),8) +#C +#fqL = np.array([0.0049999999, 0.018619375, 0.044733049, +# 0.069336227, 0.10747115, 0.16658029, +# 0.25819945, 0.40020915]) + nfq = len(fqL) - 1 fqd = 10**(np.log10( (fqL[:-1]*fqL[1:]) )/2.) diff --git a/scripts/templates/lag_overlay_atlas.gp b/scripts/templates/lag_atlas_overlay.gp similarity index 53% rename from scripts/templates/lag_overlay_atlas.gp rename to scripts/templates/lag_atlas_overlay.gp index 266ac69..228c120 100644 --- a/scripts/templates/lag_overlay_atlas.gp +++ b/scripts/templates/lag_atlas_overlay.gp @@ -1,5 +1,5 @@ set terminal pdf size 3.5,5 -set output "lag_atlas.pdf" +set output "lag_atlas_overlay.pdf" set termopt enhanced set macros @@ -50,109 +50,109 @@ set multiplot layout 6,3 rowsfirst @VSET_1; @HSET_1 @NOXNUMS; @YNUMS set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH b @NOXNUMS; @NOYNUMS @VSET_1; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" #-- GRAPH c @NOXNUMS; @NOYNUMS @VSET_1; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH d @NOXNUMS; @YNUMS @VSET_2; @HSET_1 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_2; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_2; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @YNUMS @VSET_3; @HSET_1 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_3; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_3; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @YLABEL @VSET_4; @HSET_1 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_4; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_4; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @YNUMS @VSET_5; @HSET_1 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_5; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @NOXNUMS; @NOYNUMS @VSET_5; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @XNUMS; @YNUMS @VSET_6; @HSET_1 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @XLABEL; @NOYNUMS @VSET_6; @HSET_2 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" # --- GRAPH a @XNUMS; @NOYNUMS @VSET_6; @HSET_3 set label 1 '%LABEL%' @POS - plot '%FILE%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black" + plot '%FILEA%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "black", '%FILEB%' using 1:2:($2-$4):($2+$4) with yerrorbars pt 7 ps .3 lt rgb "red" unset multiplot