\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}

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

\fancyhf{} % Clears all fields.

\lhead{\scshape IRAM-30m HERA 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]{}

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

\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{\tint}[1][]{\emm{t_\emr{#1}}}
\newcommand{\tonoff}{\tint[onoff]}
\newcommand{\tonoffpix}{\emr{\tint[onoff]^{pix}}}
\newcommand{\ton}{\tint[on]}
\newcommand{\toff}{\tint[off]}
\newcommand{\tsig}{\tint[sig]}
\newcommand{\ttel}{\tint[tel]}

\newcommand{\noise}[1][]{\emm{\sigma_\emr{#1}}}
\newcommand{\Tsys}{\emm{T_\emr{sys}}}
\newcommand{\obseff}{\emm{\eta_\emr{tel}}}
\newcommand{\speceff}{\emm{\eta_\emr{spec}}}
\newcommand{\edgeeff}{\emm{\eta_\emr{edge}}}
\newcommand{\edgeeffmin}{\emm{\eta_\emr{edge}^\emr{min}}}

\newcommand{\dnu}{\emm{d\nu}}

\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{\Aedge}{\emm{A_\emr{edge}}}
\newcommand{\Amap}[1][]{\emm{A_\emr{map}^\emr{#1}}}
\newcommand{\Atarget}{\emm{A_\emr{target}}}
\newcommand{\Abeam}{\emm{A_\emr{beam}}}
\newcommand{\beam}{\emm{\theta}}
\newcommand{\grideff}{\emm{\eta_\emr{grid}}}
\newcommand{\nbeam}{\emm{n_\emr{beam}}}
\newcommand{\nbeampix}{\emm{n_\emr{beam}^\emr{pix}}}

\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{\nonperoff}{\emm{n_\emr{on/off}}}
\newcommand{\tstable}{\tint[stable]}
\newcommand{\Achunk}{\emm{A_\emr{chunk}}}
\newcommand{\tchunk}{\emm{t_\emr{chunk}}}
\newcommand{\Achunknew}{\emm{A_\emr{chunk}^\emr{new}}}
\newcommand{\tchunknew}{\emm{t_\emr{chunk}^\emr{new}}}
\newcommand{\Asubmap}{\emm{A_\emr{submap}}}
\newcommand{\tsubmap}{\tint[submap]}
\newcommand{\nsubmap}{\emm{n_\emr{submap}}}
\newcommand{\ncover}{\emm{n_\emr{cover}}}
\newcommand{\Asubmappix}{\emm{A_\emr{submap}^\emr{pix}}}
\newcommand{\nsubmappix}{\emm{n_\emr{submap}^\emr{pix}}}

\newcommand{\nsubscan}{\emm{n_\emr{subscan}}}
\newcommand{\sqrtnpix}{\emm{\sqrt{n_\emr{pix}}}}
\newcommand{\npix}{\emm{n_\emr{pix}}}
\newcommand{\npol}{\emm{n_\emr{pol}}}
\newcommand{\weight}{\emm{w}}
\newcommand{\Tsysave}{\emm{\overline{T}_\emr{sys}}}

\newcommand{\beamsep}{\emm{\Delta}}
\newcommand{\rowsep}{\emm{\delta}}
\newcommand{\groupsep}{\emm{\delta'}}
\renewcommand{\angle}{\emm{\alpha}}
\newcommand{\nperp}{\emm{n_\bot}}
\newcommand{\dperp}{\emm{d_\bot}}
\newcommand{\dpara}{\emm{d_\|}}
\newcommand{\dedge}{\emm{d_\emr{edge}}}
\newcommand{\aspect}{\emm{a}}
\newcommand{\tedgepix}{\emm{t_\emr{edge}^\emr{pix}}}

\newcommand{\floor}{\emr{floor}}

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

\newcommand{\TabEdge}{%
  \begin{table}
    \centering
    \caption{Mapping strategy to minimize edge effects.}
    \begin{tabular}{cccc}
      \hline
      \hline
      \tchunk{} & \nperp{} & \aspect{} & \edgeeff{} \\
         min.    &          &           &            \\
      \hline
       1  & 1 & 3.7 & 0.83 \\
       2  & 2 & 1.9 & 0.83 \\
       5  & 4 & 1.2 & 0.86 \\
       10 & 6 & 1.1 & 0.90 \\
      \hline
    \end{tabular}
    \label{tab:edge}
  \end{table}}

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

\begin{document}

\title{IRAM-30m HERA time/sensitivity estimator}%
\author{J. Pety$^{1,2}$, M.~Gonz\'a{}lez$^{3}$, S. Bardeau$^{1}$, E. Reynier$^{1}$\\[0.5cm]
  1. IRAM (Grenoble) \\
  2. Observatoire de Paris \\
  3. IRAM (Granada)}
\date{Feb., 18th 2010\\
  Version 1.0}

\maketitle

\begin{abstract}
  This memo describes the equations used in the IRAM-30m HERA
  time/sensitivity estimator available on the IRAM-30m web page. A large
  part of the memo aims at describing the peculiarities of time/sensitivity
  estimation of the On-The-Fly observing mode with a multi-pixel like HERA.
  It explains how to generalize the equations of the single pixel case, so
  that the same code can be used in both cases (single and multi-pixel).
\end{abstract}

\section{Summary of the formulas for a single pixel receiver}

We summarize here the relations between the rms noise (\noise{}) and the
elapsed telescope time (\ttel) derived by~\citet{pety09} in the case of a
single-pixel heterodyne receiver. The results depends on a combination of
\begin{itemize}
\item The observation kind:
  \begin{description}
  \item[Tracked observations] where the telescope track the source, \ie{}
    it always observes the same position in the source referential. The
    result is a single spectra.
  \item[On-The-Fly observations] where the telescope continuously slew
    through the source with time to map it. The result is a cube of
    spectra.
  \end{description}
\item and of the switching mode:
\begin{description}
\item[Position switch] where the off-measurement is done on a close-by sky
  position devoid of signal. Wobbler switching is a particular case.
\item[Frequency switch] where the telescope always points towards the the
  source and the switching is done in the frequency (velocity) space. In
  this case,
\end{description}
\end{itemize}
The formulas are
\begin{itemize}
\item for tracked observations
  \begin{equation}
    \noise[psw]^\emr{track} = \frac{2\,\Tsys}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}},
    \quad \mbox{and} \quad
    \noise[fsw]^\emr{track} = \frac{\sqrt{2}\,\Tsys}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}}.
    \label{eq:rms:track}
  \end{equation}
\item for OTF observations 
  \begin{equation}
    \noise[psw]^\emr{otf} = \frac{\paren{\sqrt{\nbeam}+\sqrt{\nsubmap}}\,\Tsys}{\speceff\,\sqrt{\dnu\,\npol\,\obseff\,\ttel}},  
    \quad \mbox{and} \quad
    \noise[fsw]^\emr{otf} = \frac{\sqrt{2\,\nbeam}\,\Tsys}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}}.
    \label{eq:rms:otf}
  \end{equation}
\end{itemize}
In these formulas
\begin{itemize}
\item \obseff{} is the efficiency of the telescope. It includes the time
  needed 1) to do calibrations (\eg{} pointing, focus, temperature scale
  calibration), and 2) to slew the telescope between useful integrations,
  etc... Its value is decided by IRAM: It should \emph{not} be changed by
  the PI.
\item \speceff{} is the spectrometer efficiency.
\item \dnu{} is the frequency resolution.
\item \npol{} is the number of polarizations tuned at the same frequency (1
  or 2).
\item \Tsys{} is the system temperature, which is a summary of the noise
  added by the system. It is usual to approximate it (in the \Tas{} scale)
  with
  \begin{equation}
    \Tsys = \frac{\paren{1+\gim}\exp\cbrace{\taus\,\A}}{\Feff}
    \bracket{\Feff\,\Tatm\,\paren{1-\exp\cbrace{-\taus\,\A}}+\paren{1-\Feff}\Tcab+\Trec},
  \end{equation}
  where \gim{} is the receiver image gain, \Feff{} the telescope forward
  efficiency, $\A = 1/\sin(\emr{elevation})$ the airmass, \taus{} the
  atmospheric opacity in the signal band, \Tatm{} the mean physical
  atmospheric temperature, \Tcab{} the ambient temperature in the receiver
  cabine and \Trec{} the noise equivalent temperature of the receiver and
  the optics.
\item \nbeam{} is the number of independent measurement in the map observed
  in the OTF mode. It is given by
  \begin{equation}
    \nbeam = \frac{\Amap}{\Abeam}
    \quad \mbox{with} \quad
    \Abeam = \frac{\grideff\,\pi\,\beam^2}{4\,\ln(2)}.
    \label{eq:nbeam}
  \end{equation}
  where \Amap{} is the map area, \Abeam{} is the area of the resolution
  element in the map, \grideff{} is the smoothing factor due to gridding
  and \beam{} is the telescope full width at half maximum.
\item \nsubmap{} the number of submaps needed to cover the whole map area,
  a submap being the area covered between two successive off
  measurements. \nsubmap{} is computed with
  \begin{equation}
    \nsubmap = \frac{\Amap}{\Asubmap}
    \quad \mbox{with} \quad
    \Asubmap = \frac{\beam}{2.5}\,\vlin\,\tstable
    \label{eq:nsubmap}
  \end{equation}
  where \vlin{} is the telescope scanning speed and \tstable{} is the
  typical timescale of stability of the observing system.
\end{itemize}
The demonstrations and additional subtleties for the OTF case are fully
described in~\citet{pety09}.

\section{Generalization to a multi-pixel receiver}

\subsection{Description of HERA, the IRAM-30m multi-pixels}

HERA is a multi-pixel receiver working at 1~mm of wavelength. Each pixel is
an heterodyne mixer using a SIS junction. There are nine pixels per
polarization. The pixels of one polarization follow a $3\times3$ square
pattern, the distance between two pixels being $\Delta = 24''$. Both
polarizations are aligned. Hence, HERA has 18 pixels in total looking at 9
different sky position simultaneously. The polarizations of HERA can
simultaneously be tuned at two different frequencies. 

The number of used polarization, \npol{} can thus be set to 1 or 2 and the
number of pixels per polarization is $\npix = 9$.

\subsection{An average pixel}

The scatter of the mixer performances, which translate into a scatter of
receiver temperatures, is the first thing to deal with. Instead of
computing the sensitivity associated with each mixer, we introduce an
average pixel, which will represent all the other ones. In
Eqs.~\ref{eq:rms:track} and~\ref{eq:rms:otf}, the caracteristics of the
mixers are hidden into the system temparature, \Tsys{}. We will thus define
an average system temperature, \Tsysave{}, which will represent the
receiver average pixel.

Among the different ways to define such an average system temperature, we
priviledge the one which will give the right sensitivity in the case where
the same point of the sky is seen by all the different pixels. This choice
is made because 1) the same point of the sky is at least seen by two pixels
(one per polarization) and 2) it is a good idea when mapping to try to
cover the mapped area as many time as possible with sligthly different
observing configuration of HERA (\eg{} rotations by 90$\deg$) to homogenize
the noise distribution and to ensure that bad pixels see different part of
the mapped area.

It is well-known that the optimal way to combine (\eg{} to average or to
grid) spectra is to weight them by $\weight = 1/\noise^2$ before
combination, where \noise{} is their rms noise. In this case, it can be
shown that the weight of the combination is the linear sum of the
weights. From this, it is easy to define \Tsysave{} as
\begin{equation}
  \frac{\npol\,\npix}{\Tsysave^2} = \sum_{i=1,\npol,\,j=1,\npix} \frac{1}{T^2_{\emr{sys}_{ij}}}.
  \label{eq:tsysave}
\end{equation}

\subsection{Impact on tracked observations}

During tracked observations, each pixel of one polarization will look at a
different position of the sky, but always the same position with time.  We
thus simply have to change \Tsys{} by \Tsysave{} in
Eqs.~\ref{eq:rms:track}, \ie{}
\begin{equation}
  \noise[psw]^\emr{track} = \frac{2\,\Tsysave}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}},
  \quad \mbox{and} \quad
  \noise[fsw]^\emr{track} = \frac{\sqrt{2}\,\Tsysave}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}}.
