mirror of
https://asciireactor.com/otho/clag-agn.git
synced 2024-11-21 22:35:06 +00:00
update
This commit is contained in:
parent
56e53ed95b
commit
539cb359ed
@ -5,31 +5,31 @@ mkdir -p data
|
|||||||
ref_band="1367A"
|
ref_band="1367A"
|
||||||
refpsd_tabfile=data/tables/psd_${ref_band}.tab
|
refpsd_tabfile=data/tables/psd_${ref_band}.tab
|
||||||
|
|
||||||
|
err_str="LF"
|
||||||
|
|
||||||
for lightcurve in data/lc/*.lc
|
for lightcurve in data/lc/*.lc
|
||||||
do
|
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
|
if [[ $ref_band == $echo_band ]]; then continue; fi
|
||||||
err_str="LF"
|
|
||||||
|
|
||||||
# Save tables with these filenames
|
# Save tables with these filenames
|
||||||
echopsd_tabfile=data/tables/psd_${echo_band}.tab
|
echopsd_tabfile=data/tables/psd_${echo_band}.tab
|
||||||
timelag_tabfile=data/tables/lag_${ref_band}_${echo_band}.tab
|
timelag_tabfile=data/tables/lag_${ref_band}_${echo_band}.tab
|
||||||
|
|
||||||
echo -n "Running psdlag using ref band ${ref_band}"
|
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
|
# psdlag python script will call clag and print rudimentary tables to *.out
|
||||||
# tmp.* files.
|
time scripts/psdlag_4bin.py data/lc/${ref_band}.lc $lightcurve > /dev/null
|
||||||
echo scripts/psdlag_4bin.py ${ref_band}.lc $lightcurve
|
|
||||||
|
|
||||||
|
|
||||||
# process_tables perl script reads tmp.* files and creates some
|
# process_tables perl script reads *.out files from the python script,
|
||||||
# other useful tables
|
# then creates other useful tables
|
||||||
scripts/process_tables.pl $lightcurve > /dev/null
|
scripts/process_tables.pl $echo_band > /dev/null
|
||||||
mv tmp.echoPSD $echoPSD_tabfile
|
|
||||||
mv tmp.refPSD $refPSD_tabfile
|
# saves the tables to data/tables/
|
||||||
mv tmp.timelag $timelag_tabfile
|
mv -v tmp.echopsd $echopsd_tabfile
|
||||||
|
mv -v tmp.refpsd $refpsd_tabfile
|
||||||
|
mv -v tmp.lag $timelag_tabfile
|
||||||
done
|
done
|
||||||
|
|
||||||
rm tmp.*
|
|
@ -9,11 +9,12 @@ case $1 in
|
|||||||
"PSD"|"psd"|"PSDs"|"PSDS"|"psds")
|
"PSD"|"psd"|"PSDs"|"PSDS"|"psds")
|
||||||
gnuplot_file=psd_atlas.gp
|
gnuplot_file=psd_atlas.gp
|
||||||
scripts/propagate_tables.sh
|
scripts/propagate_tables.sh
|
||||||
gnuplot_input=$(cat scripts/templates/${gnuplot_file}|perl -pe 's|\n||g')
|
gnuplot_input=$(cat scripts/templates/${gnuplot_file}|
|
||||||
for tabfile in data/tables/PSD_*${errtype}*.tab;
|
perl -pe 's|\n||g')
|
||||||
|
for tabfile in data/tables/psd_*.tab;
|
||||||
do
|
do
|
||||||
echo_band=$(basename $tabfile|
|
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
|
if [[ "$echo_band" == "$ref_band" ]] ; then continue; fi
|
||||||
gnuplot_input_edit=$(echo "$gnuplot_input"|
|
gnuplot_input_edit=$(echo "$gnuplot_input"|
|
||||||
sed "s|%FILE%|$tabfile|"|
|
sed "s|%FILE%|$tabfile|"|
|
||||||
|
@ -138,7 +138,7 @@ if($debug) {
|
|||||||
|
|
||||||
close($outputfile);
|
close($outputfile);
|
||||||
|
|
||||||
open($datafile,'>',"tmp.refPSD") or die $!;
|
open($datafile,'>',"tmp.refpsd") or die $!;
|
||||||
while( each %function_bin) {
|
while( each %function_bin) {
|
||||||
say $datafile
|
say $datafile
|
||||||
$_ . " " .
|
$_ . " " .
|
||||||
@ -148,7 +148,7 @@ while( each %function_bin) {
|
|||||||
}
|
}
|
||||||
close($datafile);
|
close($datafile);
|
||||||
|
|
||||||
open($datafile,'>',"tmp.echoPSD") or die $!;
|
open($datafile,'>',"tmp.echopsd") or die $!;
|
||||||
while( each %function_bin) {
|
while( each %function_bin) {
|
||||||
say $datafile
|
say $datafile
|
||||||
$_ . " " .
|
$_ . " " .
|
||||||
@ -158,7 +158,7 @@ while( each %function_bin) {
|
|||||||
}
|
}
|
||||||
close($datafile);
|
close($datafile);
|
||||||
|
|
||||||
open($datafile,'>',"tmp.crsspctrmPSD") or die $!;
|
open($datafile,'>',"tmp.crsspctrm") or die $!;
|
||||||
while( each %function_bin) {
|
while( each %function_bin) {
|
||||||
say $datafile
|
say $datafile
|
||||||
$_ . " " .
|
$_ . " " .
|
||||||
@ -168,7 +168,7 @@ while( each %function_bin) {
|
|||||||
}
|
}
|
||||||
close($datafile);
|
close($datafile);
|
||||||
|
|
||||||
open($datafile,'>',"tmp.timelag") or die $!;
|
open($datafile,'>',"tmp.lag") or die $!;
|
||||||
while( each %function_bin) {
|
while( each %function_bin) {
|
||||||
say $datafile
|
say $datafile
|
||||||
$_ . " " .
|
$_ . " " .
|
||||||
|
0
scripts/psdlag_4bin.py
Normal file → Executable file
0
scripts/psdlag_4bin.py
Normal file → Executable file
Loading…
Reference in New Issue
Block a user