\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 - 13.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{Average Error vs. Mean Square Error}
       
        \begin{figure}[H]
            \begin{subfigure}[c]{0.5\textwidth}
                \centering
            
                \includegraphics[width=0.5\textwidth]{res/screenshot_cpp_avg_err}

                \vspace{2mm}

                \includegraphics[width=1\textwidth]{res/screenshot_eigen_squaredNorm}
            
                \caption{Average error as used by me}
                \label{fig:avg_error_me}
            \end{subfigure}%
            \begin{subfigure}[c]{0.5\textwidth}
                \centering
                
                \includegraphics[width=0.45\textwidth]{res/screenshot_paper_avg_err}

                \vspace{2mm}

                \includegraphics[width=0.35\textwidth]{res/screenshot_paper_norm_def}
                \caption{Average error as defined in the paper}
                \label{fig:avg_error_paper}
            \end{subfigure}%
        \end{figure}
    \end{frame}

    \begin{frame}[t]
        \frametitle{$s$ and $r$ for each iteration - successful decoding}

        \begin{figure}[H]
            \centering
        
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_0] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_0] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_0] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_1] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_1] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_1] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_2] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_2] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_2] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%

            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_3] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_3] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_3] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_4] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_4] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_4] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_5] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_5] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_5] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%

            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_6] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_6] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_6] {res/comp_bch_7_4_combined_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
        \end{figure}
    \end{frame}



    \begin{frame}[t]
        \frametitle{$s$ and $r$ for each iteration - frame error}

        \begin{figure}[H]
            \centering
        
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_0] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, y=grad_L_0] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_0] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_1] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_1] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_1] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_2] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_2] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_2] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%

            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_3] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_3] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_3] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_4] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_4] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_4] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_5] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_5] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_5] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%

            \begin{subfigure}{0.32\textwidth}
                \centering
 
                \begin{tikzpicture}[scale = 0.55]
                    \begin{axis}[
                        grid=both,
                        xlabel={k},
                        width=8cm,
                        height=3cm,
                        scale only axis,
                    ]
                        \addplot +[mark=none, line width=0.7pt] table [col sep=comma, x=k, y=comb_r_s_6] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_L_6] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addplot +[mark=none] table [col sep=comma, x=k, y=grad_h_6] {res/comp_bch_7_4_combined_no_success_no_parity.csv};
                        \addlegendentry{est}
                        \addlegendentry{$\nabla L$}
                        \addlegendentry{$\nabla h$}
                    \end{axis}
                \end{tikzpicture}
            \end{subfigure}%
        \end{figure}
    \end{frame}
    
\end{document}