\end{equation}

\subsection{Imaging with HERA}

HERA has a derotator, which ensures that the pixels do not rotate on the
sky. The sky can thus be mapped by scanning along \eg{} the right ascension
or the declination axis in equatorial coordinates. We aim at obtaining a
fully sampled map, implying a distance between the rows of $\beamsep =
\beam/2.5$, where \beam{} is the beam full width at half maximum: At 1~mm,
this corresponds typically to $4''$. However, the pixels are typically
separated by $\beamsep \simeq 2\beam$. We thus have to find the best
scanning strategy which will fill the hole of the instantaneous footprint
of the multi-pixel. To do this, we will use a property of the deroratator,
\ie{} it can be configured so that one of the main axes of the multi-pixel
is rotated by an angle (\angle{}) from the scanning direction. Indeed, we
can ask what is the value of \angle{} needed so that the distance between
the rows of two adjacent pixels is exactly \beamsep{}. For a receiver of
$\sqrtnpix\times\sqrtnpix$ pixels, we end up with \sqrtnpix{} groups of
lines, the distance between two group of lines being noted \groupsep{}. A
bit of geometry gives
\begin{equation}
  \rowsep = \beamsep\,\sin\angle
  \quad \mbox{and} \quad
  \groupsep = \beamsep\,\cos\angle.
  \label{eq:groupandrow}
