\section{\label{sec:optics} Storage Ring Optics}
\textcolor{orange}{Martin}
\medskip

Figure~\ref{fig:tuneplane} shows horizontal and vertical unes along the voltage contour. The $\beta$ and $\eta$ functions for quad voltage of \SI{20.4}{\kilo\volt} are shown in Fig.~\ref{fig:twissplot}. \textcolor{red}{\textit{Someone should say something about the dependence of Twiss parameters on $V_{\textnormal{quad}}$, see Fig.~\ref{fig:twissvsv}.}}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig06.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig06.pdf}
	\caption{\textcolor{orange}{Jason} Dependence of tune on quadrupole voltage computed with a Bmad\cite{Sagan:2006sy} based model of the guide field. Resonance lines are shown. Tentative operating point is \SI{20.4}{\kilo\volt} (red dot).}\label{fig:tuneplane}
\end{figure}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig07.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig07.pdf}
	\caption{\textcolor{orange}{David R. and David T.} Twiss parameters in the closed storage ring \textcolor{red}{\textit{[See DocDB16661]}}.}\label{fig:twissplot}
\end{figure}

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig08a.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig08a.pdf}
		\caption{Beta function dependence on quadrupole voltage.}\label{fig:betavsv}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig08b.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig08b.pdf}
		\caption{Dispersion function dependence on quadrupole voltage.}\label{fig:dispersionvsv}
	\end{subfigure}
	\caption{\textcolor{orange}{Mike and David T.} Twiss parameter dependence on quadrupole voltage ($V_{\textnormal{quad}}$). \textcolor{red}{\textit{See DocDB15538 and DocDB16661; Need to combine into a single figure. Needs to specify if this is the max or something else.}}}\label{fig:twissvsv}
\end{figure}

The quadrupole field is superimposed on the main dipole field. The reference trajectory through the quadrupoles has significant curvature and the quadrupoles share that curvature. As a result, the quadrupole field is necessarily nonlinear, with a significant sextupole term. An effect of this and other nonlinearities associated with the geometry of the quad electrodes is an amplitude dependence of the tunes. The tune shifts associated with the various quad multipoles~\cite{Semertzidis:2003zs} are shown in Fig.~\ref{fig:tuneshift}. Figure~\ref{fig:2dtuneshift} shows that the magnetic field imperfections also lead to amplitude-dependent tune shifts. The magnetic field \textcolor{red}{\textit{Someone should say something about the tune dependence on momentum and chromaticity dependence on quadrupole voltage, see Figs.~\ref{fig:tunedepp} and~\ref{fig:chromat}.}} The nonlinearities of the electrostatic quadrupoles, as well as residual magnetic multipoles~\cite{Grange:2015fou} can drive resonances (see Fig.~\ref{fig:tuneplane}). Operation near resonances is avoided to mitigate losses. A tune scan that extends over the operating region is shown in Fig.~\ref{fig:quadscan}. The storage fraction is measured as quadrupole voltage is increased from \SI{18}{\kilo\volt} to \SI{23}{\kilo\volt}. The degraded storage fractions evident at \SI{18.8}{\kilo\volt} and \SI{21.2}{\kilo\volt} correspond to the $3\nu_x=1$ and $\nu_x+3\nu_y=2$ resonances.

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig09.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig09.pdf}
	\caption{\textcolor{orange}{David R.} Simulated contribution to amplitude dependent tune shift from each of the quad multipoles, their sum, and the decoherence rate $\Gamma$ as determined by tracking.}\label{fig:tuneshift}
\end{figure}

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig10a.png}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig10a.png}
		\caption{}\label{fig:2dtuneshift_perf_bfield}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig10b.png}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig10b.png}
		\caption{}\label{fig:2dtuneshift_meas_bfield}
	\end{subfigure}
	\caption{\textcolor{orange}{David T.} Amplitude-dependent tune shifts ($\left.\delta p\middle/\pmagic\right.= 0,\left.p_{x}\middle/\pmagic\right.=0,\left.p_{y}\middle/\pmagic\right.=0$) within the storage region ($r\leq\SI{45}{\milli\meter}$) for an ideal (a) and measured (b) magnetic field.}\label{fig:2dtuneshift}
