diff --git a/plot.sh b/plot.sh index 9e85488..cb4ee1a 100755 --- a/plot.sh +++ b/plot.sh @@ -4,7 +4,7 @@ # document-rady plots. # Only analyses with this error type will be represented in the atlas -errtype="CM" +errtype="LF" ref_band="1367Å" case $1 in @@ -54,4 +54,4 @@ case $1 in *) echo "Did not understand plot type." ;; -esac \ No newline at end of file +esac diff --git a/press/errors/errors.tex b/press/errors/errors.tex new file mode 100644 index 0000000..c3345cf --- /dev/null +++ b/press/errors/errors.tex @@ -0,0 +1,37 @@ +\documentclass[11pt,letterpaper]{article} + +\usepackage{natbib} +%\usepackage{cite} +\usepackage{graphicx} +\usepackage[margin=1.in,centering]{geometry} +\usepackage{hyperref} +\usepackage{caption} +\usepackage[export]{adjustbox} +\usepackage{float} + +\begin{document} + +\title{Computational Anomalies in Error Estimation} + +\date{August 25, 2016} + +\maketitle + +I'll print grids of results for each error type. Errors extracted from the covariance matrix (error code 0) + +Psdlag includes three methods for computing errors. These are designated by their error codes: + * 0 - Extracting from the covariance matrix + * 1 - Scanning the likelihood function + * 2 - Monte Carlo + +The covariance matrix method, i.e. the "quick" method, is the method we had our early successes with. Here are the grids of PSD and timelags. We do see some possible issues with errors here, with those that are too small + +\includegraphics{../img/timelag_atlas_err0.pdf} +\includegraphics{../img/timelag_atlas_err1.pdf} +\includegraphics{../img/timelag_atlas_err2.pdf} + +\includegraphics{../img/psd_atlas_err0.pdf} +\includegraphics{../img/psd_atlas_err1.pdf} +\includegraphics{../img/psd_atlas_err2.pdf} + +\end{document} diff --git a/press/img/psd_atlas_err0.pdf b/press/img/psd_atlas_err0.pdf new file mode 100644 index 0000000..cc5af9a Binary files /dev/null and b/press/img/psd_atlas_err0.pdf differ diff --git a/press/img/psd_atlas_err2.pdf b/press/img/psd_atlas_err2.pdf new file mode 100644 index 0000000..c505a04 Binary files /dev/null and b/press/img/psd_atlas_err2.pdf differ diff --git a/press/img/timelag_atlas_err0.pdf b/press/img/timelag_atlas_err0.pdf new file mode 100644 index 0000000..4085b9b Binary files /dev/null and b/press/img/timelag_atlas_err0.pdf differ diff --git a/press/img/timelag_atlas_err2.pdf b/press/img/timelag_atlas_err2.pdf new file mode 100644 index 0000000..372ee9b Binary files /dev/null and b/press/img/timelag_atlas_err2.pdf differ diff --git a/scripts/plot_MC_against_CM.sh b/scripts/plot_MC_against_CM.sh index 36e7ffb..714ee2c 100755 --- a/scripts/plot_MC_against_CM.sh +++ b/scripts/plot_MC_against_CM.sh @@ -1,3 +1,5 @@ +mkdir -p analyses/plots + for table in analyses/tables/timelag*MC}.tab do #ref_band=$(basename $table|sed 's|\([^≺]*\)_≺_[^≺_]*_[^_]*_[^_]*\.tab|\1|') @@ -11,7 +13,7 @@ do echo Plotting timelag error fit comparison for $echo_band. - plotfile=analyses/plots/timelag_${echo_band}_error_compare.png + plotfile=analyses/plots/timelag_${echo_band}_error_compare.pdf echo_band_noUTF=$(echo $echo_band| sed 's|𝛌|λ|g'| @@ -28,14 +30,14 @@ do sed 's|Å|A|g') cat scripts/templates/timelag_compare.gp| - sed "s|%TITLE|Error Fit Comparison for Time Lag of $echo_band|"| - sed "s|%SUBTITLE|referred to ${ref_band}, as reported by Fausnaugh et. al, STORM III, 2016|"| - sed "s|%FILE1|$table|"| - sed "s|%LABEL1|${echo_band} Delay with Monte Carlo Fit|"| - sed "s|%FILE2|$CMtable|"| - sed "s|%LABEL2|${echo_band} Delay with Covariance Matrix Fit|"| - sed "s|%YMIN|$ymin|"|sed "s|%YMAX|$ymax|"| - sed "s|%OUTPUTFILE|$plotfile|" > tmp.gp + sed "s|%TITLE%|Error Fit Comparison for Time Lag of $echo_band|"| + sed "s|%SUBTITLE%|referred to ${ref_band}, as reported by Fausnaugh et. al, STORM III, 2016|"| + sed "s|%FILE1%|$table|"| + sed "s|%LABEL1%|${echo_band} Delay with Monte Carlo Fit|"| + sed "s|%FILE2%|$CMtable|"| + sed "s|%LABEL2%|${echo_band} Delay with Covariance Matrix Fit|"| + sed "s|%YMIN%|$ymin|"|sed "s|%YMAX|$ymax|"| + sed "s|%OUTPUTFILE%|$plotfile|" > tmp.gp gnuplot tmp.gp done @@ -53,7 +55,7 @@ do echo Plotting PSD error fit comparison for $echo_band. - plotfile=analyses/plots/PSD_${echo_band}_error_compare.png + plotfile=analyses/plots/PSD_${echo_band}_error_compare.pdf echo_band_noUTF=$(echo $echo_band| sed 's|𝛌|λ|g'| @@ -70,14 +72,14 @@ do sed 's|Å|A|g') cat scripts/templates/psd.gp| - sed "s|%TITLE|Error Fit Comparison for PSD of $echo_band|"| - sed "s|%SUBTITLE|as reported by Fausnaugh et. al, STORM III, 2016|"| - sed "s|%FILE1|$table|"| - sed "s|%LABEL1|${echo_band} PSD with Monte Carlo Fit|"| - sed "s|%FILE2|$CMtable|"| - sed "s|%LABEL2|${echo_band} PSD with Covariance Matrix Fit|"| - sed "s|%YMIN|$ymin|"|sed "s|%YMAX|$ymax|"| - sed "s|%OUTPUTFILE|$plotfile|" > tmp.gp + sed "s|%TITLE%|Error Fit Comparison for PSD of $echo_band|"| + sed "s|%SUBTITLE%|as reported by Fausnaugh et. al, STORM III, 2016|"| + sed "s|%FILE1%|$table|"| + sed "s|%LABEL1%|${echo_band}|"| + sed "s|%FILE2%|$CMtable|"| + sed "s|%LABEL2%|${echo_band} PSD with Covariance Matrix Fit|"| + sed "s|%YMIN%|$ymin|"|sed "s|%YMAX|$ymax|"| + sed "s|%OUTPUTFILE%|$plotfile|" > tmp.gp gnuplot tmp.gp done \ No newline at end of file diff --git a/scripts/templates/timelag_compare.gp b/scripts/templates/timelag_compare.gp index e682c4c..dc04b07 100644 --- a/scripts/templates/timelag_compare.gp +++ b/scripts/templates/timelag_compare.gp @@ -1,9 +1,9 @@ -set terminal pngcairo +set terminal pdf set termoption dash set termopt enhanced -set output "%OUTPUTFILE" +set output "%OUTPUTFILE%" -set title "%TITLE\n{/*0.7 %SUBTITLE}" +set title "%TITLE%\n{/*0.7 %SUBTITLE%}" set xlabel "Temporal Frequency [days^{-1}]" set xrange [0.005:0.620] set logscale x @@ -17,5 +17,5 @@ set key center bottom # Draw line at origin set arrow from 0.005,0 to 0.620,0 nohead lt 3 lc rgb 'black' set pointsize 0 -plot '%FILE1' using 1:2:3:4 with xyerrorbars title "%LABEL1", \ -"%FILE2" using 1:2:3:4 with xyerrorbars title "%LABEL2" +plot '%FILE1%' using 1:2:3:4 with xyerrorbars title "%LABEL1%", \ +"%FILE2%" using 1:2:3:4 with xyerrorbars title "%LABEL2%"