This commit is contained in:
caes 2017-06-22 06:49:53 -04:00
parent 56e53ed95b
commit 539cb359ed
4 changed files with 22 additions and 21 deletions

View File

@ -5,31 +5,31 @@ mkdir -p data
ref_band="1367A"
refpsd_tabfile=data/tables/psd_${ref_band}.tab
err_str="LF"
for lightcurve in data/lc/*.lc
do
echo_band=$(basename $lightcurve|sed 's|\([0-9]????A\).lc|\1|')
echo_band=$(basename $lightcurve|sed 's|\([0-9]\{4\}A\).lc|\1|')
if [[ $ref_band == $echo_band ]]; then continue; fi
err_str="LF"
# Save tables with these filenames
echopsd_tabfile=data/tables/psd_${echo_band}.tab
timelag_tabfile=data/tables/lag_${ref_band}_${echo_band}.tab
echo -n "Running psdlag using ref band ${ref_band}"
echo " and echo band $echo_band{${err_str}}."
echo " and echo band $echo_band."
# psdlag python script will call clag and print tables
# tmp.* files.
echo scripts/psdlag_4bin.py ${ref_band}.lc $lightcurve
# 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
# 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
# process_tables perl script reads *.out files from the python script,
# then creates other useful tables
scripts/process_tables.pl $echo_band > /dev/null
# 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
rm tmp.*

View File

@ -9,11 +9,12 @@ 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 data/tables/PSD_*${errtype}*.tab;
gnuplot_input=$(cat scripts/templates/${gnuplot_file}|
perl -pe 's|\n|␤|g')
for tabfile in data/tables/psd_*.tab;
do
echo_band=$(basename $tabfile|
sed 's|PSD[_ ]\(.\{5\}\)[_ ]{[^_ ]*}.tab|\1|')
sed 's|psd_\([0-9]????A\).tab|\1|')
if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi
gnuplot_input_edit=$(echo "$gnuplot_input"|
sed "s|%FILE%|$tabfile|"|

View File

@ -138,7 +138,7 @@ if($debug) {
close($outputfile);
open($datafile,'>',"tmp.refPSD") or die $!;
open($datafile,'>',"tmp.refpsd") or die $!;
while( each %function_bin) {
say $datafile
$_ . " " .
@ -148,7 +148,7 @@ while( each %function_bin) {
}
close($datafile);
open($datafile,'>',"tmp.echoPSD") or die $!;
open($datafile,'>',"tmp.echopsd") or die $!;
while( each %function_bin) {
say $datafile
$_ . " " .
@ -158,7 +158,7 @@ while( each %function_bin) {
}
close($datafile);
open($datafile,'>',"tmp.crsspctrmPSD") or die $!;
open($datafile,'>',"tmp.crsspctrm") or die $!;
while( each %function_bin) {
say $datafile
$_ . " " .
@ -168,7 +168,7 @@ while( each %function_bin) {
}
close($datafile);
open($datafile,'>',"tmp.timelag") or die $!;
open($datafile,'>',"tmp.lag") or die $!;
while( each %function_bin) {
say $datafile
$_ . " " .

0
scripts/psdlag_4bin.py Normal file → Executable file
View File