2017-06-22 10:10:46 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
mkdir -p data
|
|
|
|
|
|
|
|
ref_band="1367A"
|
2017-06-22 10:36:22 +00:00
|
|
|
refpsd_tabfile=data/tables/psd_${ref_band}.tab
|
2017-06-22 10:10:46 +00:00
|
|
|
|
2017-06-22 10:49:53 +00:00
|
|
|
err_str="LF"
|
|
|
|
|
2017-06-22 10:10:46 +00:00
|
|
|
for lightcurve in data/lc/*.lc
|
|
|
|
do
|
|
|
|
|
2017-06-22 10:49:53 +00:00
|
|
|
echo_band=$(basename $lightcurve|sed 's|\([0-9]\{4\}A\).lc|\1|')
|
2017-06-22 10:10:46 +00:00
|
|
|
if [[ $ref_band == $echo_band ]]; then continue; fi
|
2017-06-22 10:19:42 +00:00
|
|
|
|
2017-06-22 10:36:22 +00:00
|
|
|
# Save tables with these filenames
|
|
|
|
echopsd_tabfile=data/tables/psd_${echo_band}.tab
|
|
|
|
timelag_tabfile=data/tables/lag_${ref_band}_${echo_band}.tab
|
2017-06-22 10:19:42 +00:00
|
|
|
|
2017-06-22 10:36:22 +00:00
|
|
|
echo -n "Running psdlag using ref band ${ref_band}"
|
2017-06-22 10:49:53 +00:00
|
|
|
echo " and echo band $echo_band."
|
2017-06-22 10:10:46 +00:00
|
|
|
|
2017-06-22 10:49:53 +00:00
|
|
|
# psdlag python script will call clag and print rudimentary tables to *.out
|
|
|
|
time scripts/psdlag_4bin.py data/lc/${ref_band}.lc $lightcurve > /dev/null
|
2017-06-22 10:10:46 +00:00
|
|
|
|
|
|
|
|
2017-06-22 10:49:53 +00:00
|
|
|
# process_tables perl script reads *.out files from the python script,
|
|
|
|
# then creates other useful tables
|
|
|
|
scripts/process_tables.pl $echo_band > /dev/null
|
2017-06-22 10:10:46 +00:00
|
|
|
|
2017-06-22 10:49:53 +00:00
|
|
|
# saves the tables to data/tables/
|
|
|
|
mv -v tmp.echopsd $echopsd_tabfile
|
|
|
|
mv -v tmp.refpsd $refpsd_tabfile
|
|
|
|
mv -v tmp.lag $timelag_tabfile
|
|
|
|
done
|