\end{equation}
If we now impose that 
\begin{equation}
  \groupsep = \nsubscan\,\sqrtnpix\,\rowsep,
  \label{eq:groupvsrow}
\end{equation}
we obtain
\begin{equation}
  \tan\angle = \frac{1}{\nsubscan\,\sqrtnpix}.
\end{equation}
We can fully sample without redundancy a given fraction of the sky in a
single subscan ($\nsubscan=1$) or in two parallel subscans (zigzag,
$\nsubscan=2$). 

For HERA, $\sqrtnpix = 3$ and the \beamsep{} value is fixed to $4''$ by the
observing wavelenght $\sim 1$~mm. $\nsubscan = 1$ gives $\angle =
18.4^\circ$, $\beamsep \sim 12''$ and $\nsubscan = 2$ gives $\angle =
9.5^\circ$, $\beamsep \sim 24''$. Current optical design implies a minimum
distance between the pixels which is only compatible with the $\nsubscan=2$
solution.

In summary, by setting an angle of $9.5^\circ$ between one of the main axes
of a $3\times3$ multi-pixels and the scanning direction, we can sweep in a
fully sampled mode a given portion of the sky with two parallel scans
separated by $3\rowsep = 12''$. The region of the sky fully sampled will
then be rectangular: the length of the rectangular side perpendicular to
the scanning direction is then $\dperp = \nsubscan\npix\rowsep$, while the length
of the rectangular size parallel to the scanning direction, \dpara{}, will
depend on the observing strategy. However, there is an edge effect, due to
the rotation of the array from the scanning direction. Indeed, the edges of
the maps are not fully sampled: Thus must thus be considered as overheads.
The area of the scanned sky must thus be larger than the targeted area,
which must be fully sampled.  Let's assume that the targeted area
(\Atarget) is swept as a succession of \nperp{} rectangles of size
$\dperp\times\dpara$. We get
\begin{equation}
  \Atarget = \nperp\,\dperp\,\dpara.
  \label{eq:Atarget}
