Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mkourakou committed Sep 20, 2023
0 parents commit 0262f6c
Show file tree
Hide file tree
Showing 254 changed files with 9,860 additions and 0 deletions.
435 changes: 435 additions & 0 deletions Dissertate.cls

Large diffs are not rendered by default.

Binary file added MSc_Mado_FINAL.pdf
Binary file not shown.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Evolution of Stellar Mass Function for radiogalaxies up to z ∼2.5

The present repository contains the document of "Evolution of Stellar Mass Function for radiogalaxies up to z ∼2.5" MSc thesis.




469 changes: 469 additions & 0 deletions appendices/Appendix_1_ARC_45.tex

Large diffs are not rendered by default.

83 changes: 83 additions & 0 deletions appendices/Appendix_2_BayesianMethods.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
\clearpage
\chapter{Probability, Bayesian Method and Sampling} \label{app:Bayes}



The following sections that review probability and illuminate Bayesian statistics are heavily based on the lecture notes of Elena Sellentin\footnote{\url{https://github.com/elenasellentin/Modern-Astrostatistics}}.

%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
\section{Interpretations of Probability}
Multiple concepts of "probability" have emerged over the centuries and can be unified on a mathematical level by measure theory.

\subsection*{\textit{σ}-Algebras}
For set $S$, the powerset $\mathcal{S}$ is the set of all subsets of $S$ (including the \{$ \emptyset $ \} ).
A $\sigma$-Algebra indicates countability or measurability (it is an extended notion of counting) and is defined:
\begin{itemize}
\item Let $\mathcal{A} \subseteq \mathcal{S}(S)$ be some subset of the powerset of $S$
\item $\mathcal{A}$ is a $\sigma$-Algebra if:
\begin{enumerate}
\item $\emptyset$ and $S \in \mathcal{A}$ \;\;(indicates the notion of nothing and all)
\item for all $A \in \mathcal{A}\; \Rightarrow{ } \; \overline{A}\; \coloneqq \;S/A \in \mathcal{A}$ \;\;($\overline{A}$ is the complement of $A$, indicating consistency)
\item for $A_i \in \mathcal{A}$ with $i \in \mathbb{N}$, then $\Big( \bigcup\limits_{i=1}^{\infty} A_i\Big)\in \mathcal{A}$ \;\;(conjunctions of elements are countable, indicates countability)
\end{enumerate}
\item If $\mathcal{A}$ is a $\sigma$-Algebra, then all $A_i \in \mathcal{A}$ are "$\mathcal{A}$-measurable" subsets of $S$
\item For set $S$ and $\mathcal{A}$ a $\sigma$-Algebra on it, $\big( S, \mathcal{A}\big)$ is called a "measurable space".
\end{itemize}
It follows that if $S$ some set, $I$ some range of integers $I=[1,2,...,N]$ and many $\mathcal{A}_j$ ( $j\in I$) are $\sigma$-Algebras on $S$, then
\begin{equation*}
\bigcap\limits_{j=1}^{N} \mathcal{A}_j \mbox{ is a } \sigma\mbox{-Algebra on }S
\end{equation*}
which means that combined posteriors (Bayesian updating) of a probability measure of many experiments are again a probability.\\
\subsection*{Measures}
A measure can be a generalised notion of volume, and is defined:
\begin{itemize}
\item If $\big( S, \mathcal{A}\big)$ a measurable space using set $S$ and $\sigma$-Algebra $\mathcal{A}$, then $$ \mu: \mathcal{A} \mapsto [0,\infty]$$
$\mu$ is called a "measure" if $[0,\infty]$ is $\mathbb{R}^+$, including $\infty$, and $\mu$ satisfies:
\begin{enumerate}
\item $\mu (A_i) \geq 0 \;\; \forall A_i\in \mathcal{A}\;\;$ (positive definite, generalisation of the first Kolmogorov axiom for probability measures)
\item $\mu(\emptyset) = 0 \;\;$ (empty set has measure zero, generalisation of the second Kolmogorov axiom for probability measures)
\item for $A_i, A_k \in \mathcal{A}$, when $A_i\cap A_k = \emptyset \;\; \forall i\neq k$, then $$ \sum \limits_{i=1}^{\infty} \mu(A_i) = \mu\Big( \bigcup\limits_{i=1}^{\infty} A_i\Big)$$
(indicating $\sigma$-additivity, generalisation of the third Kolmogorov axiom for probability measures)
\end{enumerate}
\item If $\big( S, \mathcal{A}\big)$ a measurable space, then $\big( S, \mathcal{A}, \mu \big)$ a measure space
\item Let $\big( S, \mathcal{A}, \mu \big)$ a measure space, $\mu$ is a probability measure
$$ \mbox{if} \;\; \mu(S) = 1 $$
\end{itemize}

\subsection*{Lebesgue Integration}
The Riemann integral is commonly used in physics where the function $f(x)$ integrated is of interest (instead of its domain of definition, which is usually the $\mathbb{R}^{\mbox{n}}$ space) and where usually the integrated function is sufficiently differentiable.\\
In statistics, integration of a function needs to be performed with respect to a measure, and the data space can be Euclidean ($\mathbb{E}^{\mbox{n}}$) since it includes discrete events and continuous events alike, thus $\mathbb{R}^{\mbox{n}}$ is insufficient. Additionally, in statistics, parametres $\mathbf{\Theta}$ span a manifold (e.g. $\vec\Theta \otimes N $), and functions $f(x)$ can be degenerate distributions or have non-existent densities. The Lebesgue integral was introduced to handle such cases. The Lebesgue integral is an integral that runs over the a working set $\mathcal{X}$ with respect to a measure $\mu : \mathcal{A} \mapsto[0, \infty]$ of measure space $(\mathcal{X}, \mathcal{A}, \mu)$, using $\sigma$-Algebra $\mathcal{A}$
\begin{equation*}
\int_{\mathcal{X}} \; f \; d\mu .
\end{equation*}
In Bayesian statistics, priors are probability measures against which Bayesian likelihoods are integrated (in the Lebesgue regime). Set $S$ is the sample space of Bayesian methods.


%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
\section{Bayesian Statistics}

Equation \ref{eq:Bayes} is called Bayes’ theorem but it does not encode what is known as ‘Bayesian statistics’, it simply follows from the laws of probability manipulations.\\
The aim of Bayesian statistics is to infer non-trivial conclusions given observables and domain expertise by marginalising on conditional probabilities. Bayesian Inference assigns "credibility" on non-observable quantities. Thence, the likelihood $\mathscr{L}$ factors signal and describes noise processes, the posterior $\mathscr{P}_{\mbox{\tiny{posterior}}}$ describes an attempt of inferring the parameter values from observed data x (inverse workflow of the likelihood), priors $\mathscr{P}_{\mbox{\tiny{prior}}}$ constrain the introduced parametres and the Bayesian evidence $\mathscr{E}$ is central for model selection. Uniform priors are not necessarily uninformative, since they do not stay flat under non-linear transformations. \\
The posterior distribution can be marginalised over in order to extract information and constraining the parametres with the data essentially accomplishes the mapping of the posterior. Samples whose number density is proportional to the posterior probability $$n(\mathbf{\Theta}) \propto \mathscr{L}(\vec{D}|\mathbf{\Theta}) \mathscr{P}_{\mbox{\tiny{prior}}}(\mathbf{\Theta}) $$ provide a guess for a Gaussian approximation $\mathcal{G}_{\mbox{\tiny{P}}}(\mathbf{\Theta})$ to the posterior and can be used to make integration trivial. Thus, integration/marginalisation can be performed for all parameters the models as well as the observables.

%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
%----------------------------------------------------------------------%
\section{Bayesian Sampling techniques}

Bayesian sampling is achieved with numerical methods and many algorithms have been developed to achieve numerical feasibility for high dimensional posteriors. Brute Force Bayesian search, Markov Chain Monte Carlo (such as Gibbs sampling, Metropolis-Hastings sampling), Nested Sampling are some of those algorithms. \\
The samples need to be representative of the distribution, otherwise biases are introduced. This means that only converged sampling sequences should be used and that (for Markov chains) random (instead of neighbouring) chainlinks must be selected for post-processing.\\
Relevant software which implements Bayesian sampling algorithms that can be used in SED fitting codes such as the one developed for the present thesis are
\begin{itemize}
\item \code{emcee}\footnote{\url{https://ascl.net/1303.002}} software\cite{emcee2013}, which implements the Affine-Invariant Ensemble Sampler\cite{EnsSampl_2010}
\item \code{ptemcee}\footnote{\url{https://ascl.net/2101.006}} software\cite{ptemcee2016}, which implements the Adaptive Parallel Tempering Ensemble Sampler\cite{ParalTemp_2014}\cite{ParalTemp_2005}
\item \code{dynesty}\footnote{\url{https://zenodo.org/record/7995596}} software\cite{Dynesty2020} which implements the Dynamic Nested Sampling algorithm\cite{Higson2019}
\item \code{UltraNest}\footnote{\url{https://ascl.net/1611.001}} software\cite{ultranest2021}, which implements the Reactive Nested Sampling algorithm\cite{NestSample_2016}\cite{NestSample_2019}
\end{itemize}
Nested Sampling algorithms are optimised to achieve a good approximation of the evidence and shape of the posterior with the most efficient possible sampling of parameter space. Unlike more traditional algorithms (e.g. MCMC), the primary aim is not to sample in detail the parameter space, although for a large number of live points this can be achieved.


131 changes: 131 additions & 0 deletions appendices/Appendix_3_Posteriors.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
\clearpage
\chapter{Posterior Distributions of Fitted Galaxies} \label{app:Poster}
The sampled posterior histograms are plotted for every source from the 45 fit sources. The title of each plot corresponds to the name identifier of the ARC radiogalaxy, on the left panels is the full sampled histogram, while on the right panels the histogram has been zoomed in the region close to the median value, with a lot more bins. The median posterior value and the 16$^{\mbox{\tiny{th}}}$ and 84$^{\mbox{\tiny{th}}}$ percentiles have been clearly marked and the values are shown in the legend.



\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/0_Posterior_10.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/1_Posterior_16.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/2_Posterior_103.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/3_Posterior_128.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/5_Posterior_145.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/6_Posterior_162.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/8_Posterior_182.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/9_Posterior_201.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/16_Posterior_1070.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/19_Posterior_1765.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/25_Posterior_1971.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/28_Posterior_2029.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/30_Posterior_2108.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/35_Posterior_3076.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/36_Posterior_3652.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/51_Posterior_4126.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/52_Posterior_4164.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/55_Posterior_4287.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/56_Posterior_4326.png} \\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/60_Posterior_4364.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/67_Posterior_4596.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/72_Posterior_4721.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/77_Posterior_4818.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/79_Posterior_4827.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/82_Posterior_5061.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/83_Posterior_5120.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/85_Posterior_5132.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/86_Posterior_5170.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/93_Posterior_5260.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/94_Posterior_5261.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/95_Posterior_5263.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/96_Posterior_5275.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/103_Posterior_5300.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/105_Posterior_5306.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/108_Posterior_5314.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/109_Posterior_5317.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/111_Posterior_5325.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/112_Posterior_5348.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/113_Posterior_5349.png}
\end{figure}

\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/114_Posterior_5353.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/115_Posterior_5355.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/116_Posterior_6000.png}
\end{figure}


\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/117_Posterior_6001.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/118_Posterior_6600.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultPosteriors/119_Posterior_8810.png}
\end{figure}




















100 changes: 100 additions & 0 deletions appendices/Appendix_4_MassDistri.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
%\clearpage
\chapter{Mass Distributions of Fitted Galaxies} \label{app:MassDistri}

The Stellar Mass probability distributions for each one of the 45 galaxies, product of the Bayesian sampling process. Multimodality is clear for certain cases. In the following figures, the left panel represents the old stellar population sampling (with ages between $1$ Gyr and the age of the Universe at the galaxy's redshift) and the right panel represents the young stellar population sampling (with ages between $10$ Myrs and $1$ Gyr). The base-ten logarithm of
stellar mass in units of M$_\odot$ is plotted, the median value is clearly denoted, as well as the 16$^{\mbox{\tiny{th}}}$ and 84$^{\mbox{\tiny{th}}}$ percentile.


\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/0_MassDistri_10.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/1_MassDistri_16.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/2_MassDistri_103.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/3_MassDistri_128.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/5_MassDistri_145.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/6_MassDistri_162.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/8_MassDistri_182.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/9_MassDistri_201.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/16_MassDistri_1070.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/19_MassDistri_1765.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/25_MassDistri_1971.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/28_MassDistri_2029.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/30_MassDistri_2108.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/35_MassDistri_3076.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/36_MassDistri_3652.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/51_MassDistri_4126.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/52_MassDistri_4164.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/55_MassDistri_4287.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/56_MassDistri_4326.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/60_MassDistri_4364.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/67_MassDistri_4596.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/72_MassDistri_4721.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/77_MassDistri_4818.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/79_MassDistri_4827.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/82_MassDistri_5061.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/83_MassDistri_5120.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/85_MassDistri_5132.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/86_MassDistri_5170.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/93_MassDistri_5260.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/94_MassDistri_5261.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/95_MassDistri_5263.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/96_MassDistri_5275.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/103_MassDistri_5300.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/105_MassDistri_5306.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/108_MassDistri_5314.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/109_MassDistri_5317.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/111_MassDistri_5325.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/112_MassDistri_5348.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/113_MassDistri_5349.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/114_MassDistri_5353.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/115_MassDistri_5355.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/116_MassDistri_6000.png}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/117_MassDistri_6001.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/118_MassDistri_6600.png}\\
\includegraphics[width=0.8\linewidth]{figures/ResultMasses/119_MassDistri_8810.png}
\end{figure}



4 changes: 4 additions & 0 deletions appendices/Appendix_5.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\clearpage
\section{Appendix}

...
Loading

0 comments on commit 0262f6c

Please sign in to comment.