2016-08-06 03:08:36 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This metascript uses the available plotting scripts to produce a list of
|
|
|
|
# document-rady plots.
|
|
|
|
|
2016-08-10 02:38:11 +00:00
|
|
|
# Only analyses with this error type will be represented in the atlas
|
2016-08-29 06:33:52 +00:00
|
|
|
errtype="LF"
|
2016-08-10 02:38:11 +00:00
|
|
|
ref_band="1367Å"
|
|
|
|
|
|
|
|
case $1 in
|
2016-08-11 02:27:52 +00:00
|
|
|
"PSD"|"psd"|"PSDs"|"PSDS"|"psds")
|
2016-08-10 02:38:11 +00:00
|
|
|
gnuplot_file=psd_atlas.gp
|
2016-08-14 05:41:32 +00:00
|
|
|
scripts/propagate_tables.sh
|
2016-08-10 02:38:11 +00:00
|
|
|
gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n||g')
|
2016-08-11 02:27:52 +00:00
|
|
|
for tabfile in analyses/tables/PSD_*${errtype}*.tab;
|
2016-08-10 02:38:11 +00:00
|
|
|
do
|
|
|
|
echo_band=$(basename $tabfile|
|
|
|
|
sed 's|PSD[_ ]\(.\{5\}\)[_ ]{[^_ ]*}.tab|\1|')
|
|
|
|
if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi
|
|
|
|
gnuplot_input_edit=$(echo "$gnuplot_input"|
|
|
|
|
sed "s|%FILE%|$tabfile|"|
|
|
|
|
sed "s|%LABEL%|$echo_band|")
|
|
|
|
gnuplot_input="${gnuplot_input_edit}"
|
|
|
|
done
|
|
|
|
echo "$gnuplot_input"|perl -pe 's||\n|g' > ${gnuplot_file}
|
|
|
|
gnuplot $gnuplot_file
|
|
|
|
;;
|
|
|
|
|
2016-08-11 02:27:52 +00:00
|
|
|
"lags"|"lag"|"delay"|"delays")
|
2016-08-10 02:38:11 +00:00
|
|
|
gnuplot_file=timelag_atlas.gp
|
|
|
|
gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n||g')
|
2016-08-14 05:41:32 +00:00
|
|
|
scripts/propagate_tables.sh
|
2016-08-11 02:27:52 +00:00
|
|
|
for tabfile in analyses/tables/timelag_*${errtype}*.tab;
|
2016-08-10 02:38:11 +00:00
|
|
|
do
|
|
|
|
ref_band_extracted=$(basename $tabfile|sed 's|timelag_\([^≺]*\)[_ ]≺[_ ][^≺_ ]*[_ ]{[^_ ]*}.tab|\1|')
|
|
|
|
echo_band=$(basename $tabfile|sed 's|timelag_[^≺]*[_ ]≺[_ ]\([^≺_ ]*\)[_ ]{[^_ ]*}.tab|\1|')
|
|
|
|
if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi
|
|
|
|
gnuplot_input_edit=$(echo "$gnuplot_input"|
|
|
|
|
sed "s|%FILE%|$tabfile|"|
|
|
|
|
sed "s|%LABEL%|$echo_band|")
|
|
|
|
gnuplot_input="${gnuplot_input_edit}"
|
|
|
|
done
|
|
|
|
echo "$gnuplot_input"|perl -pe 's||\n|g' > ${gnuplot_file}
|
|
|
|
gnuplot $gnuplot_file
|
|
|
|
;;
|
2016-08-11 02:27:52 +00:00
|
|
|
|
2016-08-14 08:19:33 +00:00
|
|
|
"tophat"|"th")
|
|
|
|
mkdir -p analyses/tables/
|
2016-08-14 05:41:32 +00:00
|
|
|
scripts/tophat_fft.pl
|
|
|
|
gnuplot scripts/templates/tophat_freqdomain.gp
|
|
|
|
gnuplot scripts/templates/tophat_timedomain.gp
|
2016-08-11 02:27:52 +00:00
|
|
|
;;
|
2016-08-12 09:14:03 +00:00
|
|
|
|
2016-08-11 02:27:52 +00:00
|
|
|
*)
|
2016-08-10 02:38:11 +00:00
|
|
|
echo "Did not understand plot type."
|
2016-08-12 09:14:03 +00:00
|
|
|
;;
|
2016-08-29 06:33:52 +00:00
|
|
|
esac
|