\end{figure}

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig11a.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig11a.pdf}
		\caption{Tune value vs. relative momentum.}\label{fig:tunevsp}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig11b.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig11b.pdf}
		\caption{Tune shift vs. relative momentum.}\label{fig:tuneshiftvsp}
	\end{subfigure}
	\caption{\textcolor{orange}{Mike and David T.} Tune dependence on muon momentum \textcolor{red}{\textit{[See DocDB15538 and DocDB16661]}}.}\label{fig:tunedepp}
\end{figure}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig12.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig12a.pdf}
	\caption{\textcolor{orange}{David T.} Chromaticity dependence on quadrupole voltage.}\label{fig:chromat}
\end{figure}

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig13a}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig13a}
		\caption{}\label{fig:20180210quadscan}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig13b}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig13b}
		\caption{}\label{fig:20180324quadscan}
	\end{subfigure}
	\caption{\textcolor{orange}{Jason} Relative number of decay positrons in a fill as a function of quadrupole voltage \textcolor{red}{\textit{[remove run numbers and renormalize to \SI{20.4}{\kilo\volt} setting]}}. Storage efficiency is degraded by betatron resonances at 18.8 and \SI{21.2}{\kilo\volt}.}\label{fig:quadscan}
\end{figure}

The guide field is characterized by measurements of closed orbit, tunes, and modulation of the beam width and centroid. Measurements of the tunes with the fiber harps are shown in Fig.~\ref{fig:tuneplane}. \textcolor{red}{\textit{Someone should say something about the tune footprint, see Fig.~\ref{fig:tunefootprint}.}}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig14.png}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig14.png}
	\caption{\textcolor{orange}{David T.}  Tune footprint of a beam distribution at \SI{149}{\micro\second} after injection and for a magnetic field measurement.}\label{fig:tunefootprint}
\end{figure}

\subsection{\label{sec:inject} Injection}
\textcolor{orange}{Diktys (beamline) David R. (through the inflector)}
\medskip

The beam is injected into the ring through a hole in the back leg iron. The \SI{1.7}{\meter} long superconducting inflector bucks the main dipole field so that the beam traverses the inflector without significant deflection and exits the inflector on a trajectory tangent to a displaced circular orbit. The beam crosses the design orbit in the gap of the pulsed kicker that steers the beam radially outward and onto the central orbit as shown in Fig.~\ref{fig:schematic}. 

The inflector aperture (\SI{18}{\milli\meter} horizontally by \SI{56}{\milli\meter} vertically) is very much smaller than the aperture of the ring (\SI{90}{\milli\meter} round). In order to maximize transmission, the beam is focused to a narrow waist through the inflector and with zero dispersion. 

Manipulation of the beam width to maximize transmission through the inflector and into the ring is illustrated in Fig.~\ref{fig:mismatchap}. The mismatch of $\beta$ and $\eta$ functions leads to a modulation of beam width with components at the betatron frequency and twice the betatron frequency respectively. The relative contribution of betatron motion and momentum offset to the width can be extracted from the width measurement (Fig.~\ref{fig:fiberwidth}) by suitable decomposition. The
phase space at the inflector exit is defined by the inflector aperture and shown in Figs. ~\ref{fig:beamphasespace}.

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig15.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig15.pdf}
	\caption{\textcolor{orange}{David R.} Propagating beam betatron and energy width through narrow aperture inflector and into the storage ring. The dashed line is the horizontal aperture.}\label{fig:mismatchap}
\end{figure}

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{inf_horiz_phase_space.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig16a}
		\caption{Horizontal phase space at the exit of the inflector.}\label{fig:xbeamphasespace}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{inf_vertical_phase_space.pdf}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig16b}
		\caption{Vertical phase space at the inflector exit.}\label{fig:ybeamphasespace}
	\end{subfigure}
	\caption{\textcolor{orange}{David R.} Simulated muon beam phase space at the downstream end of the inflector \textcolor{red}{[be careful with the coordinate systems]}.}\label{fig:beamphasespace}
\end{figure}

