\chapter{Results \label{sec:results}}

This chapter includes the main results of this study. The data for the plots were generated using the "New FC" Button from the main GUI described in section \ref{sec:gui:data_processing}.
The results are first split into the overall results for the different spectral types M, K, G, and F as well as combined results over all analyzed spectral types. Furthermore there is a selection of individual star results.
The results also only contain the data of folded lightcurves which could be fitted with a sine function and less than 30 iterations of the fold optimization. The data which uses polynomial fits or both sine and polynomial fits is available at \href{https://drive.google.com/drive/folders/1L_F21W3WwZicVZg9052B12B2hJNuJBwK?usp=drive_link}{google drive}.

\section{M dwarfs \label{sec:results:m_dwarfs}}

This section shows the results for all M dwarfs in this study.\\
Figures \ref{fig:M-Flarecount-10_Bins} and \ref{fig:M-Flarecount-30_Bins} show histograms, with 10 and 30 bins respectively, of the amount of flares during the normalized phase. Looking at figure \ref{fig:M-Flarecount-10_Bins} there is a rather even distribution across the whole phase, except at $0.5 \pi$. There is a clear dip in the amount of flares happening visible.\\
Looking at the same data, just with 30 bins (figure \ref{fig:M-Flarecount-30_Bins}), the same dip is visible. Additionally there also seem to be a dip at phase $1.5 \pi$.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M-Flarecount-10_Bins.png}
    \caption{Histogram of all M dwarfs with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M-Flarecount-30_Bins.png}
    \caption{Histogram of all M dwarfs with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-30_Bins}
\end{figure}

Filtering the data by the minimal flare peak (see figures \ref{fig:M-Flarecount-10_Bins_1.25_peak} to \ref{fig:M-Flarecount-30_Bins_1.5_peak}), makes the trend of figure \ref{fig:M-Flarecount-30_Bins} clearer. There are increasinly more flares in the minima (more/bigger star spots) and maxima (less/smaller star spots) compared to the transition.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M_minFlarePeak_1.25-Flarecount-10_Bins.png}
    \caption{Histogram of all M dwarfs with 10 bins across the phase showing the number of flares with normalized peak above 1.25 in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-10_Bins_1.25_peak}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M_minFlarePeak_1.25-Flarecount-30_Bins.png}
    \caption{Histogram of all M dwarfs with 30 bins across the phase showing the number of flares with normalized peak above 1.25 in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-30_Bins_1.25_peak}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M_minFlarePeak_1.5-Flarecount-10_Bins.png}
    \caption{Histogram of all M dwarfs with 10 bins across the phase showing the number of flares with normalized peak above 1.5 in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-10_Bins_1.5_peak}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/M/M_minFlarePeak_1.5-Flarecount-30_Bins.png}
    \caption{Histogram of all M dwarfs with 30 bins across the phase showing the number of flares with normalized peak above 1.5 in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:M-Flarecount-30_Bins_1.5_peak}
\end{figure}

\FloatBarrier
\section{K dwarfs \label{sec:results:k_dwarfs}}

This section shows the results for all K dwarfs in this study.\\
Figure \ref{fig:K-Flarecount-10_Bins} shows the amount of flares per phase with 10 bins of all K type dwarfs in used in this study. Overall the distribution is even, with a slight increase in flares when going from the maximum to the minimum of the lightcurve, and a slight decrease when going from minimum to maximum. There is also a peak at around $1 \pi$. This peak is dominated by $V* V471 Tau$. The plots for this are visible in section \ref{sec:results:individual}.\\
Looking at the same dataset with 30 bins for the histogram (figure \ref{fig:K-Flarecount-30_Bins}), the peak in the center is still visible. Additionally there appear more peaks at phase $>1.3 \pi$, while the amount of flares between phase $0 \pi$ and $1 \pi$ shows a light trend to more flares, with a dip right before and after the big peak which was also visible in figure \ref{fig:K-Flarecount-10_Bins} with 10 bins.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/K/K-Flarecount-10_Bins.png}
    \caption{Histogram of all K dwarfs with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:K-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/K/K-Flarecount-30_Bins.png}
    \caption{Histogram of all K dwarfs with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:K-Flarecount-30_Bins}
\end{figure}

\FloatBarrier
\section{G dwarfs \label{sec:results:g_dwarfs}}

This section shows the results for all G dwarfs in this study.\\
The first histogram over all data of G type dwarfs with 10 bins in figure \ref{fig:G-Flarecount-10_Bins} shows a rise of occuring flares in the lightcurve minima compared to the maxima. The rise in flare occurances from maxima to minima (phase $0 \pi$ to $1 \pi$) seems to be gradual, while there is a steep fall off afterwards.\\
Due to the lower number of detected flares on G type stars, the error bars in figure \ref{fig:G-Flarecount-30_Bins} are rather large. Nontheless the same peak as in figure \ref{fig:G-Flarecount-10_Bins} can be seen. It is even split into 2 peaks which are rather close together at around phase $0.6 \pi$ and $1 \pi$.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/G/G-Flarecount-10_Bins.png}
    \caption{Histogram of all G dwarfs with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:G-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/G/G-Flarecount-30_Bins.png}
    \caption{Histogram of all G dwarfs with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:G-Flarecount-30_Bins}
\end{figure}

\FloatBarrier
\section{F dwarfs \label{sec:results:f_dwarfs}}

