\documentclass[10pt, aspectratio=169]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% \usepackage[ngerman]{babel}
%\usepackage{amsmath}
\usepackage{float}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{subcaption}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{xcolor}
\usepgfplotslibrary{colorbrewer}
\usepgfplotslibrary{external} 
%\tikzexternalize[prefix=build/]


\newcommand{\templates}{../lib}

% packages to be included
\input{\templates/packages.tex}

% modifications to stick to new KIT style
\input{\templates/modifications.tex}

% marcos used throughout the slides
\input{\templates/makros_own.tex}


\title{BA Besprechung - 17.12.2022}
\author{Andreas Tsouchlos}

\institute{Karlsruhe Institute of Technology (KIT), \\ Communications Engineering Lab (CEL) }


\pgfplotsset{
    discard if/.style 2 args={
        x filter/.code={
            \edef\tempa{\thisrow{#1}}
            \edef\tempb{#2}
            \ifx\tempa\tempb
                \def\pgfmathresult{inf}
            \fi
        }
    },
    discard if not/.style 2 args={
        x filter/.code={
            \edef\tempa{\thisrow{#1}}
            \edef\tempb{#2}
            \ifx\tempa\tempb
            \else
                \def\pgfmathresult{inf}
            \fi
        }
    }
}


\begin{document}
    \begin{frame}[plain]
        \maketitle
    \end{frame}
    
    \begin{frame}[t]
        \frametitle{Convergance behaviour ($n=204, k=102$)}
        
        \begin{figure}[H]
            \centering
            \includegraphics[width=0.6\textwidth, trim=2cm 2cm 2cm 2cm,clip]{res/extreme_components}
            \caption{Components with lowest $Var\left\{ \nabla h \right\} $}
        \end{figure}
    \end{frame}
    
    \begin{frame}[t]
        \frametitle{Convergance behaviour ($n=204, k=102$)}
        
        \begin{figure}[H]
            \centering
            \includegraphics[width=0.45\textwidth]{res/variances_correlation}
            \caption{Correlation between estimate variance and correctness}
        \end{figure}
    \end{frame}

    \begin{frame}[t]
        \frametitle{Proximal vs. Hybrid Proximal ML Approach}
       
        \begin{figure}[H]
            \centering
        
            \begin{tikzpicture}[scale=0.55]
                \begin{axis}[
                    grid=both,
                    xlabel={SNR}, ylabel={BER},
                    ymode=log,
                    xtick={1, 2, ..., 8},
                    xmin=0, xmax=8,
                    ymin=1e-7, ymax=0,
                ]
                    \addplot table [col sep=comma, x=SNR, y=BER, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_proximal.csv};
                    \addlegendentry{proximal}
                        \addplot table [col sep=comma, x=SNR, y=BER, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_hybrid.csv};
                    \addlegendentry{hybrid}
                \end{axis}
            \end{tikzpicture}
            \begin{tikzpicture}[scale=0.55]
                \begin{axis}[
                    grid=both,
                    xlabel={SNR}, ylabel={FER},
                    ymode=log,
                    xtick={1, 2, ..., 8},
                    xmin=0, xmax=8,
                    ymin=1e-7, ymax=0,
                ]
                    \addplot table [col sep=comma, x=SNR, y=FER, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_proximal.csv};
                    \addlegendentry{proximal}
                        \addplot table [col sep=comma, x=SNR, y=FER, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_hybrid.csv};
                    \addlegendentry{hybrid}
                \end{axis}
            \end{tikzpicture}
            \begin{tikzpicture}[scale=0.55]
                \begin{axis}[
                    grid=both,
                    xlabel={SNR}, ylabel={DFR},
                    xmin=0, xmax=8,
                    ymode=log,
                    xtick={1, 2, ..., 8},
                    ymin=1e-7, ymax=0,
                ]
                    \addplot table [col sep=comma, x=SNR, y=DFR, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_proximal.csv};
                    \addlegendentry{proximal}
                        \addplot table [col sep=comma, x=SNR, y=DFR, discard if not={gamma}{0.05}] {res/2d_ber_fer_dfr_20433484_hybrid.csv};
                    \addlegendentry{hybrid}
                \end{axis}
            \end{tikzpicture}
        
            \caption{$\gamma=0.05, \omega=0.05, K=100$}
            \label{fig:}
        \end{figure}
        

    \end{frame}
    
\end{document}
