\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{natbib}
\makeindex{}

\makeatletter
\textheight 625pt
\textwidth 460pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparwidth 50pt
\topmargin 0pt

% Float Positionning Behaviour Correction.
\renewcommand{\textfraction}{0.0}
\renewcommand{\topfraction}{1.0}
\renewcommand{\bottomfraction}{1.0}
\renewcommand{\floatpagefraction}{0.35}
\setcounter{totalnumber}{5}
\setcounter{topnumber}{4}

\newcommand{\ie}{{\em i.e.}}
\newcommand{\eg}{{\em e.g.}}
\newcommand{\cf}{cf.}

\newcommand{\emm}[1]{\ensuremath{#1}}   % Ensures math mode.
\newcommand{\emr}[1]{\emm{\mathrm{#1}}} % Uses math roman fonts.
\newcommand{\nds}[1]{\emm{\displaystyle#1}} % Normal display size for array and tabular environment.
\newcommand{\paren}[1]{\nds{\left(  #1 \right) }} % Parenthesis. 
\newcommand{\cbrace}[1]{\nds{\left\{ #1 \right\}}} % Curly Braces.
\newcommand{\bracket}[1]{\nds{\left[  #1 \right] }} % Brackets.
\newcommand{\abs}[1]{\emm{\left| #1 \right|}} % Absolute value.
\newcommand{\floor}{\emm{\emr{floor}}}
\newcommand{\ceiling}{\emm{\emr{ceiling}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\tint}[1][]{\emm{\Delta t_\emr{#1}}}
\newcommand{\tdump}{\tint[dump]}
\newcommand{\tphase}{\tint[phase]}
\newcommand{\totf}{\tint[otf]}
\newcommand{\tstab}{\tint[stab]}
\newcommand{\tbtwref}{\tint[btwref]}
\newcommand{\tref}{\tint[ref]}
\newcommand{\tfullloop}{\tint[fullloop]}
\newcommand{\tmaxcal}{\tint[max. cals]}
\newcommand{\tfullscan}{\tint[fullscan]}
\newcommand{\tresidual}{\tint[residual]}
\newcommand{\ttotcal}{\tint[totcal]}
\newcommand{\tcal}{\tint[cal]}
\newcommand{\tcov}{\tint[cov]}

\newcommand{\ndumpperbeam}{\emm{n_\emr{dump/beam}}}
\newcommand{\ndumpperline}{\emm{n_\emr{dump/line}}}
\newcommand{\diameter}{\emm{D}}
\newcommand{\wavelength}{\emm{\lambda}}

\newcommand{\mapsize}[1][]{\emm{S_#1}}
\newcommand{\linelength}[1][]{\emm{L_#1}}
\newcommand{\nline}[1][]{\emm{n_{#1}}}
\newcommand{\nlineperfullloop}{\emm{n_\emr{line/fullloop}}}
\newcommand{\nfullloopperfullscan}{\emm{n_\emr{fullloop/fullscan}}}
\newcommand{\nlineperfullscan}{\emm{n_\emr{line/fullscan}}}
\newcommand{\nfullscanpercov}{\emm{n_\emr{fullscan/cov}}}
\newcommand{\nresidual}{\emm{n_\emr{residual}}}
\newcommand{\ncalpercov}{\emm{n_\emr{cal/cov}}}

\newcommand{\perpsampling}{\emm{\delta\theta_\emr{perp}}}
\newcommand{\parasampling}{\emm{\delta\theta_\emr{para}}}

\newcommand{\velo}[1][]{\emm{v_\emr{#1}}}
\newcommand{\vslew}{\emm{\velo[slew]}}
\newcommand{\varea}{\emm{\velo[area]}}

\newcommand{\freq}[1][]{\emm{\nu_\emr{#1}}}
\newcommand{\MHz}{\emm{\,\emr{GHz}}}

\newcommand{\Abtwref}{\emm{A_\emr{btwref}}}
\newcommand{\Abeam}{\emm{A_\emr{beam}}}

\newcommand{\hpbw}{\emr{hpbw}}
\newcommand{\nbeam}{\emm{n_\emr{beam}}}
\newcommand{\grideff}{\emm{\eta_\emr{grid}}}
\newcommand{\nonperoff}{\emm{n_\emr{on/off}}}

\newcommand{\ton}{\tint[on]}
\newcommand{\toff}{\tint[off]}
\newcommand{\tonoff}{\tint[onoff]}

\newcommand{\speceff}{\emm{\eta_\emr{spec}}}
\newcommand{\dnu}{\emm{d\nu}}
\newcommand{\Tsys}{\emm{T_\emr{sys}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \newcommand{\tsig}{\tint[sig]}
% \newcommand{\ttel}{\tint[tel]}
% \newcommand{\npol}{\emm{n_\emr{pol}}}

% \newcommand{\noise}[1][]{\emm{\sigma_\emr{#1}}}
% \newcommand{\obseff}{\emm{\eta_\emr{tel}}}

% \newcommand{\Tas}{\emm{T_\emr{a}^\star}}
% \newcommand{\Tatm}{\emm{T_\emr{atm}}}
% \newcommand{\Tcab}{\emm{T_\emr{cab}}}
% \newcommand{\Trec}{\emm{T_\emr{rec}}}
% \newcommand{\taus}{\emm{\tau_\emr{s}}}
% \newcommand{\gim}{\emm{G_\emr{im}}}
% \newcommand{\Feff}{\emm{F_\emr{eff}}}
% \newcommand{\A}{\emm{A}}

% \newcommand{\Amap}{\emm{A_\emr{map}}}
% \newcommand{\beam}{\emm{\theta}}


% \newcommand{\tontot} {\emm{\ton^\emr{tot}}}
% \newcommand{\tofftot}{\emm{\toff^\emr{tot}}}

% \newcommand{\tonbeam}{\emm{\ton^\emr{beam}}}
% \newcommand{\toncover}{\emm{\ton^\emr{cover}}}
% \newcommand{\toffbeam}{\emm{\toff^\emr{beam}}}
% \newcommand{\toffcover}{\emm{\toff^\emr{cover}}}
% \newcommand{\tsigbeam}{\emm{\tsig^\emr{beam}}}
% \newcommand{\tsigcover}{\emm{\tsig^\emr{cover}}}

% \newcommand{\fdump}[1][]{\emm{f_\emr{dump}}}
% \newcommand{\vlin}[1][]{\emm{v_\emr{linear}^\emr{#1}}}
% % \newcommand{\varea}[1][]{\emm{v_\emr{area}^\emr{#1}}}
% \newcommand{\vlinmax}{\vlin[max]}
% \newcommand{\vareamax}{\varea[max]}
% \newcommand{\rowseparation}{\emm{\Delta\theta}}

% \newcommand{\tstable}{\tint[stable]}
% \newcommand{\Asubmap}{\emm{A_\emr{submap}}}
% \newcommand{\tsubmap}{\tint[submap]}
% \newcommand{\nsubmap}{\emm{n_\emr{submap}}}
% \newcommand{\ncover}{\emm{n_\emr{cover}}}

% \newcommand{\cint}[1]{\texttt{int(}#1\texttt{)}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Makes fancy headings and footers.
\pagestyle{fancy}

\fancyhf{} % Clears all fields.

\lhead{\scshape IRAM-30m EMIR time/sensitivity estimator}
\rhead{\scshape \nouppercase{\rightmark}}   %
\fancyfoot[C]{\bfseries \thepage{}}

\renewcommand{\headrulewidth}{0pt}    %
\renewcommand{\footrulewidth}{0pt}    %

\renewcommand{\sectionmark}[1]{%
  \markright{\thesection. \MakeLowercase{#1}}}
\renewcommand{\subsectionmark}[1]{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title{IRAM Memo 2019-??\\[3\bigskipamount]
  IRAM-30m setup facility}%
\author{J. Pety$^{1,2}$, W.Kim$^{3}$\\[0.5cm]
  1. IRAM (Grenoble) \\
  2. Observatoire de Paris\\
  3. IRAM (Granada)}%
\date{Mar, 21st 2019\\
  Version 0.1}

\maketitle

\begin{abstract}
\end{abstract}

\vspace*{3cm}

\newpage{}

\tableofcontents{}
\newpage{}

\begin{itemize}
\item Dump time: \tdump{} is a user-define variable in second. It is set to
  2 seconds by default.
% \item Phase time: \tphase{}. In PSW, $\tphase = \tdump$. In FSW, each final
%   spectra will be obtained by the combination of the two phases. Hence
%   $\tphase = 0.5\tdump{}$.
\item Map geometry:
  \begin{itemize}
  \item Sampling along the scanning direction.
    \begin{itemize}
    \item Beam sampling is the number of dump per telescope beam (HPBW)
      \ndumpperbeam{}. Along the scanning direction, the OTF response is
      the convolution of the telescope beam times a boxcar function whose
      width depends on the integration time. This implies that the OTF
      response is elongated in the scanning direction. It can be shown that
      this elongation decrease when \ndumpperbeam{} increases. The minimum
      value enforced here is 3. While desirable, higher values will imply
      larger data rates. So the user must be careful that the acquisition
      system will not be overloaded when increasing \ndumpperbeam{}. May
      be, this could be checked.
    \item Sampling angle: $\parasampling = \hpbw/\ndumpperbeam$ with
      $\frac{\hpbw}{1''} = 2460\,\frac{1\MHz}{\freq}.$
    \end{itemize}
  \item Sampling angle perpendicular to the scanning direction
    \perpsampling{}. We wish to get a Nyquist sampled map. This implies
    that the distance between two OTF lines must be
    $\perpsampling \le \frac{\wavelength}{2\diameter}$, where \wavelength{}
    is the observation wavelength and \diameter{} is the telescope
    diameter.
  \item OTF map size: \mapsize[x] and \mapsize[y]. User defined size of the
    map.
  \item OTF line length: $\linelength[x] = 1.1\,\mapsize[x]$ and
    $\linelength[y] = 1.1\,\mapsize[y]$ in order to take care of edge
    effect due to difficulties to start OTF at the start of the line if
    \texttt{overtime} is on.
  \item Number of OTF lines: \nline[x] and \nline[y].
    $\nline[x] = nint(1+\linelength[y]/\perpsampling)$
    $\nline[y] = nint(1+\linelength[x]/\perpsampling)$
  \item Slew velocity: $\vslew = \frac{\parasampling}{\tdump}$.
  \item Number of dumps per OTF line:
    $\ndumpperline = \ceiling\paren{\frac{\linelength{}}{\parasampling}}.$
  \item Time to scan one OTF line: $\totf = \tdump\,\ndumpperline.$
  \item Because of the ceiling the OTF line length must be recomputed:
    $\linelength{} = \vslew\,\totf.$
  \end{itemize}
\item One subscan full loop:
  \begin{itemize}
  \item The OTF mode assumes that the atmosphere is frozen between the
    observations of two consecutive references. We will call stability
    time, \tstab, the maximum time where this assumption is OK. The default
    value is 120 seconds.
  \item We now compute the number of OTF lines, \nlineperfullloop, which
    fits during the stability time. This will gives the typical subscan
    loop pattern, e.g., ROOOOR.  $\nlineperfullloop = int(\tstab/\totf).$
    $\nlineperfullloop = 0$ means that the time to slew a line is larger than
    the stability time. The user should either decrease the size of the
    map.  Decreasing the dump time is an alternative if the data rate does
    not increase beyond the system capability.
  \item Actual time between two reference observations:
    $\tbtwref = \nlineperfullloop\,\totf.$
  \end{itemize}
\item Integration time on reference position per subscan loop:
  \begin{itemize}
  \item The number of independent measurement (\nbeam{}) between two
    references which is given by
    \begin{equation}
      \nbeam = \frac{\Abtwref}{\Abeam},
    \end{equation}
    where \Abtwref{} and \Abeam{} are the sky area scanned between two
    references and the area of the resolution element (telescope beam).
    The resolution element area is linked to the telescope full width at
    half maximum (\hpbw{}) by
    \begin{equation}
      \Abeam = \frac{\grideff\,\pi\,\hpbw^2}{4\,\ln(2)}
    \end{equation}
    where \grideff{} comes from the fact that the OTF data is gridded by
    convolution. When the convolution kernel is a Gaussian of FWHM equal to
    $\hpbw/3$ (the default inside the \texttt{GILDAS/CLASS} software), it
    is easy to show that
    \begin{equation}
      \grideff = 1+\frac{1}{9} \simeq 1.11.
    \end{equation}    
    The sky area scanned between two references is
    $\Abtwref = \vslew\,\parasampling\,\tbtwref.$    
  \item When sharing the off-position between several on, \citet{ball76}
    showed that the optimal off integration time is
    \begin{equation}
      \tref^\emr{optimal} = \sqrt{\nonperoff} \, \ton
      \label{eq:toff:optimal}
    \end{equation}
    where \nonperoff{} is the number of on measurements per off. In our
    case, it is
    \begin{equation}
      \nonperoff = \nbeam = \frac{\Abtwref}{\Abeam},
      \quad \mbox{and} \quad
      \ton = \frac{\tbtwref}{\nbeam}.
    \end{equation}
    This yields
    \begin{equation}
      \tref^\emr{optimal} = \frac{\tbtwref}{\sqrt{\nbeam}}.
    \end{equation}
    In the ON-OFF calibration procedure of OTF observations, the
    references on both sides of the ON are used to compute the associated
    OFF (by linear interpolation with the time distance of the ON). The
    actual integration time on each reference is thus divided by two
    \begin{equation}
      \tref = 0.5\,\tref^\emr{optimal}.
    \end{equation}
    Moreover, \texttt{Pako} enforces a minimum integration time in the
    reference position to be 10 seconds. Hence
    \begin{equation}
      \tref = \max\paren{\frac{\tbtwref}{2\sqrt{\nbeam}},10\,s}.
    \end{equation}
  \item Time of subscan loop:
    $\tfullloop = \nlineperfullloop\,\totf+2\,\tref$.
  \end{itemize}
\item OTF full scan
  \begin{itemize}
  \item Number of subscan loops per OTF full scan, \ie, between two
    consecutive calibrations:
    \begin{equation}
      \nfullloopperfullscan = \floor \paren{\frac{\tmaxcal}{\tfullloop}}. 
    \end{equation}
    $\nfullloopperfullscan = 0$ means that the time to make one OTF loop,
    e.g., ROOOR, is larger than the maximum time between two
    calibrations. The user should either increase the maximum time between
    two calibrations, or decrease the stability time.
  \item Scan duration:
    $\tfullscan = \nfullloopperfullscan\,\tfullloop$.
  \item Number of OTF lines per OTF full scan:
    $\nlineperfullscan = \nfullloopperfullscan\,\nlineperfullloop$.
  \end{itemize}  
\item Number of full scans per coverage. Is there any residual?
  \begin{itemize}
  \item Number of OTF full scans needed to cover the requested field of
    view:
    $\nfullscanpercov = \floor \paren{\frac{\nline{}}{\nlineperfullscan}}$.
  \item If $\nline[\emr{perp}] > (\nfullscanpercov\,\nlineperfullscan)$,
    there is a number residual lines, $\nresidual$, which need to be
    observed.
    $\nresidual = \nline[\emr{perp}] -
    (\nfullscanpercov\,\nlineperfullscan)$. Else $\nresidual = 0$.
  \end{itemize}
\item Residual time and number of calibrations per coverage:
  \begin{itemize}
  \item If no residual line, there is no residual time, $\tresidual = 0$,
    and $\ncalpercov = \nfullscanpercov$.
  \item If there are residual lines,
    $\tresidual = \nresidual\,\totf+2\,\tref$, and
    $\ncalpercov = \nfullscanpercov+1$.
  \end{itemize}
\item Observing time per coverage
  \begin{itemize}
  \item Total calibration time per coverage:
    $\ttotcal = \ncalpercov\,\tcal$.
  \item Total time per coverage:
    $\tcov = \nfullscanpercov\,\tfullscan+\tresidual+\ttotcal$.
  \end{itemize}
\end{itemize}


\begin{thebibliography}{9}
  \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
  
\bibitem[{Ball (1976)}]{ball76} Ball, J. A., in Meth. Exper. Phys.,
  Vol. 12, Part C, Astrophysics: Radio Observations, Chap. 4.3, p. 46,
  ed. M. L. Meeks

\end{thebibliography}

\newpage{}
\appendix{}

\section{Optimal number of ON per OFF measurements}

This section is just a reformulation of the original demonstration
by~\citet{ball76}.

Let's assume that we are measuring \nonperoff{} \emph{independent}
on-positions for a single off. The same integration time (\ton{}) is spent
on each on-position and the off integration time is
\begin{equation}
  \toff = \alpha \, \ton,
\end{equation}
where $\alpha$ can be varied. Using eq.~\ref{eq:radiometer:2} and $\tonoff
= \nonperoff \ton + \toff = (\nonperoff+\alpha)\,\ton$, it can be shown
than
\begin{equation}
  \tonoff = \frac{\Tsys^2}{\speceff^2\,\sigma^2\,\dnu} \paren{1+\nonperoff+\alpha+\frac{\nonperoff}{\alpha}}.
\end{equation}
Differenciating with respect to $\alpha$, we obtain
\begin{equation}
  \frac{d\tonoff}{d\alpha} \propto 1-\frac{\nonperoff}{\alpha^2}
\end{equation}
Setting the result to zero then gives that
the minimum elapsed time to reach a given rms noise is obtained for
\begin{equation}
  \alpha = \sqrt{\nonperoff} \quad \mbox{or} \quad
  \toff^\emr{optimal} = \sqrt{\nonperoff} \, \ton.
\end{equation}



\end{document}






\section{On-The-Fly observations}
\label{sec:otf}

\subsection{Additional notions and notations}

The On-The-Fly (OTF) observing mode is used to map a given region of the
sky. The time/sensitivity estimator will have to link the elapsed telescope
time to cover the whole mapped region to the sensitivity in each
independent resolution element. To do this, we need to introduce
\begin{itemize}
\item \Amap{} and \Abeam{}, which are respectively the area of the map and
  the area of the resolution element. The map area is a user input while
  the resolution area is linked to the telescope full width at half maximum
  (\hpbw{}) by
  \begin{equation}
    \Abeam = \frac{\grideff\,\pi\,\hpbw^2}{4\,\ln(2)}
  \end{equation}
  where \grideff{} comes from the fact that the OTF data is gridded by
  convolution. When the convolution kernel is a Gaussian of FWHM equal to
  $\hpbw/3$ (the default inside the \texttt{GILDAS/CLASS} software), it is
  easy to show that
  \begin{equation}
    \grideff = 1+\frac{1}{9} \simeq 1.11.
  \end{equation}
\item The number of independent measurement (\nbeam{}) in the final map
  which is given by
  \begin{equation}
    \nbeam = \frac{\Amap}{\Abeam}.
    \label{eq:nbeam:1}
  \end{equation}
\item The on and off time spent per independent measurement, \tonbeam{} and
  \toffbeam{}. The associated \tsigbeam{} can then be written
  \begin{equation}
    \tsigbeam = \frac{\tonbeam\,\toffbeam}{\tonbeam+\toffbeam}
  \end{equation}
\item The on and off time spent to map the whole map,
  \tontot{} and \tofftot{}. \tonoff{} is deduced from \tontot{} and
  \tofftot{} in a way which depends on the switching scheme.
\end{itemize}
In addition, we must ensure that the user does not try to scan faster than
the telescope can slew. To do this, we need to introduce
\begin{itemize}
\item The linear scanning speed, \vlin{}, and its maximum value, \vlinmax{}.
\item The area scanning speed, \varea{}, and its maximum value,
  \vareamax{}. When the scanning pattern is linear, then \varea{} and
  \vlin{} are linked through
  \begin{equation}
    \varea = \vlin \, \rowseparation,
  \end{equation}
  where \rowseparation{} is the separation between consecutive rows. To
  avoid nasty signal and noise aliasing problems, we must ensure a Nyquist
  sampling, \ie{}
  \begin{equation}
    \rowseparation = \frac{\hpbw}{2.5}.
  \end{equation}
\end{itemize}

\subsection{Frequency switched}
\label{sec:otf:fsw}

In frequency switched observations, the switching happens as the telescope
is slewed. This is correct as long as the switching time is much smaller
than the time needed to slew a significant fraction of the telescope beam.

It is easy to understand that
\begin{equation}
  \tonoff = \tontot = \tofftot,
\end{equation}
\begin{equation}
  \tonbeam = \toffbeam = \frac{\tonoff}{\nbeam},
\end{equation}
\begin{equation}
  \tsigbeam = \frac{\tonbeam}{2} = \frac{\toffbeam}{2} = \frac{\tonoff}{2\nbeam},
\end{equation}
and 
\begin{equation}
  \noise[fsw] = \frac{\sqrt{2\,\nbeam}\,\Tsys}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}}.
\end{equation}
The velocity check can then be written as
\begin{equation}
  \frac{\Amap}{\tonoff} \le \vareamax.
\end{equation}

\subsection{Position switched}
\label{sec:otf:psw}

\subsubsection{Two key points: 1) Sharing OFF among many ONs and 2) system
  stability timescale}

When the stability of the system is long enough, we can share the same off
for several \emph{independent} on-positions measured in a row (\eg{}
ON-ON-ON-OFF-ON-ON-ON-OFF...). The first key point here is the fact that
the on-positions must be independent. The OTF is an observing mode where
the sharing of the off can be used because the goal is to map a given
region of the sky made of independent positions or resolution elements.
When sharing the off-position between several on, \citet{ball76} showed
that the optimal off integration time is
\begin{equation}
  \toff^\emr{optimal} = \sqrt{\nonperoff} \, \ton
  \label{eq:toff:optimal}
\end{equation}
where \nonperoff{} is the number of on measurements per off. Replacing
\toff{} by its optimal value in eq.~\ref{eq:radiometer:3}, we obtain
\begin{equation}
  \tsig = \frac{\ton}{1+\frac{1}{\sqrt{\nonperoff}}}
  \quad \mbox{and} \quad
  \noise =
  \frac{\Tsys}{\speceff\sqrt{\dnu\,\npol\,\ton}}\sqrt{1+\frac{1}{\sqrt{\nonperoff}}}.
  \label{eq:tsig:onperoff}
\end{equation}
We thus see that the rms noise decreases when the number of independent on
per off increases. It seems tempting to have only one off for all the on
positions of the OTF map. However, the second key point of the method is
that the system must be stable between the first and last on
measurement. To take this point into account we must introduce
\begin{itemize}
\item The concept of submap, which is a part of a map observed between two
  successive off measurements. 
\item \Asubmap{}, which is the area covered by the
  telescope in each submap.
\item \nsubmap{} the number of such submaps needed to cover the whole map
  area. 
\item \tstable{}, the typical time where the system is stable. This time
  will be the maximum time between two off measurements, which is noted
  \tsubmap{}.
\item \ncover{}, the number of coverages needed either to reach a given
  sensitivity or to exhaust the acquisition time.
\item \toncover{} and \toffcover{} are the times spent respectively on and
  off per independent measurement and per coverage.
\end{itemize}
We note that the number of on per off (\nonperoff{}) is a purely
geometrical quantity. This implies that the time spent off is linked to the
time spent on by Eq.~\ref{eq:toff:optimal} both in each individual coverage
and when averaging all the coverages.

\subsubsection{Relation between \tonoff{} and \tsigbeam{}}

By construction
\begin{itemize}
\item The number of submaps is the area of the map divided by the area of a
  submap
  \begin{equation}
    \nsubmap = \frac{\Amap}{\Asubmap}.
    \label{eq:nsubmap}
  \end{equation}
\item The number of on per off is the number of independent resolution
  elements in each submap
  \begin{equation}
    \nonperoff = \frac{\Asubmap}{\Abeam}.
    \label{eq:nonperoff}
  \end{equation}
\item The number of independent resolution elements in the map is the
  product of number of submaps by the number of on per off
  \begin{equation}
    \nbeam = \nsubmap\,\nonperoff.
    \label{eq:nbeam:2}
  \end{equation}
\item The submap area is the product of the area velocity by the time to
  cover it
  \begin{equation}
    \Asubmap = \varea \, \tsubmap.
    \label{eq:asubmap}
  \end{equation}
\item The time to scan a submap is the sum of the \nonperoff{} independent
  on integration time
  \begin{equation}
    \tsubmap = \nonperoff\,\toncover.
    \label{eq:tsubmap}
  \end{equation}
\item The relations between times per coverage and times integrated over
  all the coverages are
  \begin{equation}
    \tonbeam = \ncover\,\toncover 
    \quad \mbox{and} \quad
    \toffbeam = \ncover\,\toffcover
    \quad \mbox{with} \quad
    \toffcover = \sqrt{\nonperoff}\,\toncover.
  \end{equation}
\item Using the last two points, it is easy to derive
  \begin{equation}
    \tsigbeam = \ncover\,\tsigcover 
              = \frac{\ncover\,\tsubmap}{\nonperoff+\sqrt{\nonperoff}}.
    \label{eq:otf:psw:tsigbeam}
  \end{equation}
\item Finally, the total time spent on and off is given by
  \begin{equation}
    \tonoff = \ncover\,\nsubmap\,(\nonperoff\,\toncover + \toffcover).
  \end{equation}
  Using Eqs.~\ref{eq:toff:optimal} and~\ref{eq:tsubmap}, we derive
  \begin{equation}
    \tonoff =
    \ncover\,\tsubmap\,\nsubmap\,\paren{1+\frac{1}{\sqrt{\nonperoff}}}.
    \label{eq:otf:psw:tonoff}
  \end{equation}  
\end{itemize}
Both \tsigbeam{} and \tonoff{} are proportional to $\ncover\,\tsubmap$
(\cf{} Eqs.~\ref{eq:otf:psw:tsigbeam} and~\ref{eq:otf:psw:tonoff}). It is
thus easy to derive that
\begin{equation}
  \tonoff = \tsigbeam\,\nsubmap\,\paren{1+\sqrt{\nonperoff}}^2.
\end{equation}
Using Eq.~\ref{eq:nbeam:2}, we can replace \nonperoff{} and obtain
\begin{equation}
  \tonoff = \tsigbeam\,\paren{\sqrt{\nsubmap}+\sqrt{\nbeam}}^2.
  \label{eq:otf:psw:tonoffvstsig}
\end{equation}
Using Eqs.~\ref{eq:radiometer:3}, \ref{eq:tel-vs-onoff}
and~\ref{eq:otf:psw:tonoffvstsig}, we obtain
\begin{equation}
  \noise[psw] =
  \frac{\paren{\sqrt{\nbeam}+\sqrt{\nsubmap}}\,\Tsys}{\speceff\,\sqrt{\dnu\,\npol\,\obseff\,\ttel}}.
\end{equation}
The last equation in theory enables us to find the rms noise as a function
of the elasped telescope time (sensitivity estimation) and vice-versa (time
estimation). However, it is not fully straightforward because we must
enforce that \ncover{} and \nsubmap{} have an integer value. 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