The kicker is located $\phi_\beta=\left.\pi\middle/2\right.$ downstream from the injection point at the inflector exit. The beam crosses the design orbit with an angle determined by the radial displacement of the inflector axis (nominally \SI{77}{\milli\meter} from the design orbit and indicated as `d' in Fig.~\ref{fig:schematic}), and the exit angle. The crossing angle, and therefore the kick required to steer the beam onto the closed orbit, is minimum if the exit angle is zero. The dependencies can be made quantitative with a few simplifying assumptions, namely that the $\beta$ and $\eta$ functions are uniform around the ring, and as long as we treat the kickers as a $\delta$-function in azimuthal angle. (The kickers~\cite{Grange:2015fou,Schreckenberger:IPAC2018-THPML093} in fact extend over about \SI{36}{\degree} of arc). With these assumptions, the horizontal displacement of the trajectory is
\begin{align} % {} before the - sign turns it into a binary operator instead of a unary operator (spacing issues)
	x\left(s\right) &=\left(x_{\textnormal{inf}}-\delta\eta\right)\cos\left[\phi\left(s\right)\right]+\eta\delta\nonumber\\
	                     &\qquad{}-k\beta_{0}\cos\left[\phi\left(s\right)\right]+x^{\prime}_{\textnormal{inf}}\sin\left[\phi\left(s\right)\right]\nonumber\\ 
	                     &=A\cos\left[\phi\left(s\right)+\phi_{0}\right]+\eta\delta,\nonumber
%	\label{eq:horiz_disp} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $x_{\textnormal{inf}},x^{\prime}_{\textnormal{inf}}$ are the displacement and angle of the trajectory at the inflector exit, $\eta$ the dispersion, $\delta$ is the fractional momentum offset, $k$ is the kick angle, $\phi\left(s\right)$ the betatron phase advance with $s=0$ at the injection point, 
\begin{align}
	A                 &=\pm\sqrt{\left(x_{\textnormal{inf}}+\delta\eta-k\beta\right)^{2}+\left(x^{\prime}_{\textnormal{inf}}\beta\right)^{2}}\nonumber\\
	\tan\phi_{0} &= \frac{x^{\prime}_{\textnormal{inf}}\beta}{x_{\textnormal{inf}}-\delta\eta-k\beta}.\nonumber
%	\label{eq:ampl_phase} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
The extremes of the displacement of the motion, that is the envelope of the motion is given by $x_{\textnormal{ext}}=\pm\left|A\right|+\eta\delta$. The envelope is plotted in Fig.~\ref{fig:EnergyAcceptance1} as a function of momentum for three different injection angles, and for a kick angle $k=\SI{8}{\milli\radian}$, which is about \SI{80}{\percent} of the nominal kick, and Fig.~\ref{fig:EnergyAcceptance3} for the nominal kick of $k=\SI{10.8}{\milli\radian}$. The minimum momentum that can be stored decreases as the kicker angle approaches nominal. Under kicking skews the momentum distribution high. Kick and and injection angle both contribute to the amplitude of the oscillations about the closed orbit. Non zero injection angle reduces momentum acceptance symmetrically about zero.

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig17.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig17.pdf}
	\caption{\textcolor{orange}{David R.} Kick angle \SI{\sim80}{\percent} of nominal. The green lines mark the envelope of the motion of a muon that exits the inflector with zero angle. The on momentum muon oscillates between \SI{\pm2}{\centi\meter}. If momentum offset is \SI{0.2}{\percent} the peak to peak oscillation is \SI{\sim5}{\milli\meter}. A muon with momentum offset of \SI{-0.18}{\percent} is outside the \SI{4.5}{\centi\meter} aperture.}\label{fig:EnergyAcceptance1}
\end{figure}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig18.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig18.pdf}
	\caption{\textcolor{orange}{David R.} For the nominal kick angle (\SI{10.8}{\milli\radian}), the trajectory of the on momentum muon coincides with the closed orbit. The on momentum muon injected with angle of \SI{\pm3}{\milli\radian} will oscillate within a \SI{\pm2}{\centi\meter} envelope.}\label{fig:EnergyAcceptance3}
\end{figure}

\subsection{\label{sec:tunes}Tune Measurements}
\textcolor{orange}{Jason}
\medskip

The horizontal ($\nu_{x}$) and vertical ($\nu_{y}$) tunes are defined as
\begin{align}
	\nu_{x} &\equiv\mathcal{N}_{x}=\cfrac{\left.\mathcal{N}_{x}\middle/\mathcal{T}\right.}{\left.1\middle/\mathcal{T}\right.}=\frac{f_{x}}{f_{c}}=1-\frac{f_{\textnormal{cbo}}}{f_{c}}\nonumber\\
	\nu_{y} &\equiv\mathcal{N}_{y}=\cfrac{\left.\mathcal{N}_{y}\middle/\mathcal{T}\right.}{\left.1\middle/\mathcal{T}\right.}=\frac{f_{y}}{f_{c}}=\frac{1}{2}\left(1-\frac{f_{\textnormal{vw}}}{f_{c}}\right),
	\label{eq:tunedef} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $\mathcal{N}_{x}$ is the number of horizontal betatron oscillations per 1 turn around the storage ring, $\mathcal{T}$ is the time it takes traverse 1 turn around the storage ring, $f_{x}$ is the horizontal betatron frequency, $f_{c}$ is the cyclotron frequency, $f_{\textnormal{cbo}}$ is the coherent betatron oscillation frequency, $\mathcal{N}_{y}$ is the number of vertical betatron oscillations per 1 turn around the storage ring, $f_{y}$ is the vertical betatron frequency, and $f_{\textnormal{vw}}$ is the vertical waist frequency.

The $V_{\textnormal{quad}}$ settings need to be translated into beam dynamics parameters to help understand the operational behavior of the storage ring. The FBM, trackers, and calorimeters can be used to measure the average cyclotron ($\left<f_{c}\right>$), coherent betatron oscillation ($\left<f_{\textnormal{cbo}}\right>$), vertical betatron ($\left<f_{y}\right>$), and vertical waist ($\left<f_{\textnormal{vw}}\right>$) frequencies. These average frequencies can in turn be used to determine the average horizontal ($\left<\nu_{x}\right>$) and vertical ($\left<\nu_{y}\right>$) tunes, see Tables~\ref{tab:horz_tune_data} and~\ref{tab:vert_tune_data}. 

\begin{table}[]
\caption{\label{tab:horz_tune_data} \textcolor{orange}{Jason} Measured $\left<f_{c}\right>$ and $\left<f_{\textnormal{cbo}}\right>$ (only statistical errors are given) and corresponding $\left<\nu_{x}\right>$ calculated via Eq.~(\ref{eq:tunedef}). This data was collected during \runone. The FBM measurements use the 6 o'clock horizontal FBM central fiber (no. 4), where the first \SI{3}{\micro\second} of data are not used for these measurements.}
\begin{ruledtabular}
\begin{tabular}{lcccc}
\textnormal{Detector}       & $V_{\textnormal{quad}}$~\textnormal{[\SI{}{\kilo\volt}]} & $\left<f_{c}\right>$~\textnormal{[\SI{}{\mega\hertz}]} & $\left<f_{\textnormal{cbo}}\right>$~\textnormal{[\SI{}{\mega\hertz}]} & $\left<\nu_{x}\right>$\\
\colrule
\textnormal{FBM}             & 13.0                                                                                & 6.697(5)                                                                     & 0.2600(30)                                                                                          & 0.9612(4)\\
\textnormal{FBM}             & 15.0                                                                                & 6.697(5)                                                                     & 0.3005(30)                                                                                          & 0.9551(4)\\
\textnormal{trackers}        & 15.0                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 15.0                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 17.6                                                                                & 6.697(5)                                                                      & 0.3553(30)                                                                                         & 0.9469(4)\\
\textnormal{trackers}        & 18.3                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 18.3                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 19.0                                                                                & 6.697(5)                                                                      & 0.3845(30)                                                                                         & 0.9426(5)\\
\textnormal{FBM}             & 20.2                                                                                & 6.697(5)                                                                      & 0.4100(30)                                                                                         & 0.9388(5)\\
\textnormal{trackers}        & 20.4                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 20.4                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                                                        & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 20.5                                                                                & 6.697(5)                                                                      & 0.4143(30)                                                                                         & 0.9381(5)\\
\end{tabular}
\end{ruledtabular}
\end{table}

\begin{table}[]
\caption{\label{tab:vert_tune_data} \textcolor{orange}{Jason} Measured $\left<f_{c}\right>$ and $\left<f_{y}\right>$ (only statistical errors are given) and corresponding $\left<\nu_{y}\right>$ calculated via Eq.~(\ref{eq:tunedef}). This data was collected during \runone. The FBM measurements use the 6 o'clock vertical FBM central fiber (no. 4), where the first \SI{3}{\micro\second} of data are not used for these measurements.}
\begin{ruledtabular}
\begin{tabular}{lcccc}
\textnormal{Detector}       & $V_{\textnormal{quad}}$~\textnormal{[\SI{}{\kilo\volt}]} & $\left<f_{c}\right>$~\textnormal{[\SI{}{\mega\hertz}]} & $\left<f_{y}\right>$~\textnormal{[\SI{}{\mega\hertz}]} & $\left<\nu_{y}\right>$\\
\colrule
\textnormal{FBM}             & 13.0                                                                                & 6.715(5)                                                                     & 1.8555(50)                                                                 & 0.2763(8)\\
\textnormal{FBM}             & 15.0                                                                                & 6.715(5)                                                                     & 1.9940(50)                                                                 & 0.2969(8)\\
\textnormal{trackers}        & 15.0                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 15.0                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 17.6                                                                                & 6.715(5)                                                                      & 2.1680(50)                                                                & 0.3229(8)\\
\textnormal{trackers}        & 18.3                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 18.3                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 19.0                                                                                & 6.715(5)                                                                      & 2.2540(50)                                                                & 0.3357(8)\\
\textnormal{FBM}             & 20.2                                                                                & 6.715(5)                                                                     & 2.3235(50)                                                                 & 0.3460(8)\\
\textnormal{trackers}        & 20.4                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{calorimeters} & 20.4                                                                                & \textnormal{\textcolor{red}{???}}                                & \textnormal{\textcolor{red}{???}}                               & \textnormal{\textcolor{red}{???}}\\
\textnormal{FBM}             & 20.5                                                                                & 6.715(5)                                                                      & 2.3370(50)                                                                & 0.3480(8)\\
\end{tabular}
\end{ruledtabular}
\end{table}

For a circular storage ring with a perfect dipole magnetic field (\dipbfield), the field index inside of a quadrupole ($n_{0}$) is defined as
\begin{equation}
	n_{0}\equiv\frac{m\gamma r}{p\dipbfield}\frac{\partial E_{r}}{\partial r},
	\label{eq:n_0_deff}
\end{equation}
where $m$ is mass, $\gamma$ is the Lorentz factor, $r$ is the radial distance from the center of the storage ring, $p$ is momentum, and $E_{r}$ is the radial component of the quadrupole electric field.

The smoothed quadrupole model describes the EQS as being continuous around the entire storage ring. The effective field index ($n$) in the smoothed model is defined as
\begin{equation}
	n\equiv\left(\frac{4l_{q}}{\cmagic}\right)n_{0}=\left(\frac{\left.l_{q}\middle/\rmagic\right.}{\left.\pi\middle/2\right.}\right)n_{0},
	\label{eq:n_deff}
\end{equation}
where $\rmagic=\SI{7112}{\milli\meter}$ is the storage ring equilibrium orbit radius, $\cmagic=2\pi\rmagic$ is the storage ring equilibrium orbit circumference, and $l_{q}$ is the quadrupole long-short pair length.

The smoothed model approximates~\cite{Semertzidis:2003zs} the storage ring tunes as
\begin{align}
	\nu_{x} &\approx\sqrt{1-n}\nonumber\\
	\nu_{y} &\approx\sqrt{n}.
	\label{eq:tunes_smooth} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}

The discrete quadrupole model describes the EQS as being a set of 4 separate quadrupoles that have a four-fold symmetry around the storage ring. The discrete model approximates~\cite{Semertzidis:2003zs} the storage ring tunes as
\begin{align} % {} before the - sign turns it into a binary operator instead of a unary operator (spacing issues)
	\cos\left(\frac{\pi}{2}\nu_{x}\right) &\approx c_{i}\cos\left(\frac{l_{q}}{\rmagic}\sqrt{m}\right)\nonumber\\
	                                                     &\qquad{}-\frac{1}{2}s_{i}\left(\sqrt{m}+\frac{1}{\sqrt{m}}\right)\sin\left(\frac{l_{q}}{\rmagic}\sqrt{m}\right)\nonumber\\
	\cos\left(\frac{\pi}{2}\nu_{y}\right) &\approx\cos\left(\frac{l_{q}}{\rmagic}\sqrt{n_{0}}\right)\nonumber\\
	                                                     &\qquad{}-\frac{1}{2}\frac{l_{i}}{\rmagic}\sqrt{n_{0}}\sin\left(\frac{l_{q}}{\rmagic}\sqrt{n_{0}}\right),
	\label{eq:tunes_discrete} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $c_{i}\equiv\cos\left(l_{i}\middle/\rmagic\right)$, $s_{i}\equiv\sin\left(l_{i}\middle/\rmagic\right)$, $m\equiv1-n_{0}$ and $l_{i}$ is the interval length between quadrupole long-short pairs. The following numerical relations obtained from~\cite{Semertzidis:2003zs} are assumed for Eq.~(\ref{eq:tunes_discrete}): $\left.l_{i}\middle/\rmagic\right.=0.895354$, $\left.l_{q}\middle/\rmagic\right.=0.675442$, and $n_{0}=\left.n\middle/0.43\right.$.

Equations~(\ref{eq:n_0_deff}) and~(\ref{eq:n_deff}) show that $n\propto\partial E_{r}/\partial r$, and $E_{r}\propto V_{\textnormal{quad}}$ when assuming that the quadrupole geometry and HV pulse generation are independent of $V_{\textnormal{quad}}$, which then implies that $n\propto V_{\textnormal{quad}}$:
\begin{equation}
	n=\sigma V_{\textnormal{quad}},
	\label{eq:volt_to_index}
\end{equation}
where $\sigma$ is the proportionality constant (conversion factor) between $n$ and $V_{\textnormal{quad}}$ \textcolor{red}{\textit{[need to pick a different symbol for $\sigma$, as it gets confusing when talking about the standard deviation difference]}}. Equation~(\ref{eq:volt_to_index}) is combined with Eqs.~(\ref{eq:tunes_smooth}) and~(\ref{eq:tunes_discrete}), and the resulting functions are fit to the $\left<\nu_{x}\right>$ and $\left<\nu_{y}\right>$ data in Tables~\ref{tab:horz_tune_data} and~\ref{tab:vert_tune_data}, see Fig~\ref{fig:nu_vs_v}. The $\sigma_{x}^{s}$, $\sigma_{y}^{s}$, $\sigma_{x}^{d}$, and $\sigma_{y}^{d}$ fit parameters in Fig.~\ref{fig:nu_vs_v} correspond to the $\sigma$ in Eq.~(\ref{eq:volt_to_index}). In the ideal case, $\sigma_{x}^{s}=\sigma_{y}^{s}$ and $\sigma_{x}^{d}=\sigma_{y}^{d}$. 

\begin{figure}[]
	\centering
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig19a}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig19a}
		\caption{$\left<\nu_{x}\right>$ vs. $V_{\textnormal{quad}}$}\label{fig:nu_x_vs_v}
	\end{subfigure}
	%add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc (or a blank line to force the subfigure onto a new line).
	\begin{subfigure}{\columnwidth}
		\begin{tikzpicture}
			\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig19b}};
			\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
		\end{tikzpicture}
		%\includegraphics[width=0.95\columnwidth]{fig19b}
		\caption{$\left<\nu_{y}\right>$ vs. $V_{\textnormal{quad}}$}\label{fig:nu_y_vs_v}
	\end{subfigure}
	\caption{\textcolor{orange}{Jason} Average tune data (blue circular points), see Tables~\ref{tab:horz_tune_data} and~\ref{tab:vert_tune_data}, along with fits using the smoothed quadrupole model (solid black lines) and discrete quadrupole model (red dashed lines), see Eqs.~(\ref{eq:tunes_smooth}),~(\ref{eq:tunes_discrete}), and~(\ref{eq:volt_to_index}). The $\sigma_{x}^{s}$, $\sigma_{y}^{s}$, $\sigma_{x}^{d}$, and $\sigma_{y}^{d}$ fit parameters are for the smoothed model fit to $\left<\nu_{x}\right>$ data, smoothed model fit to $\left<\nu_{y}\right>$ data, discrete model fit to $\left<\nu_{x}\right>$ data, and discrete model fit to $\left<\nu_{y}\right>$ data respectively. \textcolor{orange}{Mike and David T.} \textcolor{red}{\textit{: Add a set of simulation based tune curves, see DocDB15538 and DocDB16661.}}}\label{fig:nu_vs_v}
\end{figure}

The $\chi^{2}/\textnormal{ndf}<1$ for all of the fits in Fig.~\ref{fig:nu_vs_v}, which indicates that the precision of the fit parameters is limited by the ``large'' size of the data point errors. There is some mild tension between the horizontal and vertical tune fits within each model, as
\begin{align}
	\frac{\left|\sigma_{x}^{s}-\sigma_{y}^{s}\right|}{\sqrt{\left(\delta_{x}^{s}\right)^{2}+\left(\delta_{y}^{s}\right)^{2}}} &=\SI{1.990}{\sigma}\nonumber\\
	\frac{\left|\sigma_{x}^{d}-\sigma_{y}^{d}\right|}{\sqrt{\left(\delta_{x}^{d}\right)^{2}+\left(\delta_{y}^{d}\right)^{2}}} &=\SI{2.147}{\sigma},
	\label{eq:tunes_xydiff} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $\delta_{x}^{s}$, $\delta_{y}^{s}$, $\delta_{x}^{d}$, and $\delta_{y}^{d}$ are the errors for the $\sigma_{x}^{s}$, $\sigma_{y}^{s}$, $\sigma_{x}^{d}$, and $\sigma_{y}^{d}$ values respectively. This tension is likely due to some undetermined systematic effect in the tune data. This tension can be eliminated by rescaling the errors so that the standard deviations difference is \SI{1}{\sigma}, where these multiplicative scale factors are $\epsilon^{s}=1.990$ and $\epsilon^{d}=2.147$ for the smoothed and discrete models respectively.

The horizontal and vertical fit parameters can be averaged to produce a final estimation of the conversion factor between $n$ and $V_{\textnormal{quad}}$:
\begin{align}
	\sigma^{s} &=\frac{1}{2}\left(\sigma_{x}^{s}+\sigma_{y}^{s}\right)\pm\frac{1}{2}\sqrt{\left(\epsilon^{s}\delta_{x}^{s}\right)^{2}+\left(\epsilon^{s}\delta_{y}^{s}\right)^{2}}\nonumber\\
	                  &=\left(5.886\pm0.023\right)\times\SI{e-3}{\per\kilo\volt}\nonumber\\
	\sigma^{d} &=\frac{1}{2}\left(\sigma_{x}^{d}+\sigma_{y}^{d}\right)\pm\frac{1}{2}\sqrt{\left(\epsilon^{d}\delta_{x}^{d}\right)^{2}+\left(\epsilon^{d}\delta_{y}^{d}\right)^{2}}\nonumber\\
	                  &=\left(5.892\pm0.025\right)\times\SI{e-3}{\per\kilo\volt},
	\label{eq:nvspconv} % get an error if last line has \nonumber. % manually put in parentheses for inline eq. references.
\end{align}
where $\sigma^{s}$ and $\sigma^{d}$ are the average conversion factors for the smoothed and discrete models. Equations~(\ref{eq:tunes_xydiff}) and~(\ref{eq:nvspconv}) show that the smoothed and discrete models produce consistent results, and Table~\ref{tab:n_nu_estim} provides \runone~field index and tune values that are based on the smoothed model \textcolor{red}{\textit{[maybe this should also be done for the discrete model]}}.

\begin{table}[]
\caption{\label{tab:n_nu_estim} \textcolor{orange}{Jason} Field index and tune values based on the smoothed model for different quadrupole storage voltages used in \runone~data collection, see Eqs.~(\ref{eq:tunes_smooth}),~(\ref{eq:volt_to_index}), and~(\ref{eq:nvspconv}), along with the numerical relation $n_{0}=\left.n\middle/0.43\right.$ obtained from~\cite{Semertzidis:2003zs}.}
\begin{ruledtabular}
\begin{tabular}{ccccc}
$V_{\textnormal{quad}}$~\textnormal{[\SI{}{\kilo\volt}]} & $n_{0}$         & $n$              & $\nu_{x}$      & $\nu_{y}$\\
\colrule
15.0                                                                                & 0.20533(80) & 0.08829(35) & 0.95484(18) & 0.29714(58)\\
18.3                                                                                & 0.25050(98) & 0.10771(42) & 0.94461(22) & 0.32820(64)\\
20.4                                                                                & 0.2792(11)   & 0.12007(47) & 0.93804(25) & 0.34652(68)\\
\end{tabular}
\end{ruledtabular}
\end{table}

\subsection{\label{sec:closedorbit}Closed Orbit Distortions}
\textcolor{orange}{Mike}
\medskip

\textcolor{red}{\textit{Someone should discuss the closed orbit and beta function distortions due to an imperfect E- and B-field, see Figs.~\ref{fig:orbitdistort} and~\ref{fig:betadistort}. These results are based on the B-field data shown in Fig.~\ref{fig:bfield} and the E-field effects due to the quadrupole misalignments given in Tables~\ref{tab:tmp_quad_align_data_a} and~\ref{tab:tmp_quad_align_data_b}.}}

\begin{table}[]
\caption{\label{tab:tmp_quad_align_data_a}\textcolor{orange}{Mike} Quadrupole in situ alignment data \textcolor{red}{\textit{[Mike S. will have to elaborate and the units need checking]}}.}
\begin{ruledtabular}
\begin{tabular}{lcccc}
\textnormal{Quadrupole} & $d_{\textnormal{bot}}$~\textnormal{[\SI{}{\milli\meter}]} & $d_{\textnormal{top}}$~\textnormal{[\SI{}{\milli\meter}]} & $d_{\textnormal{inn}}$~\textnormal{[\SI{}{\milli\meter}]} & $d_{\textnormal{out}}$~\textnormal{[\SI{}{\milli\meter}]}\\
\colrule
\textnormal{Q1S}             & 2.05                                                                                & 2.42                                                                                 & -0.59                                                                               & -0.06\\
\textnormal{Q1L}             & -0.84                                                                               & -1.12                                                                                & -0.53                                                                               & 0.04\\
\textnormal{Q2S}             & -0.49                                                                              & -0.86                                                                                 & -0.70                                                                               & -1.29\\
\textnormal{Q2L}             & 0.67                                                                                & 0.09                                                                                 & 0.06                                                                                 & -0.13\\
\textnormal{Q3S}             & 1.16                                                                                & 0.34                                                                                 & -0.40                                                                                & 0.00\\
\textnormal{Q3L}              & -1.84                                                                              & -2.09                                                                                & 0.31                                                                                & -0.08\\
\textnormal{Q4S}             & -1.16                                                                              & -1.47                                                                                 & 1.85                                                                                & 2.24\\
\textnormal{Q4L}              & -0.44                                                                              & 0.00                                                                                 & 0.20                                                                                 & -0.03\\
\end{tabular}
\end{ruledtabular}
\end{table}

\begin{table}[]
\caption{\label{tab:tmp_quad_align_data_b} \textcolor{orange}{Mike} Quadrupole in situ alignment data \textcolor{red}{\textit{[Mike S. will have to elaborate and the units need checking]}}.}
\begin{ruledtabular}
\begin{tabular}{lcccc}
\textnormal{Quadrupole} & $dx$~\textnormal{[\SI{}{\milli\meter}]} & $dy$~\textnormal{[\SI{}{\milli\meter}]} & $dax$~\textnormal{[\SI{}{\milli\meter}]} & $day$~\textnormal{[\SI{}{\milli\meter}]}\\
\colrule
\textnormal{Q1S}             & -0.325                                                 & 2.235                                                   & 0.265                                                     & 0.185\\
\textnormal{Q1L}             & -0.245                                                  & -0.980                                                 & 0.285                                                     & -0.140\\
\textnormal{Q2S}             & -0.995                                                 & -0.675                                                  & -0.295                                                    & -0.185\\
\textnormal{Q2L}              & -0.035                                                & 0.380                                                   & -0.095                                                    & -0.290\\
\textnormal{Q3S}             & -0.20                                                   & 0.75                                                    & 0.20                                                        & -0.41\\
\textnormal{Q3L}              & 0.115                                                 & -1.965                                                  & -0.195                                                    & -0.125\\
\textnormal{Q4S}             & 2.045                                                 & -1.315                                                  & 0.195                                                      & -0.155\\
\textnormal{Q4L}              & 0.085                                                 & -0.220                                                  & -0.115                                                    & 0.220\\
\end{tabular}
\end{ruledtabular}
\end{table}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig20.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig20.pdf}
	\caption{\textcolor{orange}{Mike and David T.} Closed orbit distortion \textcolor{red}{\textit{[See DocDB15538 and DocDB16661; combine both figures into one]}}.}\label{fig:orbitdistort}
\end{figure}

\begin{figure}[]
	\centering
	\begin{tikzpicture}
		\draw (0, 0) node[inner sep=0]{\includegraphics[width=0.95\columnwidth]{fig21.pdf}};
		\draw (0, 0) node[rotate=45,opacity=0.4]{{\fontsize{45}{54}\selectfont\textcolor{red}{\textbf{Preliminary}}}}; % rule of thumb: \fontsize{size}{1.2*size}
	\end{tikzpicture}
	%\includegraphics[width=0.95\columnwidth]{fig21.pdf}
	\caption{\textcolor{orange}{Mike and David T.} Beta function distortion \textcolor{red}{\textit{[See DocDB15538 and DocDB16661]}}.}\label{fig:betadistort}
\end{figure}
