gui updates

This commit is contained in:
2025-04-01 17:04:57 +02:00
parent 52d7fd8385
commit 9b5c4e679b
4 changed files with 38 additions and 8 deletions
@@ -1,16 +1,16 @@
% !TEX root = ../thesis-example.tex
%
\chapter{Data}
\chapter{Data and Methods}
\label{sec:data}
This chapter will explain how the used data was gathered, as well as the criteria for which data was used for the final results. Lastly, I will describe the algorithms used.
In this chapter the selection criteria for the data is explained is section \ref{sec:data:data_selection}. Furthermore a detailed description of the algorithm is given in section \ref{sec:data:data_reduction}.
\section{Data selection}
\label{sec:data:data_selection}
\section{Data reduction}
\section{Data reduction algorithms}
\label{sec:data:data_reduction}
@@ -1,7 +1,11 @@
\chapter{GUI}
\label{sec:gui}
During the first startup the GUI window (e.g. in figure \ref{fig:full_gui_normal_selection}) is nearly completely empty. Also an empty local database will be created with SQLite3 (\cite{sqlite}). To show lightcurves, first data needs to be downloaded. For that, the "Add" button has to be clicked. A new dialog window will show. It can be seen in figure \ref{fig:download_new_star_data_gui}. This GUI uses the astroquery (\cite{astroquery}) python package to fetch metadata and download fits files from MAST (\cite{mast}).\\
In this chapter the usage of the developed GUI application is explained. It was developed to easily download new data, as well as try various algorithms for flare detection and the usage of various functions of the lightkurve python package (\cite{lightkurve}).
\section{Data download}
During the first startup the GUI window (e.g. in figure \ref{fig:full_gui_normal_selection}) is nearly completely empty. An empty local database will be created with SQLite3 (\cite{sqlite}). To show lightcurves, first data needs to be downloaded. For that, the "Add" button has to be clicked. A new dialog window will show. It can be seen in figure \ref{fig:download_new_star_data_gui}. This GUI uses the astroquery (\cite{astroquery}) python package to fetch metadata and download fits files from MAST (Mikulski Archive for Space Telescopes).\\
The first step is to enter the identifier of the star(s). In case of multiple, they have to be seperated by a semicolon. Then the missions from which the data should be fetched can be selected. The supported missions are TESS and Kepler/K2. For Kepler and K2 short and/or long cadence can be selected. The differeces are described in section \ref{sec:intro:space_missions}. After the selection has been made, the fetch button needs to be pressed. The program will then request metadata matching the star identifier(s) and selected missions from the MAST archive. The found mission data is then displayed in the preview field. It can then be downloaded by pressing the "Ok" button. The program the proceeds to download the according fits-files. The filename and TESS sector or Kepler/K2 target table ID is appended to the previously fetched metadata and handed back to the main GUI.\\
There a request to Simbad is made to fetch additional metadata. First the alternative identifiers are fetched from Simbad, which also has a MAIN\_ID attribute. This is to make sure we only have one entry in the local database per star and no duplicates. Afterwards additional data is fetched from Simbad (\cite{simbad}) like spectral type, radial velocity and distance. After the data is gathered, the main identifier, the alternative identifiers, spectral type, rotational velocity and distance (and their respective units) as well as the file path, source (TESS, Kepler or K2), and sector/target table id are saved into a local database using SQLite3 (\cite{sqlite}).
@@ -11,7 +15,10 @@ There a request to Simbad is made to fetch additional metadata. First the altern
\label{fig:download_new_star_data_gui}
\end{figure}
Afterwards the list of stars seen in figure \ref{fig:full_gui_normal_selection} will be refreshed. It shows the via Simbad determined main identifier alphabetically sorted. When one of the stars in the list is selected, the program will show the additional saved informations. This includes all known IDs (in the Alt. IDs list), the spectral type, its rotational velocity and its distance. Additionally a fit type for the folded lightcurves which are described in section \ref{sec:data:data_reduction}. The default for this is "sine". The list to the right of the information section shows the available fit files. The formating for the list entries is "TESS - <sequence>" and "Kepler/K2 - <target table id>". The combine button allows to show multiple fit files at once if multiple are selected. Select one or combining multiple fit files, enables the plot options.\\
\section{Data display and manipulation}
Afterwards the list of stars seen in figure \ref{fig:full_gui_normal_selection} will be refreshed. It shows the via Simbad determined main identifier alphabetically sorted.\\
When one of the stars in the list is selected, the program will show the additional saved informations. This includes all known IDs (in the Alt. IDs list), the spectral type, its rotational velocity and its distance. Additionally a fit type for the folded lightcurves which are described in section \ref{sec:data:data_reduction}. The default for this is "sine". The list to the right of the information section shows the available fit files. The formating for the list entries is "TESS - <sequence>" and "Kepler/K2 - <target table id>". The combine button allows to show multiple fit files at once if multiple are selected. Select one or combining multiple fit files, enables the plot options.\\
The main plot options allow the user to change the type of flux thats plotted. This is either "SAP\_FLUX" (simple aperture photometry) or "PDCSAP\_FLUX" (presearch data conditioning simple aperture photometry) (\cite{lightkurve}). The PDCSAP\_FLUX has parts of its data removed depending on the quality flags (e.g. indicating systematic errors like an attitude tweak or a cosmic ray (\cite{tess_science_data_products}, \cite{kepler_archive_manual})) as well as corrected long-term brightness changes (\cite{lightkurve}). An example of a PDCSAP\_FLUX is shown in figure \ref{fig:full_gui_normal_selection}.\\
The lightkurve python package also supports normalizing (to unscaled, percent, parts per thousands (ppt) or parts per million (ppm)) which can be seen in figure \ref{fig:full_gui_normal_selection_normalize_options}. Flattened lightcurves (see figure \ref{fig:full_gui_normal_selection_flattened} as an example for $BD-08\ 995$) is used to identify flares. The "remove outliers", "remove nans/infs" and "bin" features are exposed in the GUI, but are not actively used in this thesis.\\
The checkboxes to flatten the lightcurve (figure \ref{fig:full_gui_normal_selection_flattened}), fold the lighhtcurve (figure \ref{fig:full_gui_normal_selection_folded}) and showing the periodogram (figures \ref{fig:full_gui_normal_selection_periodogram_lombscargle} and \ref{fig:full_gui_normal_selection_periodogram_boxleastsquares}) are exclusive of each other. Only one can be used at a time.
@@ -57,3 +64,24 @@ The checkboxes to flatten the lightcurve (figure \ref{fig:full_gui_normal_select
\caption{Main GUI window. Showing the periodogram of the lightcurve in figure \ref{fig:full_gui_normal_selection} using the box least square algorithm. Similarly to figure \ref{fig:full_gui_normal_selection_periodogram_lombscargle} the four highest peaks are marked with a red "x".}
\label{fig:full_gui_normal_selection_periodogram_boxleastsquares}
\end{figure}
\FloatBarrier
\section{Data processing}
Pressing the button "New FC" will start the processing of all fits files in the current loaded database. It will sequentially go through all files and apply the flare detection algorithms to the lightcurve, as well as generate the periodogram and folded lightcurves. This is done for both the SAP\_FLUX as well as the PDCSAP\_FLUX. Additionally plots for each individual lightcurve and processing step are generated. The included data includes:
\begin{itemize}
\item Flares (peak, timestamp, datapoint index in the lightcurve, TESS/Kepler data quality flags)
\item Number of flares
\item Fits for the flares (fit, timestamps, indices in the lightcurve, TESS/Kepler data quality flags)
\item Uninterrupted timespans in the data
\item Total length of timespans in seconds
\item Folded lightcurve phase range
\item Folded lightcurve flare positions (phase, peak)
\item Period which was used to fold the lightcurve
\item Additional boundaries around minima and maxima
\end{itemize}
After this process is done, a new window will open. It allows to show multiple different statistics like flares per file, flares per star (total, or normalized to per 7 day period) or mean periods for each star. This window can be seen in figure \ref{fig:summary_statistics_window}.
Binary file not shown.
+4 -2
View File
@@ -91,6 +91,8 @@
\newcommand{\cya}{\textcolor{cyan} }
\usepackage[normalem]{ulem}
\usepackage{placeins}
%Loading the normalem package option prevents the redefinition of existing, already loaded definitions. If not loaded, the redefinition of the \emph command through ulem leads to formating problems in the bibilgraphy.
@@ -282,8 +284,8 @@
\pagestyle{empty} % no header or footers
\cleardoublepage
\pagestyle{maincontentstyle} % fancy header and footer
\input{content/writing-guidance} % read me before starting to write. Not part of the actual deliverable.
%\pagestyle{maincontentstyle} % fancy header and footer
%\input{content/writing-guidance} % read me before starting to write. Not part of the actual deliverable.
\pagestyle{plain} % display just page numbers