\end{equation}
The area swept in the under-sampled edges (\Aedge) is just the area of the
rectangle whose side sizes are $\nperp\,\dperp$ and the scanning size of
multi-pixel rotated by \angle, \ie{} 
\begin{equation}
  \dedge = (\sqrtnpix-1)\,\beamsep\,(\cos\angle+\sin\angle) 
\end{equation}
Indeed, the geometry of the edges show that half this area is covered on
each size of the targeted area. Using Eqs.~\ref{eq:groupandrow}
and~\ref{eq:groupvsrow}, we obtain
\begin{equation}
  \dedge = (\sqrtnpix-1)\,(1+\nsubscan\,\sqrtnpix)\rowsep
\end{equation}

We now define the mapping efficiency \edgeeff{} as
\begin{equation}
  \edgeeff = \frac{\Atarget}{\Atarget+\Aedge},
  \quad \mbox{with} \quad
  \Aedge = \nperp\,\dperp\,\dedge.
  \label{eq:mapeff}
\end{equation}
Replacing \Atarget{} and \Aedge{} by their expressions~\ref{eq:Atarget}
and~\ref{eq:mapeff}, we derive
\begin{equation}
  \edgeeff = \frac{1}{1+\frac{\dedge}{\dpara}}
           = \frac{1}{1+\frac{\dedge}{\aspect\,\nperp\,\dperp}}.
