\documentclass[../thesis.tex]{subfiles}

\graphicspath{
	{.}
	{../../figures/}
	{../../../figures/}
}

\begin{document}
\chapter{Single Sine Beacon and Interferometry}
\label{sec:single}

% period multiplicity/degeneracy
A problem with a continuous beacon is resolving the period multiplicity $\Delta k_{ij}$ in \eqref{eq:synchro_mismatch_clocks_periodic}.
\Todo{copy equation here}
It can be resolved by declaring a shared time $\tTrueEmit$ common to the stations in some fashion (e.g.~a~pulse), and counting the cycles since $\tTrueEmit$ per station.
\\

\bigskip
% Same transmitter / Static setup
When the signal defining $\tTrueEmit$ is emitted from the same transmitter that sends out the beacon signal, the number of periods $k$ can be obtained directly from the signal.
If, however, this calibration signal is sent from a different location, the time delays for this signal are different from the time delays for the beacon.
In a static setup, these distances should be measured to have a time delay accuracy of less than one period of the beacon signal.\todo{reword sentence}
\\

\bigskip
% Dynamic setup
If measuring the distances to the required accuracy is not possible, a different method must be found to obtain the correct number of periods.
The total time delay in \eqref{eq:phase_diff_to_time_diff} contains a continuous term $\Delta t_\phase$ that can be determined from the beacon signal, and a discrete term $k T$ where $k$ is the unknown discrete quantity.
\\
Since $k$ is discrete, the best time delay might be determined from the calibration signal by calculating the correlation for discrete time delays $kT$.
\\

\bigskip
% Airshower gives t0
In the case of radio detection of air showers, the very signal of the air shower itself can be used as the calibration signal.
This falls into the dynamic setup described above.

\subsection{Lifting the Period Degeneracy with an Air Shower}% <<<

\begin{figure}
	%\includegraphics
	\caption{
		Finding the maximum correlation for integer period shifts between two waveforms recording the same (simulated) air shower.
	}
	\label{}
\end{figure}

\begin{figure}
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{ZH_simulation/findks/ca_period_from_shower.py.maxima.run0.pdf}
		\caption{
			Combined amplitude maxima near shower axis
		}
		\label{fig:findks:maxima}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{ZH_simulation/findks/ca_period_from_shower.py.reconstruction.run0.power.pdf}
		\caption{
			Power measurement near shower axis with the $k$s belonging to the maximum in the amplitude maxima.
			\Todo{indicate maximum in plot, square figure}
		}
		\label{fig:findks:reconstruction}
	\end{subfigure}
	\\
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{ZH_simulation/findks/ca_period_from_shower.py.maxima.run1.pdf}
		\caption{
			Maxima near shower axis, zoomed to the location in \ref{fig:findks:reconstruction} with the highest amplitude.
		}
		\label{fig:findks:maxima:zoomed}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{ZH_simulation/findks/ca_period_from_shower.py.reconstruction.run1.power.pdf}
		\caption{
			Power measurement of new
		}
		\label{}
	\end{subfigure}
	\caption{
		Iterative $k$-finding algorithm:
		First, in the upper left pane, find the set of period shifts $k$ per point that returns the highest maximum amplitude.
	}
	\label{fig:findks}
\end{figure}

\subsection{Result}
\begin{figure}
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/trace_overlap/on-axis/dc_grid_power_time_fixes.py.repair_none.axis.trace_overlap.repair_none.pdf}
		\caption{
			Randomised clocks
		}
		\label{fig:simu:sine:period:repair_none}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/trace_overlap/on-axis/dc_grid_power_time_fixes.py.repair_phases.axis.trace_overlap.repair_phases.pdf}
		\caption{
			Clock syntonisation
		}
		\label{fig:simu:sine:period:repair_phases}
	\end{subfigure}
	\\
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/trace_overlap/on-axis/dc_grid_power_time_fixes.py.no_offset.axis.trace_overlap.no_offset.pdf}
		\caption{
			True clocks
		}
		\label{fig:simu:sine:periods:no_offset}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/trace_overlap/on-axis/dc_grid_power_time_fixes.py.repair_full.axis.trace_overlap.repair_full.pdf}
		\caption{
			Full resolved clocks
		}
		\label{fig:simu:sine:periods:repair_full}
	\end{subfigure}
	\caption{
		Trace overlap for a position on the true shower axis.
	}
	\label{fig:simu:sine:periods}
\end{figure}


\begin{figure}
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/dc_grid_power_time_fixes.py.X400.repair_none.scale4d.pdf}
		\caption{
			Randomised clocks
		}
		\label{fig:grid_power:repair_none}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.45\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/dc_grid_power_time_fixes.py.X400.repair_phases.scale4d.pdf}
		\caption{
			Clock syntonisation
		}
		\label{fig:grid_power:repair_phases}
	\end{subfigure}
	\\
	\begin{subfigure}{0.5\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/dc_grid_power_time_fixes.py.X400.no_offset.scale4d.pdf}
		\caption{
			True clocks
		}
		\label{fig:grid_power:no_offset}
	\end{subfigure}
	\hfill
	\begin{subfigure}{0.5\textwidth}
		\includegraphics[width=\textwidth]{radio_interferometry/dc_grid_power_time_fixes.py.X400.repair_all.scale4d.pdf}
		\caption{
			Full resolved clocks
		}
		\label{fig:grid_power:repair_full}
	\end{subfigure}
	\caption{
		Power measurements near the simulation axis with varying degrees of clock deviations.
	}
	\label{fig:grid_power_time_fixes}
\end{figure}
% >>>
\end{document}
