setting up for analyses with varying error fit types to exist in parallel

This commit is contained in:
caes 2016-07-26 17:27:16 -04:00
parent ae199bcd8c
commit 7842e3fa99
4 changed files with 40 additions and 16 deletions

View File

@ -46,7 +46,11 @@ scripts/power_lag_plot.pl
2016-07-18
Ran first MCMC run, need to analyze results
2016-07-26
2016-07-25
Determined MC is definitely the way to go, with at least 1000 simulations.
Setup scripts to run simulations on Thor, one simulation per processor.
2016-07-26
MC giving huge errors. Putting together plots to send to Dr. Zoghbi.

View File

@ -12,6 +12,11 @@ ref_curve="${lc_dir}/${ref_band}.lc"
error_type="2"
# error types:
# 0 for covariance matrix, 1 for likelihood function, 2 for monte carlo
case $error_type in
"0") err_src="CM";;
"1") err_src="LF";;
"2") err_src="MC";;
esac
if [[ $1 == "thor" ]]
then
@ -32,7 +37,7 @@ do
# Determine band and inputs for band
echo_band=$(basename $echo_curve|sed 's@\(.*\)\.lc@\1@')
echo -n $(date "+%R")\: Running psdlag for $echo_band against $ref_band.
outputfile="analyses/${echo_band}${ref_band}_Δt${timestep}"
outputfile="analyses/${echo_band}__${ref_band}_Δt${timestep}_σ${err_src}"
case $echo_band in
"g(𝛌4775Å)")
initial_params="$refpsd_params -9.745e-01 -1.384e+00 -2.748e+00 -3.305e+00 -3.314e+00 -3.389e+00 -4.198e+00 -4.465e+00 -4.700e-01 -7.487e-01 -2.046e+00 -2.428e+00 -2.953e+00 -3.086e+00 -3.761e+00 -4.290e+00 9.862e-02 3.899e-01 8.650e-01 5.516e-01 2.228e-01 9.508e-01 -2.872e-01 9.059e-02"
@ -113,8 +118,20 @@ do
else
if [[ $1 == "thor" ]]
then
echo_band_noUTF=$(echo $echo_band|sed 's@𝛌@@g'|sed 's@(@_@g'|sed 's@)@_@g'|sed 's@@@g'|sed 's@Å@A@g')
outputfile_noUTF=$(echo $outputfile|sed 's@𝛌@@g'|sed 's@(@_@g'|sed 's@)@_@g'|sed 's@@@g'|sed 's@Å@A@g'|sed 's@≻@_@g')
echo_band_noUTF=$(echo $echo_band|
sed 's@𝛌@@g'|
sed 's@(@_@g'|
sed 's@)@_@g'|
sed 's@@@g'|
sed 's@Å@A@g')
outputfile_noUTF=$(echo $outputfile|
sed 's@𝛌@@g'|
sed 's@(@_@g'|
sed 's@)@_@g'|
sed 's@@@g'|
sed 's@Å@A@g'|
sed 's@≻@_@g'|
sed 's@σ∊@err@')
argsfile="thor/arguments/$echo_band_noUTF.args"
submitscript="thor/${echo_band_noUTF}.pbs"
cp tmp.psdlagargs $argsfile

View File

@ -22,17 +22,18 @@ mkdir -p analyses/plots
for analysis in analyses/*
do
# Grab and determine labels of analyses, skip if over the same band.
ref_band=$(basename $analysis|sed 's@[^≻]*≻\([^≻_]*\)_[^_]*@\1@')
echo_band=$(basename $analysis|sed 's@\([^≻]*\)≻[^≻_]*_[^_]*@\1@')
ref_band=$(basename $analysis|sed 's@[^≻]*__\([^≻_]*\)_[^_]*@\1@')
echo_band=$(basename $analysis|sed 's@\([^≻]*\)__[^≻_]*_[^_]*@\1@')
if [[ $ref_band == $echo_band ]]; then continue; fi
err_type=$(basename $analysis|sed 's@[^≻]*≻[^≻_]*_[^_]\(σ∊[CLM][MFC]\)*@\1@')
# Prepare files
echo "Plotting PSD and time lags for $echo_band, referred to ${ref_band}."
echoPSD_tabfile=analyses/tables/${echo_band}_PSD.tab
refPSD_tabfile=analyses/tables/${ref_band}_PSD.tab
timelag_tabfile=analyses/tables/${echo_band}_≻_${ref_band}_delay.tab
PSD_plotfile=analyses/plots/${echo_band}_≻_${ref_band}_PSD.png
timelag_plotfile=analyses/plots/${echo_band}_≻_${ref_band}_timelag.png
echoPSD_tabfile=analyses/tables/${echo_band}_${err_type}_PSD.tab
refPSD_tabfile=analyses/tables/${ref_band}_${err_type}_PSD.tab
timelag_tabfile=analyses/tables/${echo_band}_≻_${ref_band}_${err_type}_timelag.tab
PSD_plotfile=analyses/plots/${echo_band}_≻_${ref_band}_${err_type}_PSD.png
timelag_plotfile=analyses/plots/${echo_band}_≻_${ref_band}_${err_type}_timelag.png
# Output curves to temporary files using perl script, move tables to
# permanent location. This just assumes there are no conflicts.

View File

@ -1,11 +1,13 @@
#!/usr/bin/env bash
for analysis in analysis/*
for analysis in analyses/*
do
basename $analysis|
new_name=$(basename $analysis|
sed 's|A_|Å\)|g'|
sed 's|_\([0-9]+\)|\(𝛌=\1|g'|
sed 's|_|≻|'|
sed 's|Δt|Δt|'
sed 's|_\([0-9]\+\)|\(𝛌=\1|g'|
sed 's|_|_≻_|'|
sed 's|Δt|Δt|'|
sed 's|err|σ∊|')_σ∊MC
mv $analysis analyses/$new_name
done