clag-agn/scripts/compute_psdlags.sh

35 lines
954 B
Bash
Raw Normal View History

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
for lightcurve in data/lc/*.lc
do
2017-06-22 10:19:42 +00:00
echo_band=$(basename $lightcurve|sed 's|\([0-9]????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
err_str="LF"
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}"
echo " and echo band $echo_band{${err_str}}."
2017-06-22 10:10:46 +00:00
2017-06-22 10:36:22 +00:00
# psdlag python script will call clag and print tables
# tmp.* files.
echo scripts/psdlag_4bin.py ${ref_band}.lc $lightcurve
2017-06-22 10:10:46 +00:00
2017-06-22 10:36:22 +00:00
# process_tables perl script reads tmp.* files and creates some
# other useful tables
scripts/process_tables.pl $lightcurve > /dev/null
2017-06-22 10:10:46 +00:00
mv tmp.echoPSD $echoPSD_tabfile
mv tmp.refPSD $refPSD_tabfile
mv tmp.timelag $timelag_tabfile
done
rm tmp.*