From 56e53ed95bfbcc2085f121ad08d4dd35cf9e186c Mon Sep 17 00:00:00 2001 From: caes Date: Thu, 22 Jun 2017 06:36:22 -0400 Subject: [PATCH] more changes --- scripts/compute_psdlags.sh | 24 ++++++++++--------- scripts/plot.sh | 10 ++++---- .../{extract_tables.pl => process_tables.pl} | 0 3 files changed, 17 insertions(+), 17 deletions(-) rename scripts/{extract_tables.pl => process_tables.pl} (100%) diff --git a/scripts/compute_psdlags.sh b/scripts/compute_psdlags.sh index 661d237..54b9b47 100755 --- a/scripts/compute_psdlags.sh +++ b/scripts/compute_psdlags.sh @@ -3,6 +3,7 @@ mkdir -p data ref_band="1367A" +refpsd_tabfile=data/tables/psd_${ref_band}.tab for lightcurve in data/lc/*.lc do @@ -11,20 +12,21 @@ do if [[ $ref_band == $echo_band ]]; then continue; fi err_str="LF" -echo -n "Running psdlag using ref band ${ref_band}" -echo " and echo band $echo_band{${err_str}}." + # Save tables with these filenames + echopsd_tabfile=data/tables/psd_${echo_band}.tab + timelag_tabfile=data/tables/lag_${ref_band}_${echo_band}.tab -scripts/psdlag_4bin.py + echo -n "Running psdlag using ref band ${ref_band}" + echo " and echo band $echo_band{${err_str}}." + + # psdlag python script will call clag and print tables + # tmp.* files. + echo scripts/psdlag_4bin.py ${ref_band}.lc $lightcurve - # Propagate tables into analyses/tables - echoPSD_tabfile=analyses/tables/PSD_${echo_band}_\{${err_str}\}.tab - refPSD_tabfile=analyses/tables/PSD_${ref_band}_\{${err_str}\}.tab - timelag_tabfile=analyses/tables/timelag_${ref_band}_≺_${echo_band}_\{${err_str}\}.tab - - # Output curves to temporary files using perl script, move tables to - # permanent location. This just assumes there are no conflicts. - scripts/extract_tables.pl $lightcurve > /dev/null + # process_tables perl script reads tmp.* files and creates some + # other useful tables + scripts/process_tables.pl $lightcurve > /dev/null mv tmp.echoPSD $echoPSD_tabfile mv tmp.refPSD $refPSD_tabfile mv tmp.timelag $timelag_tabfile diff --git a/scripts/plot.sh b/scripts/plot.sh index 43bf1c4..be8db59 100755 --- a/scripts/plot.sh +++ b/scripts/plot.sh @@ -3,16 +3,14 @@ # This metascript uses the available plotting scripts to produce a list of # document-rady plots. -# Only analyses with this error type will be represented in the atlas -errtype=$(cat err_type) -ref_band="1367Å" +ref_band="1367A" case $1 in "PSD"|"psd"|"PSDs"|"PSDS"|"psds") gnuplot_file=psd_atlas.gp scripts/propagate_tables.sh gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n|␤|g') - for tabfile in analyses/tables/PSD_*${errtype}*.tab; + for tabfile in data/tables/PSD_*${errtype}*.tab; do echo_band=$(basename $tabfile| sed 's|PSD[_ ]\(.\{5\}\)[_ ]{[^_ ]*}.tab|\1|') @@ -30,7 +28,7 @@ case $1 in gnuplot_file=timelag_atlas.gp gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n|␤|g') scripts/propagate_tables.sh - for tabfile in analyses/tables/timelag_*${errtype}*.tab; + for tabfile in data/tables/timelag_*${errtype}*.tab; do ref_band_extracted=$(basename $tabfile|sed 's|timelag_\([^≺]*\)[_ ]≺[_ ][^≺_ ]*[_ ]{[^_ ]*}.tab|\1|') echo_band=$(basename $tabfile|sed 's|timelag_[^≺]*[_ ]≺[_ ]\([^≺_ ]*\)[_ ]{[^_ ]*}.tab|\1|') @@ -45,7 +43,7 @@ case $1 in ;; "tophat"|"th") - mkdir -p analyses/tables/ + mkdir -p data/tables/ scripts/tophat_fft.pl gnuplot scripts/templates/tophat_freqdomain.gp gnuplot scripts/templates/tophat_timedomain.gp diff --git a/scripts/extract_tables.pl b/scripts/process_tables.pl similarity index 100% rename from scripts/extract_tables.pl rename to scripts/process_tables.pl