This section shows the results for all F dwarfs in this study.\\
Due to the low number of F type stars in this study, and the difficulty to detect flares on them, the detected number of flares in figures \ref{fig:F-Flarecount-10_Bins} and \ref{fig:F-Flarecount-30_Bins} is very low which causes the errorbars of the histogram to grow very large. Nontheless all detected flares were around the minimum of the lightcurves.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/F/F-Flarecount-10_Bins.png}
    \caption{Histogram of all F dwarfs with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:F-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/F/F-Flarecount-30_Bins.png}
    \caption{Histogram of all F dwarfs with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:F-Flarecount-30_Bins}
\end{figure}

\FloatBarrier
\section{Combined results \label{sec:results:combined}}

The results for all stars in the study are shown in this chapter. The histograms in figure \ref{fig:MKGF-Flarecount-10_Bins} and \ref{fig:MKGF-Flarecount-30_Bins} are stacked histograms. The flare amount of the individual stars are per bin are stacked on top of each other resulting in the final value. The dip which was present in the histogram for the M type stars (see figure \ref{fig:M-Flarecount-10_Bins}) propagates and the dip is also visible in figure \ref{fig:MKGF-Flarecount-10_Bins}. The peak at phase $1 \pi$ is also a result of propagation, but from the K and G type star data.\\
Looking at the same data with 30 bins over the phase in figure \ref{fig:MKGF-Flarecount-30_Bins}, the propagation of the variation in the data of the M type stars is clearly visible. Additionally the peaks from the data of K (figure \ref{fig:K-Flarecount-30_Bins}) and G (figure \ref{fig:G-Flarecount-30_Bins}) type stars help to make it overall clearer to see. While there is a slight peak at around phase $1 \pi$, there are also smaller, especially less wide peaks at around phases $0.4 \pi$, $0.7 \pi$ and $1.5 \pi$. The dips in the data of the M type stars also propagate in this plot.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/MKGF-Flarecount-10_Bins.png}
    \caption{Histogram of all dwarfs (spectral types M, K, G and F) with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:MKGF-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/MKGF-Flarecount-30_Bins.png}
    \caption{Histogram of all dwarfs (spectral types M, K, G and F) with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue line indicates an idialized phase, with the minimum at phase $1 \pi$.}
    \label{fig:MKGF-Flarecount-30_Bins}
\end{figure}

\FloatBarrier
\section{Individual stars \label{sec:results:individual}}

This section contains a selection of results for individual stars. The results for this section were selected because either they match exactly what this study was looking for or because the opposite is the case.

\subsection{V* V471 Tau}

V471 Tau is a binary system consiting of a K2 type dwarf and a white dwarf (<ref>). The K2 dwarf is also tidally locked to its companion, with a large spot facing the white dwarf (ref).\\
In figure \ref{fig:V471Tau-Flarecount-10_Bins} there is a clear peak in flare count visible in the bin starting at phase $1 \pi$. There is also another peak at phase $0.5 \pi$. The histogram looks similar if the bin size is increased to 30 (figure \ref{fig:V471Tau-Flarecount-30_Bins}).\\

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau-Flarecount-10_Bins.png}
    \caption{Histogram of V471 Tau with 10 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue lines show the various fits for the folded lightcurves used to generate the data, with the minimum at phase $1 \pi$.}
    \label{fig:V471Tau-Flarecount-10_Bins}
\end{figure}

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau-Flarecount-30_Bins.png}
    \caption{Histogram of V471 Tau with 30 bins across the phase showing the number of flares in each bin. The error bar shows the standard deviation for the histogram. The blue lines show the various fits for the folded lightcurves used to generate the data, with the minimum at phase $1 \pi$.}
    \label{fig:V471Tau-Flarecount-30_Bins}
\end{figure}

Looking at the folded lightcurves for this star (see figures \ref{fig:V471Tau-TESS42_foldedLC}, \ref{fig:V471Tau-TESS43_foldedLC} and \ref{fig:V471Tau-TESS44_foldedLC}), the transit of the white dwarf (sudden dip in the folded lightcurve) is clearly visible, and always happens around phase 0.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau_TESS-42-foldedLC-marked_fit_flares.png}
    \caption{Folded lightcurve for V* V471 Tau and TESS Sector 42. The blue line shows the sine fit calculated. The red crosses indicate the detected flare peaks.}
    \label{fig:V471Tau-TESS42_foldedLC}
\end{figure}
\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau_TESS-43-foldedLC-marked_fit_flares.png}
    \caption{Folded lightcurve for V* V471 Tau and TESS Sector 43. The blue line shows the sine fit calculated. The red crosses indicate the detected flare peaks.}
    \label{fig:V471Tau-TESS43_foldedLC}
\end{figure}
\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau_TESS-44-foldedLC-marked_fit_flares.png}
    \caption{Folded lightcurve for V* V471 Tau and TESS Sector 44. The blue line shows the sine fit calculated. The red crosses indicate the detected flare peaks.}
    \label{fig:V471Tau-TESS44_foldedLC}
\end{figure}

Furthermore the distribution of flare peaks in figure \ref{fig:V471Tau-flarepeaks_1.053} show that the largest flares happen right before, during and after phase $1 \pi$, which is the phase in which the white dwarf transit happens.

\begin{figure}[pt!]
    \includegraphics[width=\linewidth]{plots/sine/V471Tau/V_star_ V471 Tau-Flarepeaks_maxY-1.0539907609848342.png}
    \caption{Distribution of flare peaks in relation to the normalized phase at which they occured. Y-Axis limited to the values of the highest peak detected.}
    \label{fig:V471Tau-flarepeaks_1.053}
\end{figure}