Spectral lines problem added to Bayesian chapter
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
0.000000000000000000e+00 2.045602358309910052e-01 5.000000000000000278e-02
|
||||
2.020202020202020374e-02 2.545641366636055558e-01 5.000000000000000278e-02
|
||||
4.040404040404040747e-02 1.026514845488727401e-01 5.000000000000000278e-02
|
||||
6.060606060606060774e-02 1.306825233881532822e-01 5.000000000000000278e-02
|
||||
8.080808080808081495e-02 8.517542128989315231e-02 5.000000000000000278e-02
|
||||
1.010101010101010222e-01 3.204917151670839681e-01 5.000000000000000278e-02
|
||||
1.212121212121212155e-01 2.863918084290297816e-01 5.000000000000000278e-02
|
||||
1.414141414141414366e-01 3.102278142279664142e-01 5.000000000000000278e-02
|
||||
1.616161616161616299e-01 2.397413819681442904e-01 5.000000000000000278e-02
|
||||
1.818181818181818232e-01 2.488210548232008823e-01 5.000000000000000278e-02
|
||||
2.020202020202020443e-01 1.408286426465343300e-01 5.000000000000000278e-02
|
||||
2.222222222222222376e-01 2.958181805796917252e-01 5.000000000000000278e-02
|
||||
2.424242424242424310e-01 1.438336601763329503e-01 5.000000000000000278e-02
|
||||
2.626262626262626521e-01 1.667982272749587713e-01 5.000000000000000278e-02
|
||||
2.828282828282828731e-01 1.810820741595774441e-01 5.000000000000000278e-02
|
||||
3.030303030303030387e-01 1.604192455543801688e-01 5.000000000000000278e-02
|
||||
3.232323232323232598e-01 2.429774353354842431e-01 5.000000000000000278e-02
|
||||
3.434343434343434809e-01 1.884606440902203417e-01 5.000000000000000278e-02
|
||||
3.636363636363636465e-01 1.967172317007344351e-01 5.000000000000000278e-02
|
||||
3.838383838383838675e-01 1.895690079960161978e-01 5.000000000000000278e-02
|
||||
4.040404040404040886e-01 2.673457071206311042e-01 5.000000000000000278e-02
|
||||
4.242424242424242542e-01 1.696584407149840379e-01 5.000000000000000278e-02
|
||||
4.444444444444444753e-01 1.913031667211232412e-01 5.000000000000000278e-02
|
||||
4.646464646464646964e-01 2.212408817932579597e-01 5.000000000000000278e-02
|
||||
4.848484848484848619e-01 1.177909475100523823e-01 5.000000000000000278e-02
|
||||
5.050505050505050830e-01 1.760279737514665321e-01 5.000000000000000278e-02
|
||||
5.252525252525253041e-01 2.272195329078137704e-01 5.000000000000000278e-02
|
||||
5.454545454545455252e-01 2.592389511691564064e-01 5.000000000000000278e-02
|
||||
5.656565656565657463e-01 2.099530669978877384e-01 5.000000000000000278e-02
|
||||
5.858585858585858563e-01 1.699564098316690974e-01 5.000000000000000278e-02
|
||||
6.060606060606060774e-01 2.787764775054689670e-01 5.000000000000000278e-02
|
||||
6.262626262626262985e-01 2.007261290574577084e-01 5.000000000000000278e-02
|
||||
6.464646464646465196e-01 2.216645390229087520e-01 5.000000000000000278e-02
|
||||
6.666666666666667407e-01 2.419708917089329336e-01 5.000000000000000278e-02
|
||||
6.868686868686869618e-01 2.484716339819664221e-01 5.000000000000000278e-02
|
||||
7.070707070707071829e-01 2.507393634238597180e-01 5.000000000000000278e-02
|
||||
7.272727272727272929e-01 3.363748974886562881e-01 5.000000000000000278e-02
|
||||
7.474747474747475140e-01 2.983768886801034803e-01 5.000000000000000278e-02
|
||||
7.676767676767677351e-01 3.840909497538609885e-01 5.000000000000000278e-02
|
||||
7.878787878787879562e-01 4.479569143719117630e-01 5.000000000000000278e-02
|
||||
8.080808080808081773e-01 4.844715214588726226e-01 5.000000000000000278e-02
|
||||
8.282828282828283983e-01 5.976316002844366260e-01 5.000000000000000278e-02
|
||||
8.484848484848485084e-01 6.577895315197946902e-01 5.000000000000000278e-02
|
||||
8.686868686868687295e-01 7.028036645779731639e-01 5.000000000000000278e-02
|
||||
8.888888888888889506e-01 7.288319015696708147e-01 5.000000000000000278e-02
|
||||
9.090909090909091717e-01 7.913858491380632021e-01 5.000000000000000278e-02
|
||||
9.292929292929293927e-01 8.691595656055085550e-01 5.000000000000000278e-02
|
||||
9.494949494949496138e-01 8.534312854349664912e-01 5.000000000000000278e-02
|
||||
9.696969696969697239e-01 6.716210462049806429e-01 5.000000000000000278e-02
|
||||
9.898989898989899450e-01 9.238740215395832012e-01 5.000000000000000278e-02
|
||||
1.010101010101010166e+00 8.302543306907418375e-01 5.000000000000000278e-02
|
||||
1.030303030303030498e+00 9.112055035160434580e-01 5.000000000000000278e-02
|
||||
1.050505050505050608e+00 1.098999929845037249e+00 5.000000000000000278e-02
|
||||
1.070707070707070718e+00 1.125210780272184685e+00 5.000000000000000278e-02
|
||||
1.090909090909091050e+00 1.366288754958713936e+00 5.000000000000000278e-02
|
||||
1.111111111111111160e+00 1.401304038423877962e+00 5.000000000000000278e-02
|
||||
1.131313131313131493e+00 1.373100333683934249e+00 5.000000000000000278e-02
|
||||
1.151515151515151603e+00 1.338849183651848129e+00 5.000000000000000278e-02
|
||||
1.171717171717171713e+00 1.401033011369570591e+00 5.000000000000000278e-02
|
||||
1.191919191919192045e+00 1.367368916279355417e+00 5.000000000000000278e-02
|
||||
1.212121212121212155e+00 1.198067106322328268e+00 5.000000000000000278e-02
|
||||
1.232323232323232487e+00 1.150942116467333243e+00 5.000000000000000278e-02
|
||||
1.252525252525252597e+00 9.371508915599138234e-01 5.000000000000000278e-02
|
||||
1.272727272727272929e+00 8.054849531118108974e-01 5.000000000000000278e-02
|
||||
1.292929292929293039e+00 6.170099189041289289e-01 5.000000000000000278e-02
|
||||
1.313131313131313149e+00 5.361821573773042360e-01 5.000000000000000278e-02
|
||||
1.333333333333333481e+00 4.122424782787775244e-01 5.000000000000000278e-02
|
||||
1.353535353535353591e+00 2.569512243282854325e-01 5.000000000000000278e-02
|
||||
1.373737373737373924e+00 4.218469724851844904e-01 5.000000000000000278e-02
|
||||
1.393939393939394034e+00 2.538969251261182780e-01 5.000000000000000278e-02
|
||||
1.414141414141414366e+00 2.424381004001986140e-01 5.000000000000000278e-02
|
||||
1.434343434343434476e+00 2.875848351059635544e-01 5.000000000000000278e-02
|
||||
1.454545454545454586e+00 2.170992874173950093e-01 5.000000000000000278e-02
|
||||
1.474747474747474918e+00 2.169275468020382125e-01 5.000000000000000278e-02
|
||||
1.494949494949495028e+00 2.245820631018525526e-01 5.000000000000000278e-02
|
||||
1.515151515151515360e+00 1.439637075155736912e-01 5.000000000000000278e-02
|
||||
1.535353535353535470e+00 2.769531626421732895e-01 5.000000000000000278e-02
|
||||
1.555555555555555580e+00 2.183486365700718357e-01 5.000000000000000278e-02
|
||||
1.575757575757575912e+00 1.695943326071193691e-01 5.000000000000000278e-02
|
||||
1.595959595959596022e+00 2.465699196295882412e-01 5.000000000000000278e-02
|
||||
1.616161616161616355e+00 2.178485819902207798e-01 5.000000000000000278e-02
|
||||
1.636363636363636465e+00 1.524007316103576648e-01 5.000000000000000278e-02
|
||||
1.656565656565656797e+00 2.075996029196477133e-01 5.000000000000000278e-02
|
||||
1.676767676767676907e+00 2.000328758876178392e-01 5.000000000000000278e-02
|
||||
1.696969696969697017e+00 2.167515439073000871e-01 5.000000000000000278e-02
|
||||
1.717171717171717349e+00 2.187400935358732590e-01 5.000000000000000278e-02
|
||||
1.737373737373737459e+00 2.356908465595017876e-01 5.000000000000000278e-02
|
||||
1.757575757575757791e+00 1.399593375962520925e-01 5.000000000000000278e-02
|
||||
1.777777777777777901e+00 2.000690613790250538e-01 5.000000000000000278e-02
|
||||
1.797979797979798233e+00 1.539269995685345616e-01 5.000000000000000278e-02
|
||||
1.818181818181818343e+00 2.248113935469663593e-01 5.000000000000000278e-02
|
||||
1.838383838383838453e+00 1.334166666195558126e-01 5.000000000000000278e-02
|
||||
1.858585858585858785e+00 9.047147561014769190e-02 5.000000000000000278e-02
|
||||
1.878787878787878896e+00 1.781963967637954782e-01 5.000000000000000278e-02
|
||||
1.898989898989899228e+00 3.272543608718180286e-01 5.000000000000000278e-02
|
||||
1.919191919191919338e+00 2.575040638675767379e-01 5.000000000000000278e-02
|
||||
1.939393939393939448e+00 2.042222733393647682e-01 5.000000000000000278e-02
|
||||
1.959595959595959780e+00 3.243123897549463619e-01 5.000000000000000278e-02
|
||||
1.979797979797979890e+00 1.902822298693580827e-01 5.000000000000000278e-02
|
||||
2.000000000000000000e+00 1.906893326229259777e-01 5.000000000000000278e-02
|
||||
@@ -0,0 +1,497 @@
|
||||
|
||||
% Default to the notebook output style
|
||||
|
||||
|
||||
|
||||
|
||||
% Inherit from the specified cell style.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\documentclass{article}
|
||||
|
||||
|
||||
|
||||
\usepackage{graphicx} % Used to insert images
|
||||
\usepackage{adjustbox} % Used to constrain images to a maximum size
|
||||
\usepackage{color} % Allow colors to be defined
|
||||
\usepackage{enumerate} % Needed for markdown enumerations to work
|
||||
\usepackage{geometry} % Used to adjust the document margins
|
||||
\usepackage{amsmath} % Equations
|
||||
\usepackage{amssymb} % Equations
|
||||
\usepackage{eurosym} % defines \euro
|
||||
\usepackage[mathletters]{ucs} % Extended unicode (utf-8) support
|
||||
\usepackage[utf8x]{inputenc} % Allow utf-8 characters in the tex document
|
||||
\usepackage{fancyvrb} % verbatim replacement that allows latex
|
||||
\usepackage{grffile} % extends the file name processing of package graphics
|
||||
% to support a larger range
|
||||
% The hyperref package gives us a pdf with properly built
|
||||
% internal navigation ('pdf bookmarks' for the table of contents,
|
||||
% internal cross-reference links, web links for URLs, etc.)
|
||||
\usepackage{hyperref}
|
||||
\usepackage{longtable} % longtable support required by pandoc >1.10
|
||||
\usepackage{booktabs} % table support for pandoc > 1.12.2
|
||||
\usepackage{ulem} % ulem is needed to support strikethroughs (\sout)
|
||||
|
||||
|
||||
|
||||
|
||||
\definecolor{orange}{cmyk}{0,0.4,0.8,0.2}
|
||||
\definecolor{darkorange}{rgb}{.71,0.21,0.01}
|
||||
\definecolor{darkgreen}{rgb}{.12,.54,.11}
|
||||
\definecolor{myteal}{rgb}{.26, .44, .56}
|
||||
\definecolor{gray}{gray}{0.45}
|
||||
\definecolor{lightgray}{gray}{.95}
|
||||
\definecolor{mediumgray}{gray}{.8}
|
||||
\definecolor{inputbackground}{rgb}{.95, .95, .85}
|
||||
\definecolor{outputbackground}{rgb}{.95, .95, .95}
|
||||
\definecolor{traceback}{rgb}{1, .95, .95}
|
||||
% ansi colors
|
||||
\definecolor{red}{rgb}{.6,0,0}
|
||||
\definecolor{green}{rgb}{0,.65,0}
|
||||
\definecolor{brown}{rgb}{0.6,0.6,0}
|
||||
\definecolor{blue}{rgb}{0,.145,.698}
|
||||
\definecolor{purple}{rgb}{.698,.145,.698}
|
||||
\definecolor{cyan}{rgb}{0,.698,.698}
|
||||
\definecolor{lightgray}{gray}{0.5}
|
||||
|
||||
% bright ansi colors
|
||||
\definecolor{darkgray}{gray}{0.25}
|
||||
\definecolor{lightred}{rgb}{1.0,0.39,0.28}
|
||||
\definecolor{lightgreen}{rgb}{0.48,0.99,0.0}
|
||||
\definecolor{lightblue}{rgb}{0.53,0.81,0.92}
|
||||
\definecolor{lightpurple}{rgb}{0.87,0.63,0.87}
|
||||
\definecolor{lightcyan}{rgb}{0.5,1.0,0.83}
|
||||
|
||||
% commands and environments needed by pandoc snippets
|
||||
% extracted from the output of `pandoc -s`
|
||||
\providecommand{\tightlist}{%
|
||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
|
||||
% Add ',fontsize=\small' for more characters per line
|
||||
\newenvironment{Shaded}{}{}
|
||||
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
|
||||
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
|
||||
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
|
||||
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
|
||||
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
|
||||
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
|
||||
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
|
||||
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
|
||||
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
|
||||
\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
|
||||
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
|
||||
\newcommand{\RegionMarkerTok}[1]{{#1}}
|
||||
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
|
||||
\newcommand{\NormalTok}[1]{{#1}}
|
||||
|
||||
% Additional commands for more recent versions of Pandoc
|
||||
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}}
|
||||
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
|
||||
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
|
||||
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{{#1}}}
|
||||
\newcommand{\ImportTok}[1]{{#1}}
|
||||
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{{#1}}}}
|
||||
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
|
||||
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
|
||||
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{{#1}}}
|
||||
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
|
||||
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{{#1}}}
|
||||
\newcommand{\BuiltInTok}[1]{{#1}}
|
||||
\newcommand{\ExtensionTok}[1]{{#1}}
|
||||
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{{#1}}}
|
||||
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}}
|
||||
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
|
||||
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
|
||||
|
||||
|
||||
% Define a nice break command that doesn't care if a line doesn't already
|
||||
% exist.
|
||||
\def\br{\hspace*{\fill} \\* }
|
||||
% Math Jax compatability definitions
|
||||
\def\gt{>}
|
||||
\def\lt{<}
|
||||
% Document parameters
|
||||
\title{A spectral line problem}
|
||||
|
||||
\author{Christian Forss\'en, Department of Physics, Chalmers}
|
||||
|
||||
|
||||
% Pygments definitions
|
||||
|
||||
\makeatletter
|
||||
\def\PY@reset{\let\PY@it=\relax \let\PY@bf=\relax%
|
||||
\let\PY@ul=\relax \let\PY@tc=\relax%
|
||||
\let\PY@bc=\relax \let\PY@ff=\relax}
|
||||
\def\PY@tok#1{\csname PY@tok@#1\endcsname}
|
||||
\def\PY@toks#1+{\ifx\relax#1\empty\else%
|
||||
\PY@tok{#1}\expandafter\PY@toks\fi}
|
||||
\def\PY@do#1{\PY@bc{\PY@tc{\PY@ul{%
|
||||
\PY@it{\PY@bf{\PY@ff{#1}}}}}}}
|
||||
\def\PY#1#2{\PY@reset\PY@toks#1+\relax+\PY@do{#2}}
|
||||
|
||||
\expandafter\def\csname PY@tok@s\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kd\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@c\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@bp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@ss\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@w\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
|
||||
\expandafter\def\csname PY@tok@s1\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gp\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@m\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@il\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gd\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@k\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@cpf\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sd\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@vc\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PY@tok@na\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.49,0.56,0.16}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@ch\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@no\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gs\endcsname{\let\PY@bf=\textbf}
|
||||
\expandafter\def\csname PY@tok@mo\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@si\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gh\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@mb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@go\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.53,0.53,0.53}{##1}}}
|
||||
\expandafter\def\csname PY@tok@s2\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sx\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nv\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kt\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.69,0.00,0.25}{##1}}}
|
||||
\expandafter\def\csname PY@tok@mh\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@ow\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.67,0.13,1.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gr\endcsname{\def\PY@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kc\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@cm\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kr\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@se\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@ne\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.82,0.25,0.23}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gu\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.13,0.13}{##1}}}
|
||||
\expandafter\def\csname PY@tok@vg\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nt\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@cs\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@cp\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.74,0.48,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@mi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@kn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@o\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@c1\endcsname{\let\PY@it=\textit\def\PY@tc##1{\textcolor[rgb]{0.25,0.50,0.50}{##1}}}
|
||||
\expandafter\def\csname PY@tok@mf\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
|
||||
\expandafter\def\csname PY@tok@vi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.10,0.09,0.49}{##1}}}
|
||||
\expandafter\def\csname PY@tok@sr\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.73,0.40,0.53}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nl\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.63,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nb\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.50,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@nn\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.00,0.00,1.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@gi\endcsname{\def\PY@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
|
||||
\expandafter\def\csname PY@tok@ni\endcsname{\let\PY@bf=\textbf\def\PY@tc##1{\textcolor[rgb]{0.60,0.60,0.60}{##1}}}
|
||||
\expandafter\def\csname PY@tok@err\endcsname{\def\PY@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
|
||||
\expandafter\def\csname PY@tok@ge\endcsname{\let\PY@it=\textit}
|
||||
|
||||
\def\PYZbs{\char`\\}
|
||||
\def\PYZus{\char`\_}
|
||||
\def\PYZob{\char`\{}
|
||||
\def\PYZcb{\char`\}}
|
||||
\def\PYZca{\char`\^}
|
||||
\def\PYZam{\char`\&}
|
||||
\def\PYZlt{\char`\<}
|
||||
\def\PYZgt{\char`\>}
|
||||
\def\PYZsh{\char`\#}
|
||||
\def\PYZpc{\char`\%}
|
||||
\def\PYZdl{\char`\$}
|
||||
\def\PYZhy{\char`\-}
|
||||
\def\PYZsq{\char`\'}
|
||||
\def\PYZdq{\char`\"}
|
||||
\def\PYZti{\char`\~}
|
||||
% for compatibility with earlier versions
|
||||
\def\PYZat{@}
|
||||
\def\PYZlb{[}
|
||||
\def\PYZrb{]}
|
||||
\makeatother
|
||||
|
||||
|
||||
% Exact colors from NB
|
||||
\definecolor{incolor}{rgb}{0.0, 0.0, 0.5}
|
||||
\definecolor{outcolor}{rgb}{0.545, 0.0, 0.0}
|
||||
|
||||
|
||||
|
||||
|
||||
% Prevent overflowing lines due to hard-to-break entities
|
||||
\sloppy
|
||||
% Setup hyperref package
|
||||
\hypersetup{
|
||||
breaklinks=true, % so long urls are correctly broken across lines
|
||||
colorlinks=true,
|
||||
urlcolor=blue,
|
||||
linkcolor=darkorange,
|
||||
citecolor=darkgreen,
|
||||
}
|
||||
% Slightly bigger margins than the latex defaults
|
||||
|
||||
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
|
||||
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
|
||||
\maketitle
|
||||
|
||||
|
||||
|
||||
|
||||
See e.g.~Section 4.2 in Sivia for a similar problem formulation. In
|
||||
short, we have data from a spectroscopy experiment that supposedly shows
|
||||
a number of spectral lines. The ideal spectrum ca be expressed as
|
||||
|
||||
\[ G(x) = \sum_{j=1}^M A_j f(x,x_j),\]
|
||||
|
||||
where \(A_j\) is the amplitude of the \(j\)th line, and \(x_j\)
|
||||
represents its position. If all the spectral lines were Gaussians of
|
||||
width \(W\), for example, then
|
||||
|
||||
\[ f(x,x_j) = \exp \left[ - \frac{(x-x_j)^2}{2 W^2} \right]\]
|
||||
|
||||
includes a background signal \(\{ B_k\}\). We use the label `\(k\)' to
|
||||
enumerate the positions \(\{x_k\}\).
|
||||
|
||||
The ideal spectrum according to our model is therefore
|
||||
|
||||
\[ F_k \equiv F(x_k) = G(x_k) + B(x_k).\]
|
||||
|
||||
The experimental data is denoted \(\{ D_k\}\). This data also includes
|
||||
measurement errors \(\{ \varepsilon_k\}\) that are assumed to be
|
||||
independent and identically distributed (IID) normal with some variance
|
||||
\(\sigma_k\). The measured data is then related to the ideal spectrum by
|
||||
|
||||
\[ D_k \equiv D(x_k) = G(x_k) + B(x_k) + \varepsilon(x_k).\]
|
||||
|
||||
A simulated data set is shown in the figure.
|
||||
\begin{center}
|
||||
\adjustimage{max size={0.8\linewidth}{0.8\paperheight}}{spectral_lines_files/spectral_lines_22_0.png}
|
||||
\end{center}
|
||||
{ \hspace*{\fill} \\}
|
||||
|
||||
|
||||
\paragraph{Problem task:}
|
||||
The task is to infer the positions (\(x_j\)) and amplitudes (\(A_j\)) of
|
||||
the spectral lines from the experimental data.
|
||||
|
||||
\subsection*{Known information}
|
||||
%
|
||||
Let us use a model that assumes two spectral lines. In addition we
|
||||
assert the following known information:
|
||||
%
|
||||
\begin{enumerate}
|
||||
\item a known, constant background ($B$).
|
||||
\item a known, natural width
|
||||
(W) of the spectral lines (the same for both).
|
||||
\item a known variance ($\sigma_k$) for the IID
|
||||
normal experimental errors.
|
||||
\item a known and relevant interval $[x_\mathrm{min},
|
||||
x_\mathrm{max}]$ in position space.
|
||||
\end{enumerate}
|
||||
%
|
||||
The following numerical data is used in this example:
|
||||
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
Constant background: B\_k = B = 0.2
|
||||
Natural width of spectral lines: W = 0.1
|
||||
Variance for IID normal exp errors: s = 0.05
|
||||
Relevant range in position space: [xmin, xmax] = [0.0, 2.0]
|
||||
\end{Verbatim}
|
||||
|
||||
|
||||
\subsection*{Suggested solution strategy---known number of spectral lines}\label{solution-strategy}
|
||||
|
||||
Assuming that our model \(M\) describes a spectrum with two spectral
|
||||
lines, it will have five model parameters. We denote them by the vector
|
||||
\(\vec{\alpha}\). These are the amplitudes and positions of the two
|
||||
lines (the width is assumed to be known), and the
|
||||
constant background. We order them as follows:
|
||||
|
||||
\[ \vec{\alpha} = (A_0, x_0, A_1, x_1, B).\]
|
||||
|
||||
The background strength ($B$) is a \emph{nuisance parameter} in the sense that
|
||||
we're not really interested in its value, we just need to marginalize
|
||||
over it.
|
||||
|
||||
We start with wirting down Bayes' theorem
|
||||
|
||||
\[ p(\alpha | \{D_k\}, I) = \frac{p(\{D_k\} | \vec{\alpha}, I) p(\vec{\alpha}|I)}{p(\{D_k\} | I)},\]
|
||||
|
||||
where the prior information includes expectations of the number of peaks
|
||||
(two in this case, their natural width, the experimental errors, etc).
|
||||
In the following, we will ignore the denominator (the \emph{evidence} or
|
||||
\emph{marginal likelihood}) as it just constitutes a normalization
|
||||
factor to the posterior pdf (the left hand side), which is the quantity
|
||||
that we are interested in.
|
||||
|
||||
It is your task, however, to make reasonable assumptions for the prior
|
||||
(\emph{hint:} uniform ones are easy to work with). We can assume that
|
||||
the available information implies that we expect the amplitude to be a
|
||||
positive quantity, and that it is expeted to be of order 1 (i.e.~not
|
||||
10). The peak positions can be assumed to be in the {[}xmin, xmax{]}
|
||||
range of the data, and the background signal is supposedly at least an
|
||||
order of magnitude smaller than the peak amplitudes.
|
||||
|
||||
Concerning the \emph{likelihood} (the first factor in the nominator),
|
||||
our information on the IID errors of the experiment leads to the
|
||||
least-squares likelihood (see Sivia, Sec. 3.5):
|
||||
|
||||
\[ p(\{D_k\} | \vec{\alpha}, I) \propto \exp(-\chi^2/2),\]
|
||||
|
||||
where the chi-squared function is defined by the sum of squared
|
||||
\emph{residuals}
|
||||
|
||||
\[ \chi^2 = \sum_{k=1}^N \left( \frac{F_k - D_k}{\sigma_k} \right)^2.\]
|
||||
|
||||
Note that the normalization factor of the likelihood (involving the
|
||||
product of terms \(\sqrt{2\pi}\sigma_k\)) has been omitted as it does
|
||||
not depend on the parameters of our model.
|
||||
|
||||
\subsection*{Simulated data}
|
||||
|
||||
It can be
|
||||
loaded from the file \texttt{data\_spectral\_lines.txt}. The columns
|
||||
of this file correspond to the data triples: $(x_k, D_k, \sigma_k)$, as
|
||||
also listed below.
|
||||
|
||||
\begin{Verbatim}[commandchars=\\\{\}]
|
||||
\# x\_k D\_k s\_k
|
||||
\# ---- ---- ---
|
||||
0.0000 0.2046 0.1
|
||||
0.0202 0.2546 0.1
|
||||
0.0404 0.1027 0.1
|
||||
0.0606 0.1307 0.1
|
||||
0.0808 0.0852 0.1
|
||||
0.1010 0.3205 0.1
|
||||
0.1212 0.2864 0.1
|
||||
0.1414 0.3102 0.1
|
||||
0.1616 0.2397 0.1
|
||||
0.1818 0.2488 0.1
|
||||
0.2020 0.1408 0.1
|
||||
0.2222 0.2958 0.1
|
||||
0.2424 0.1438 0.1
|
||||
0.2626 0.1668 0.1
|
||||
0.2828 0.1811 0.1
|
||||
0.3030 0.1604 0.1
|
||||
0.3232 0.2430 0.1
|
||||
0.3434 0.1885 0.1
|
||||
0.3636 0.1967 0.1
|
||||
0.3838 0.1896 0.1
|
||||
0.4040 0.2673 0.1
|
||||
0.4242 0.1697 0.1
|
||||
0.4444 0.1913 0.1
|
||||
0.4646 0.2212 0.1
|
||||
0.4848 0.1178 0.1
|
||||
0.5051 0.1760 0.1
|
||||
0.5253 0.2272 0.1
|
||||
0.5455 0.2592 0.1
|
||||
0.5657 0.2100 0.1
|
||||
0.5859 0.1700 0.1
|
||||
0.6061 0.2788 0.1
|
||||
0.6263 0.2007 0.1
|
||||
0.6465 0.2217 0.1
|
||||
0.6667 0.2420 0.1
|
||||
0.6869 0.2485 0.1
|
||||
0.7071 0.2507 0.1
|
||||
0.7273 0.3364 0.1
|
||||
0.7475 0.2984 0.1
|
||||
0.7677 0.3841 0.1
|
||||
0.7879 0.4480 0.1
|
||||
0.8081 0.4845 0.1
|
||||
0.8283 0.5976 0.1
|
||||
0.8485 0.6578 0.1
|
||||
0.8687 0.7028 0.1
|
||||
0.8889 0.7288 0.1
|
||||
0.9091 0.7914 0.1
|
||||
0.9293 0.8692 0.1
|
||||
0.9495 0.8534 0.1
|
||||
0.9697 0.6716 0.1
|
||||
0.9899 0.9239 0.1
|
||||
1.0101 0.8303 0.1
|
||||
1.0303 0.9112 0.1
|
||||
1.0505 1.0990 0.1
|
||||
1.0707 1.1252 0.1
|
||||
1.0909 1.3663 0.1
|
||||
1.1111 1.4013 0.1
|
||||
1.1313 1.3731 0.1
|
||||
1.1515 1.3388 0.1
|
||||
1.1717 1.4010 0.1
|
||||
1.1919 1.3674 0.1
|
||||
1.2121 1.1981 0.1
|
||||
1.2323 1.1509 0.1
|
||||
1.2525 0.9372 0.1
|
||||
1.2727 0.8055 0.1
|
||||
1.2929 0.6170 0.1
|
||||
1.3131 0.5362 0.1
|
||||
1.3333 0.4122 0.1
|
||||
1.3535 0.2570 0.1
|
||||
1.3737 0.4218 0.1
|
||||
1.3939 0.2539 0.1
|
||||
1.4141 0.2424 0.1
|
||||
1.4343 0.2876 0.1
|
||||
1.4545 0.2171 0.1
|
||||
1.4747 0.2169 0.1
|
||||
1.4949 0.2246 0.1
|
||||
1.5152 0.1440 0.1
|
||||
1.5354 0.2770 0.1
|
||||
1.5556 0.2183 0.1
|
||||
1.5758 0.1696 0.1
|
||||
1.5960 0.2466 0.1
|
||||
1.6162 0.2178 0.1
|
||||
1.6364 0.1524 0.1
|
||||
1.6566 0.2076 0.1
|
||||
1.6768 0.2000 0.1
|
||||
1.6970 0.2168 0.1
|
||||
1.7172 0.2187 0.1
|
||||
1.7374 0.2357 0.1
|
||||
1.7576 0.1400 0.1
|
||||
1.7778 0.2001 0.1
|
||||
1.7980 0.1539 0.1
|
||||
1.8182 0.2248 0.1
|
||||
1.8384 0.1334 0.1
|
||||
1.8586 0.0905 0.1
|
||||
1.8788 0.1782 0.1
|
||||
1.8990 0.3273 0.1
|
||||
1.9192 0.2575 0.1
|
||||
1.9394 0.2042 0.1
|
||||
1.9596 0.3243 0.1
|
||||
1.9798 0.1903 0.1
|
||||
2.0000 0.1907 0.1
|
||||
\end{Verbatim}
|
||||
|
||||
\subsection*{Possible extension 1:}\label{extension-1}
|
||||
|
||||
Assume that the detectors are characterized by a finite resolution that
|
||||
is described by a resolution function so that the ideal data is related
|
||||
to the ideal spectrum
|
||||
\[ \tilde{D}_k = \int G(x) R(x_k - x) dx + B(x_k) + \sigma(x_k),\] where
|
||||
we have implicitly assumed that the resolution function \(R(x)\) does
|
||||
not vary with position in writing the blurring process as a convolution
|
||||
integral.
|
||||
|
||||
\subsection*{Possible extension 2:}\label{extension-2}
|
||||
|
||||
A possible extension of this problem is to compare the model evidences
|
||||
for two competing hypothesis of the number of spectral lines in the
|
||||
data. E.g. compute the evidence for a model \(M_1\) that corresponds to
|
||||
the hypothesis that the experimental data can be explained with \emph{a
|
||||
single} spectral line, and model \(M_2\) that assumes \emph{two}
|
||||
spectral lines.
|
||||
|
||||
% Add a bibliography block to the postdoc
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 192 KiB |
Reference in New Issue
Block a user