\end{equation}
This expression indicates that the most efficient mapping strategy is to
observe very wide scans. However, avoiding the edge overheads is only one
aspect of wide-field mapping with a multi-pixels. In particular, we aim at
having the most homogeneous map as possible. To achieve this, we need to
scan as fast as possible so that the observing conditions are as comparable
as possible on the whole map. We can then repeat the map as many time as
possible so that the data affected by technical problems or bad weather
happening during one coverage can just be discarded. In any case, at least
two coverages obtained in perpendicular scanning direction is always advise
to be able to use destriping algorithms (\eg{} plait algorithms). Stripes
happen because the system stability (weather, telescope, receiver and
backend) evolves from one row to the other. Getting stripes is all the more
probable than the time to scan a row is long. So this argues against making
very wide scans, which are at the same time required to decrease the
relative time spent in the edge overheads. A compromise is thus to map area
chunks which are as close as possible to squares. A way to parametrize this
is to introduce the map aspect ratio, defined as
\begin{equation}
  \aspect = \frac{\dpara}{\nperp\,\dperp}
  \quad \mbox{with} \quad
  \aspect > 1
  \quad \mbox{and} \quad
  \nperp \mbox{ integer.}
  \label{eq:aspect}
\end{equation}

A given area \Amap{} will be mapped in chunks whose area (\Achunk{}) is
defined by the linear scanning speed and the time of stability of the
system (\tchunk{}). This gives
\begin{equation}
  \nperp\,\dperp\,(\dpara+\dedge) = \Achunk
  \quad \mbox{with} \quad
  \Achunk = \vlin\,\dperp\,\tchunk.
\end{equation}
Using~\ref{eq:aspect} to replace \dpara{} by $\aspect\,\nperp\,\dperp$, we
yield
\begin{equation}
  \nperp^2 + \nperp\,\frac{\dedge}{\aspect\,\dperp} - \frac{\Achunk}{\aspect\,\dperp^2} = 0.
  \label{eq:nperp}
\end{equation}
This equation of the 2nd order has only one physical solution
\begin{equation}
  \nperp = \frac{1}{2}\,\frac{\dedge}{\aspect\,\dperp}\,\bracket{\sqrt{1+\frac{4\aspect\,\Achunk}{\dedge^2}}-1}.
\end{equation}
We note that this yields
\begin{equation}
  \edgeeff = \frac{1}{1+\frac{2}{\sqrt{1+\frac{4\aspect\,\Achunk}{\dedge^2}}-1}}
\end{equation}
\begin{equation}
  \quad \mbox{with} \quad
  \frac{\aspect\,\Achunk}{\dedge^2} =
  \frac{\beam}{4\rowsep}\,
  \frac{\aspect\,\fdump\tchunk}
       {\bracket{\paren{\sqrt{\nsubscan\,\npix}-\frac{1}{\sqrt{\nsubscan\,\npix}}}
                -\paren{\sqrt{\nsubscan}-\frac{1}{\sqrt{\nsubscan}}}}^2}.
\end{equation}
This expression can be used to understand how to get the highest mapping
effiency (\edgeeff{}). This implies to get the largest value of the
$(\aspect\,\Achunk)/\dedge^2$ ratio. We see that the larger the
multi-pixel array, the smaller this ratio. Increasing the chunk area,
either by increasing the linear velocity (\ie{} increasing the dump rate,
\fdump) or by increasing the stability time (\tchunk{}) will increase the
efficiency. The dump rate is fixed by the peak data rate, which gives
typically $\fdump = 2$~Hz. The stability time depends on the switching
mode: It is the time between two off measurements in position switch
(typically 1 or 2 minutes) and the time between two calibrations in
frequency switch (typically 10 to 15 minutes).

\TabEdge{} %

Previous equations give the impression that the aspect ratio is a free
parameter. This is not fully true because, \nperp{} must be an integer.
The following algorithm ensures that we get an integer value for \nperp{}
with the value of $\aspect > 1$ and closest to 1. Starting with $\aspect =
1$, Eq.~\ref{eq:nperp} gives a value of \nperp{}.  We enforce the integer
nature of \nperp{} with
\begin{equation}
  \nperp = \floor(\nperp),
\end{equation}
and we recompute the associated aspect ratio with
\begin{equation}
  \aspect = \frac{\Achunk}{(\nperp\,\dperp)^2}-\frac{\dedge}{\nperp\,\dperp}.
\end{equation}
Table~\ref{tab:edge} gives the resulting values of \nperp{}, \aspect{} and
\edgeeff{} as a function of the stability time (\tchunk{}). We see that
edge efficiencies are quite high. However, it is easier to have square
chunks when the stability time is larger.

In summary, the time spent in edges is counted as overheads. It translates
into a multiplicative efficiency (\edgeeff{}) because we enforce a mapping
pattern through rectangular chunks. Although it is not intuitive (edge
sizes are in general unrelated to area), this is not a big assumption
because the use of a square multi-pixel anyway enforces mapping in
rectangular chunks. We now summarize the algorithm to compute \edgeeff{}:
\begin{description}
\item[Step \#1: Computation of input quantities] \mbox{}
  \begin{equation}
    \dperp = \nsubscan\,\npix\,\delta,
  \end{equation}
  \begin{equation}
    \dedge = (\sqrtnpix-1)\,(1+\nsubscan\,\sqrtnpix)\rowsep,
  \end{equation}
  \begin{equation}
    \tchunk^\emr{psw} = 2~\mbox{minutes}
    \quad \mbox{and} \quad
    \tchunk^\emr{fsw} = 10~\mbox{minutes}.
  \end{equation}
  \begin{equation}
    \Achunk = \frac{\beam}{4}\,\fdump\,\frac{\dperp}{\nsubscan}\,\tchunk.
  \end{equation}
\item[Step \#2: Computation of \nperp{} and \aspect{}] \mbox{}
  \begin{description}
  \item[Case $\Atarget <   \edgeeffmin \, \Achunk$ with $\edgeeffmin = 0.8$] \mbox{}
    \begin{eqnarray}
      1. & & \nperp = \floor\bracket{\frac{\sqrt{\Atarget}}{\dperp}},\\
      2. & & \mbox{if $\nperp = 0$, then send an error message: ``Area too small, use raster mapping.''},\\
      3. & & \aspect = \frac{\Atarget}{(\nperp\,\dperp)^2}.
    \end{eqnarray}
  \item[Case $\Atarget \ge \edgeeffmin \, \Achunk$] \mbox{}
    \begin{eqnarray}
      1. & & \nperp = \floor\cbrace{\frac{1}{2}\,\frac{\dedge}{\dperp}\,\bracket{\sqrt{1+\frac{4\Achunk}{\dedge^2}}-1}},\\
      2. & & \mbox{if $\nperp = 0$, then send an error message: ``Area too small, use raster mapping.''},\\
      3. & & \aspect = \frac{\Achunk}{(\nperp\,\dperp)^2}-\frac{\dedge}{\nperp\,\dperp}.
    \end{eqnarray}
  \end{description}
\item[Step \#3: Computation of \edgeeff{}] \mbox{}
  \begin{equation}
    \edgeeff = \frac{1}{1+\frac{\dedge}{\aspect\,\nperp\,\dperp}}.
  \end{equation}
\item[Step \#4: Recomputation of \Achunk{} and \tchunk{} when $\Atarget <
  \edgeeffmin \, \Achunk$] \mbox{}
    \begin{eqnarray}
      1. & & \Achunknew = \frac{\Atarget}{\edgeeff},\\
      2. & & \tchunknew = \tchunk\,\frac{\Achunknew}{\Achunk},\\
      3. & & \Achunk = \Achunknew \quad \mbox{and} \quad \tchunk = \tchunknew.
    \end{eqnarray}
  If $\tchunk < 1$~minute, the targeted area is too small and the PI
  should use raster mapping instead of OTF mapping.
\end{description}

\subsection{Impact on OTF observations}

For OTF observations, there are several effects to take into account.
\begin{enumerate}
\item We will use the average system temperature to take into account the
  different mixer performances.
\item Edges result in inhomogeneous noise, which depends on the exact
  observing setup. We here try to estimate a single noise value for the
  whole map. The area swept in edges are thus considered as overheads. If
  the total targeted area is \Amap, the receiver will then have to map
  $\Amap+\Aedge$. As discussed above, we can write the previous sum as a
  product of the targeted area times an efficiency factor, \ie{}
  \begin{equation}
    \edgeeff\,(\Amap+\Aedge) = \Amap.
  \end{equation}
  We thus have to remplace \Amap{} by $\Amap/\edgeeff$ in
  Eqs~\ref{eq:nbeam} and~\ref{eq:nsubmap} to compute \nbeam{} and
  \nsubmap{}. Now, if edge area is considered overheads when estimating the
  sensitivity, the spectra acquired in the edges will nevertheless be used
  to form the final image. We must thus ensure that enough time is observed
  on the off position when estimating the sensitivity in the position
  switch mode. This comes naturally if we consider the edge area as part of
  the submap between two off positions. This implies that the change on the
  total mapped area, expressed above, is the only one needed in the
  equations to take the edges into account.
\item A multi-pixel can cover \npix{} times as fast the same area of the
  sky with the same sensitivity as a single-pixel of similar \Tsysave{}.
  Another way to look at this, is to assume that each identical (average)
  pixel will cover an independent part of the sky during a given observing
  time (\ie{} $\obseff\,\ttel$). This implies that the area seen by each
  pixel will be
  \begin{equation}
    \Amap[pix] = \frac{\Amap/\edgeeff}{\npix}.
  \end{equation}
\end{enumerate}
This finally gives
\begin{equation}
  \noise[psw]^\emr{otf} = \frac{\paren{\sqrt{\nbeampix}+\sqrt{\nsubmappix}}\,\Tsysave}{\speceff\,\sqrt{\dnu\,\npol\,\obseff\,\ttel}},  
  \quad \mbox{and} \quad
  \noise[fsw]^\emr{otf} = \frac{\sqrt{2\,\nbeampix}\,\Tsysave}{\speceff\sqrt{\dnu\,\npol\,\obseff\,\ttel}},
\end{equation}
where \nbeampix{} and \nsubmappix{} are computed with
\begin{equation}
  \nbeampix = \frac{\Amap}{\edgeeff\,\npix\,\Abeam}
  \quad \mbox{and} \quad
  \nsubmappix = \frac{\Amap}{\edgeeff\,\npix\,\Asubmappix}
\end{equation}
\begin{equation}
  \quad \mbox{with} \quad
  \Asubmappix = \varea[pix]\,\tstable
  \quad \mbox{and} \quad
  \varea[pix] = \rowsep\,\vlin.
\end{equation}
The times spent on and off and in the edges per pixel are then
\begin{equation}
  \tonoffpix = \edgeeff\,\obseff\,\ttel
  \quad \mbox{and} \quad
  \tedgepix = (1-\edgeeff)\,\obseff\,\ttel.
\end{equation}

The algorithm to derive the time/sensitivity estimation in the case of OTF
can thus be applied with the following modifications in the input
parameters : \tonoff{}, \varea{}, \nsubmap{}, \nbeam{} must be replaced by
\tonoffpix{}, \varea[pix], \nsubmappix{}, \nbeampix{}.

\begin{thebibliography}{9}
  \expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
  
\bibitem[{Pety et al.~(2009)}]{pety09} Pety, J., Bardeau, S. and Reynier,
  E., 2009, IRAM-30m EMIR time/sensitivity estimator, IRAM Memo 2009-1

\end{thebibliography}


\end{document}

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

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
