\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{xcolor} 
\usepackage{longtable}

\makeindex{}

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

% 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 Marka et al., 2017}
\rhead{\scshape \nouppercase{\rightmark}}   %
\fancyfoot[C]{\bfseries \thepage{}}
\renewcommand{\headrulewidth}{0pt}    %
\renewcommand{\footrulewidth}{0pt}    %
\renewcommand{\sectionmark}[1]{%
  \markright{\thesection. \MakeLowercase{#1}}}
\renewcommand{\sectionmark}[1]{}
\fancypagestyle{firststyle}
{
   \fancyhf{}
   \fancyhead[C]{Original version at \tt http://iram-institute.org/medias/uploads/mrtcal-check.pdf}
   \fancyfoot[C]{\bfseries \thepage{}}
}

\newcommand{\ie}{{\em i.e.}}
\newcommand{\eg}{{\em e.g.}}
\newcommand{\cf}{cf.}
\newcommand{\arcmin}{\,{$^{\prime}$}}
\newcommand{\arcsec}{\,$^{\prime\prime}$}
\newcommand{\degr}{\,$^{\circ}$}
\newcommand{\TA}{$\mathrm{T_A^*}$}
\newcommand{\Tmb}{$\mathrm{T_{mb}}$}
\newcommand{\Tsys}{$\mathrm{T_{sys}}$}
\newcommand{\Tcal}{$\mathrm{T_{cal}}$}
\newcommand{\Feff}{$\mathrm{F_{eff}}$}
\newcommand{\Beff}{$\mathrm{B_{eff}}$}

\newcommand{\gildas}{\mbox {\bf GILDAS}}
\newcommand{\mrtcal}{\mbox {\bf MRTCAL}}
\newcommand{\mira}  {\mbox {\bf MIRA}}
\newcommand{\class} {\mbox {\bf CLASS}}

\setlength{\LTcapwidth}{460pt}

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

\newcommand{\TabObs}{%
  \begin{table}[t]
    {\small
      \caption{\small Observing setups. The covered frequency range is indicated for FTS\,200, 
        and the center frequency of the 120\,MHz wide windows for VESPA. The last column lists 
        the observing modes for the according setup (with WSW wobbler switching, FSW frequency 
        switching, and PSW position switching).}
      \label{tab:obs}
      \smallskip
      \begin{tabular}[5]{lllll}
        \hline
        Tuning 		& Setup	 	& FTS200 coverage 		   & VESPA center	 & Observing \\
                        & name	 	& [GHz]		                   & [GHz]		 & mode\\
        \hline
        E150 150.000 UI & POINT2MM	& 147.70--155.48	 	   &			 & WSW \\
        E150 176.500 UI & L170250	& 158.52--166.30 \& 174.20--181.98 & 176.553		 & WSW \\
        E230 230.500 UI & L224250	& 212.52--220.30 \& 228.20--235.98 & 217.9102 \& 230.538 & WSW, PSW, FSW\\
        E330 345.139 UI & L338890	& 342.84--350.62		   & 345.94		 & WSW \\
        \hline
      \end{tabular}}
  \end{table}}

\newcommand{\TabLines}{%
  \begin{longtable}[5]{lllll}
    \caption{\small List of lines used in the comparison (signal-to-noise-ratio
      $>$ 4, not blended).} %
    \label{tab:lines} \\
    \hline %
    Setup & Rest frequency [MHz] & Species & Transition & Reference \\
    \hline %
    \endfirsthead
    %
    \multicolumn{4}{c}%
    {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
    \hline %
    Setup & Rest frequency [MHz] & Species & Transition & Reference \\
    \hline %
    \endhead
    \hline \multicolumn{4}{r}{{Continued on next page}} \\ \hline
    \endfoot
    \hline
    \endlastfoot
    % 147.7-155.48 GHz
    E150 POINT2MM & 149106.9  &  C$_3$H             &  $^2\Pi_{3/2}$, J=13/2-11/2 a                 & C2000 \\
                  & 149212.6  &  C$_3$H             &  $^2\Pi_{3/2}$, J=13/2-11/2 b                 & C2000 \\
                  & 150820.6  &  C$_3$H$_2$         &  4$_{0,4}$-3$_{1,3}$ Para                     & C2000 \\
                  & 150851.9  &  C$_3$H$_2$         &  4$_{1,4}$-3$_{0,3}$ Ortho                    & C2000 \\
                  & 151375.9  &  C$_4$H             &  $\nu_7$=1 $^2\Pi_{1/2}$, J=31/2-29/2 a       & C2000 \\
                  & 152243.6  &  C$_4$H             &  N=16-15 a                                    & C2000 \\
                  & 152282.1  &  C$_4$H             &  N=16-15 b                                    & C2000 \\
                  & 152879.9  &  C$_4$H             &  $\nu_7$=1 $^2\Pi_{3/2}$, J=33/2-31/2 a       & C2000 \\
                  & 152986.2  &  C$_4$H             &  $\nu_7$=2 l=0 $^2\Sigma$, N=16-15 a          & C2000 \\
                  & 153042.4  &  C$_4$H             &  $\nu_7$=2 l=0 $^2\Sigma$, N=16-15 b          & C2000 \\
                  & 153334.9  &  C$_4$H             &  $\nu_7$=1 $^2\Pi_{3/2}$, J=33/2-31/2 b       & C2000 \\
                  & 154657.3  &  HC$_3$N            &  J=17-16                                      & C2000 \\
    \hline
    % 158.52-166.3 & 174.2-181.98 GHz
    E150 L170250  & 158903.0  &  Si$^{34}$S         &  J=9-8                                        & C2000 \\
                  & 160312.1  &  ClAl               &  J=11-10                                      & C2000 \\
                  & 160375.2  &  $^{29}$SiS         &  J=9-8                                        & A2012 \\
                  & 160957.1  &  C$_4$H             &  $\nu_7$=1 $^2\Pi_{1/2}$, J=33/2-31/2 a       & C2000 \\
                  & 161459.8  &  C$_4$H             &  $\nu_7$=1 $^2\Pi_{1/2}$, J=33/2-31/2 b       & C2000 \\
                  & 161758.1  &  C$_4$H             &  N=17-16 a                                    & C2000 \\
                  & 161796.6  &  C$_4$H             &  N=17-16 b                                    & C2000 \\
                  & 162547.7  &  C$_4$H             &  $\nu_7$=2 l=0 $^2\Sigma$, N=17-16 a          & C2000 \\
                  & 163376.7  &  SiS                &  J=9-8                                        & C2000 \\
                  & 163753.4  &  HC$_3$N            &  J=18-17                                      & C2000 \\
                  & 164069.1  &  SiC$_2$            &  7$_{2,6}$-6$_{2,5}$                          & C2000 \\
                  & 164770.5  &  SiC$_2$            &  7$_{6,2}$-6$_{6,1}$ \& 7$_{6,1}$-6$_{6,0}$   & C2000 \\
                  & 164868.0  &  AlF                &  J=5-4                                        & C2000 \\
                  & 174806.8  &  C$_2$H             &  N=2-1, J=3/2-3/2                             & CDMS \\
                  & 175084.6  &  $^{30}$SiS         &  J=10-9                                       & A2012 \\
                  & 176554.7  &  Si$^{34}$S         &  J=10-9                                       & A2012 \\
                  & 179446.5  &  SiC$_2$            &  J=8$_{0,8}$-7$_{0,7}$                        & CDMS \\
                  & 180786.0  &  C$_4$H             &  N=19-18, J=39/2-37/2                         & CDMS \\
                  & 180824.5  &  C$_4$H             &  N=19-18, J=37/2-35/2                         & CDMS \\
                  & 181324.8  &  HNC                &  J=2-1                                        & CDMS \\
                  & 181525.2  &  SiS                &  J=10-9                                       & A2012 \\
                  & 181944.9  &  HC$_3$N            &  J=20-19                                      & CDMS \\
    \hline
    % 212.52-220.3 & 228.2-235.98 GHz
    E230 L224250  & 213208.0  &  SiC$_2$            &  J=9$_{4,6}$-8$_{4,5}$                        & CDMS \\
                  & 213292.3  &  SiC$_2$            &  J=9$_{4,5}$-8$_{4,4}$                        & CDMS \\
                  & 213816.2  &  $^{29}$SiS         &  J=12-11                                      & A2012 \\
                  & 214385.7  &  $^{29}$SiO         &  J=5-4                                        & A2012 \\
                  & 214741.0  &  Si$^{33}$S         &  J=12-11                                      & A2012 \\
                  & 216278.8  &  c-C$_3$H$_2$       &  J$_{\mathrm {K_a,K_c}}$=3$_{3,0}$-2$_{2,1}$  & T2010 \\
                  & 217104.8  &  SiO                &  J=5-4                                        & A2012 \\
                  & 218324.7  &  HC$_3$N            &  J=24-23                                      & T2010 \\
                  & 218560.5  &  AlCl               &  J=15-14                                      & T2010 \\
                  & 218837.0  &  C$_4$H             &  N,J=23,47/2 - 22,45/2                        & T2010 \\
                  & 218875.4  &  C$_4$H             &  N,J=23,45/2 - 22,43/2                        & T2010 \\
                  & 218972.8  &  C$_4$H             &  $\nu_7$ =1$^1$ N,J=23,45/2 - 22,43/2, f      & T2010 \\
                  & 219099.3  &  C$_4$H             &  $\nu_7$ =1$^1$ N,J=23,47/2 - 22,45/2, e      & T2010 \\
                  & 219560.4  &  C$^{18}$O          &  J=2-1                                        & T2010 \\
                  & 219767.3  &  C$_4$H             &  $\nu_7$ =1$^1$  N,J=23,47/2 - 22,45/2, f     & T2010 \\
                  & 230538.0  &  CO                 &  J=2-1                                        & T2010 \\
                  & 230793.9  &  AlF                &  J=7-6                                        & T2010 \\
                  & 231220.7  &  $^{13}$CS          &  J=5-4                                        & T2010 \\
                  & 231626.7  &  $^{29}$SiS         &  J=13-12                                      & T2010 \\
                  & 232534.1  &  SiC$_2$            &  J$_{\mathrm {K_a,K_c}}$=10$_{2,9}$-9$_{2,8}$ & T2010 \\
                  & 232628.6  &  Si$^{33}$S         &  J=13-12                                      & T2010 \\
                  & 232116.3  &  AlCl               &  J=16-15                                      & T2010 \\
                  & 234534.0  &  SiC$_2$            &  J$_{\mathrm {K_a,K_c}}$=10$_{8,2}$-9$_{8,1}$ \& 10$_{8,3}$-9$_{8,2}$ & T2010 \\
                  & 235713.0  &  SiC$_2$            &  J$_{\mathrm {K_a,K_c}}$=10$_{6,5}$-9$_{6,4}$ \& 10$_{6,4}$-9$_{6,3}$ & T2010 \\
                  & 235961.4  &  SiS                &  J=13-12                                      & T2010 \\
    \hline
    % 342.84-350.62 GHz
    E330 L3338890 & 342882.8  &  CS                 &  J=7-6                                        & A2012 \\
                  & 342980.9  &  $^{29}$SiO         &  J=8-7                                        & A2012 \\
                  & 344779.5  &  SiS                &  J=19-18                                      & A2012 \\
                  & 344906.0  &  SiC$_2$            &  16$_{0,16}$-15$_{0,15}$                      & P2011 \\
                  & 345339.8  &  H$^{13}$CN         &  J=4-3                                        & P2011 \\
                  & 345795.9  &  CO                 &  J=3-2                                        & P2011 \\
                  & 346109.9  &  SiC$_2$            &  14$_{2,12}$-13$_{2,11}$                      & P2011 \\
                  & 347330.6  &  SiO                &  J=8-7                                        & A2012 \\
                  & 349337.7  &  C$_2$H             &  N=4-3, J=9/2-7/2                             & P2011 \\
                  & 349399.3  &  C$_2$H             &  N=4-3, J=7/2-5/2                             & P2011 \\
    \hline
  \end{longtable}
  C2000: Cernicharo, J.; Gu\'elin, M.; Kahane, C., 2000, AASS\,142, p.181--215\\
  % A $\lambda$2\,mm molecular line survey of the C-star envelope IRC+10216
  A2012: Ag\'undez, M.; Fonfr\'ia, J.P.; Cernicharo, J. et al. 2012, A\&A\,543, 26\\
  % Molecular abundances in the inner layers of IRC +10216
  T2010: Tenenbaum, E.D.; Dodd, J.L.; Milam, S.N. et al. 2010, ApJS\,190, p.348--417\\
  % The Arizona Radio Observatory 1 mm Spectral Survey of IRC +10216 and VY Canis Majoris (215-285 GHz)
  P2011: Patel, N.A.; Young, K.H.; Gottlieb, C.A. et al. 2011, ApJS\,193, pp.65\\
  % An Interferometric Spectral-line Survey of IRC+10216 in the 345 GHz Band
  CDMS: M\"uller, H.S.P.; Thorwirth, S.; Roth, D.A. et al. 2001, A\&A\,370, L49-L52\\
  % The Cologne Database for Molecular Spectroscopy
}

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

\newcommand{\FigCalibBandwidthOTFone}{%
  \begin{figure}[t]
    \centering %
    \includegraphics[width=0.7\textwidth]{mrtcal-check-fig-1}
    \caption{Spectra averaged over a 15 minute On-The-Fly scan observed
      with a combination of E090 and FTS200 under average summer weather
      ($\sim 7$\,mm of precipitable water vapor). The simultaneously
      observed LSB and USB spectra are shown on the bottom panel and a
      5\,GHz window near the 3\,mm band edge is zoomed on the top
      panel. The calibration parameters are here derived and applied by
      \mrtcal{} per natural hardware unit (1.35\,GHz bandwidth for each FTS
      unit, i.e., same as MIRA calibration scheme).}
    \label{fig:calib-bandwidth-otf:1}
  \end{figure}}

\newcommand{\FigCalibBandwidthOTFtwo}{%
  \begin{figure}[b]
    \centering %
    \includegraphics[width=0.7\textwidth]{mrtcal-check-fig-2}
    \caption{Same as Fig.~\ref{fig:calib-bandwidth-otf:1} except that the
      calibration parameters are now linearly interpolated by being
      applied.}
    \label{fig:calib-bandwidth-otf:2}
  \end{figure}}

\newcommand{\FigCalibBandwidthOTFthree}{%
  \begin{figure}[t]
    \centering %
    \includegraphics[width=0.7\textwidth]{mrtcal-check-fig-3}
    \caption{Spectra averaged over a 15 minute On-The-Fly scan observed
      with a combination of E090 and FTS200 under average summer weather
      ($\sim 7$\,mm of precipitable water vapor). The simultaneously
      observed LSB and USB spectra are shown on the bottom panel and a
      5\,GHz window near the 3\,mm band edge is zoomed on the top
      panel. The calibration parameters are here derived and applied by
      \mrtcal{} every 20\,MHz.}
    \label{fig:calib-bandwidth-otf:3}
  \end{figure}}

\newcommand{\FigCalibBandwidthOTFfour}{%
  \begin{figure}[b]
    \centering %
    \includegraphics[width=0.7\textwidth]{mrtcal-check-fig-4}
    \caption{Same as Fig.~\ref{fig:calib-bandwidth-otf:3} except that the
      calibration parameters are now linearly interpolated by being
      applied. This spectra is the default delivered by \mrtcal{}.}
    \label{fig:calib-bandwidth-otf:4}
  \end{figure}}

\newcommand{\FigRawComparisonFTS}{%
  \begin{figure}[t]
    \includegraphics[width=5.8cm,angle=-90]{mrtcal-check-fig-5a}
    \hfill
    \includegraphics[width=5.8cm,angle=-90]{mrtcal-check-fig-5b}\\
    \includegraphics[width=5.8cm,angle=-90]{mrtcal-check-fig-5c}
    \hfill
    \includegraphics[width=5.8cm,angle=-90]{mrtcal-check-fig-5d}
    \caption{Comparison of unprocessed (except for blanking of spikes and a
      spurious feature in E3) FTS200 spectra calibrated with \mira{} and
      \mrtcal{}. The spectra are overplotted in black and red in the lower
      panels. The difference spectrum is displayed in the upper panels.
      Both polarizations and all scans (4 scans for setup E1~POINT2MM and
      E3~L338890, 6 for E1~L170250 and 10 for E230~L224250) have been
      averaged for each setup and observing mode, indicated in the upper
      right of each plot. All visible narrow features are spectral lines.}
    \label{fig:spectra-raw-fts}
  \end{figure}}

\newcommand{\FigRawComparisonVespa}{%
  \begin{figure}[t]
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-6a}\hfill
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-6b}
    \caption{Two examples of unprocessed VESPA spectra calibrated with
      \mira{} and \mrtcal{} (black and red in the lower panels).  The upper
      panels show the difference spectrum. Both polarizations and all
      consistent scans (same setup and observing mode) have been averaged.
      The three central channels of each spectrum have been masked as
      spikes are expected in the center of the three adjacent 40\,MHz units
      for VESPA due to technical reasons (Paubert 2002).}
    \label{fig:spectra-raw-vespa}
  \end{figure}}

\newcommand{\FigFluxComparison}{%
  \begin{figure}[t]
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-7a}\hfill
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-7b} \\
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-7c} \hfill
    \includegraphics[height=0.49\textwidth,angle=-90]{mrtcal-check-fig-7d}
    \caption{Relative difference of integrated line intensities in
      \mrtcal{} and \mira{}-calibrated spectra versus line center frequency
      for the four frequency setups. One data point is shown per line and
      scan. Vertical bars indicate the 3$\sigma$ uncertainties estimated
      from the baseline rms and number of channels in the line. Horizontal
      blue solid and dotted lines denote the mean value and 1$\sigma$
      standard deviation of all points of the respective setup.}
    \label{fig:diff-vs-freq-all-setups}
  \end{figure}}

\newcommand{\FigTsysComparison}{%
  \begin{figure}[t]
    \includegraphics[height=\textwidth,angle=-90]{mrtcal-check-fig-8}
    \caption{System temperature derived by \mira{} (dashed black horizontal
      lines, one per 1.35\,GHz hardware unit of the FTS200) and \mrtcal{}
      (dashed blue line) for the upper outer subband of setup
      E150/L170250. The respective spectra are shown with solid lines.}
    \label{fig:e1-tsys-spectra}
  \end{figure}}

\newcommand{\FigLineRatios}{%
  \begin{figure}[t]
    \begin{minipage}{0.7\hsize}
      \includegraphics[width=\linewidth]{mrtcal-check-fig-9}
    \end{minipage}
    \begin{minipage}{0.3\hsize}
      \vspace*{-1cm}\caption{Ratio of integrated line intensities in
        \mira{} and \mrtcal{}-calibrated spectra (black) at the upper
        frequency end of setup E150/L170250, compared with the ratios of
        system temperature (red) at the line frequencies.}
      \label{fig:e1-ratios-spectra-tsys}
    \end{minipage}
  \end{figure}}

\newcommand{\FigCalibBandwidthTracked}{%
  \begin{figure}[t]
    \centering %
    \includegraphics[height=0.8\textwidth,angle=-90]{mrtcal-check-fig-10a}
    \includegraphics[height=0.8\textwidth,angle=-90]{mrtcal-check-fig-10b}
    \caption{Relative difference of integrated line intensities in \mira{}
      and \mrtcal{}-calibrated spectra above 179.4\,GHz in setup
      E150/L170250, at the edge of the 2mm atmospheric window. Top panel:
      with default 20\,MHz calibration bandwidth in \mrtcal{}, which traces
      better the strong increase of atmosphere opacity at the high
      frequency end. Bottom panel: with \mrtcal{} calibration bandwidth
      equal to the natural hardware unit size, i.e. 1.35\,GHz for
      FTS200. Horizontal blue solid and dashed lines indicate the mean and
      1$\sigma$ standard deviation of all data points.}
    \label{fig:e1-edge-natural-bandwidth}
  \end{figure}}

\newcommand{\FigSwitchingComparison}{%
  \begin{figure}[t]
    \centering %
    \includegraphics[height=0.8\textwidth,angle=-90]{mrtcal-check-fig-11}
    \caption{Integrated intensities of seven lines in the E230 setup for
      the three switching modes position-switching (PSW, shown as squares),
      wobbler-switching (WSW; triangles) and frequency-switching (FSW,
      circles), for calibration with \mira{} (black) and \mrtcal{} (blue) with
      default settings. The integrated intensities are normalized to those
      measured for position switching. Bars indicate the 1$\sigma$ standard
      deviation over all scans of the according line. The three leftmost
      lines 1--3 are bright (peak temperature \TA$\sim$6--10\,K). Lines
      4--7 are weaker (\TA$\sim$1\,K).}
    \label{fig:e2-obsmodes}
  \end{figure}}

\newcommand{\FigFluxVsElevation}{%
  \begin{figure}[htb]
    \centering %
    \centering\includegraphics[height=0.8\textwidth,angle=-90]{mrtcal-check-fig-12a}
    \centering\includegraphics[height=0.8\textwidth,angle=-90]{mrtcal-check-fig-12b}
    \caption{Integrated line intensity in \mira{} (black) and \mrtcal{} (blue)
      spectra for the two brightest lines in the E230 setup versus time
      (top panel), and for the strongest line versus elevation (bottom
      panel), after correction for the gain-elevation-curve. One data point
      is shown per scan; the observing sequence consisted of one
      calibration scan and two science scans of 6\,min length.}
    \label{fig:e2-obsmodes-time-elevation}
  \end{figure}}

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

\begin{document}

\thispagestyle{firststyle}

\begin{center}
  \includegraphics[width=5cm]{gildas-logo}\\[2\bigskipamount]
  \huge{}
  IRAM Memo 2017-1\\
  Observational examples of spectral line calibration at the 30m telescope
  with \mrtcal{} and \mira{}\\[3\bigskipamount]
  \large{}
  C.~Marka$^{1}$, J.~Pety$^{2,3}$, S~ Bardeau$^{2}$, A.~Sievers$^{1}$\\[0.5cm]
  1. IRAM (Granada)\\
  2. IRAM (Grenoble)\\
  3. Observatoire de Paris\\[\bigskipamount]
  \normalsize{}
  Sep., 14$^{th}$ 2017\\
  Version 1.0
\end{center}

\begin{abstract}
  Since February 2017, \mrtcal{} has replaced \mira{} as the software for
  spectral line data calibration (except polarimetry and continuum) at the
  30m-Telescope. Slight changes in the calibrated spectra are expected, for
  example in form of an improved calibration accuracy at the edges of the
  atmospheric windows as result of the narrower calibration bandwidth used
  by \mrtcal{} (20\,MHz by default, compared to up to about 1.35\,GHz for
  \mira{}).  This report demonstrates the practical performances of
  \mrtcal{} by a systematic comparison of observations
  calibrated with both softwares.\\

  Keywords: \mrtcal, \mira, 30m calibration

  Related documents: \mrtcal\ documentation, \mira\ documentation, \class\
  documentation.
\end{abstract}

\newpage{}
\tableofcontents{}

\newpage{}

\section{Qualitative impact of the \mrtcal{} frequency dependent
  calibration}
\label{sec:cal-vs-freq:qual}

Differences between \mira{}- and \mrtcal{}-calibrated spectra are expected
as a consequence of the different calibration bandwidths. One value of the
calibration parameters are derived and applied per 1.35\,GHz natural
hardware unit when MIRA calibrates FTS200 spectra. In contrast, \mrtcal{}
derives and applies the calibration in steps of 20\,MHz (in the current
default settings for the automatic online data processing; this value can
be customized by the user).

The \mrtcal{} default is intended to improve the quality of the baseline,
as can be seen on Fig.~\ref{fig:calib-bandwidth-otf:1}
to~\ref{fig:calib-bandwidth-otf:4}. The average spectra computed from the
same 15 minutes On-The-fly scan is displayed in each of the four
figures. The only difference between the four spectra are the way
\mrtcal{} calibrates the raw data. 
\begin{enumerate}
\item In Fig.~\ref{fig:calib-bandwidth-otf:1}, the calibration parameters
  are derived and applied per natural hardware unit (\ie, every 1.35\,GHz
  as defined by the FTS units). This gives a staircase look to the spectra.
\item In Fig.~\ref{fig:calib-bandwidth-otf:2}, the calibration parameters
  are derived every 1.35\,GHz. But they are linearly interpolated before
  being applied. The staircase look is greatly decreased.
\item In Fig.~\ref{fig:calib-bandwidth-otf:3}, the calibration parameters
  are derived and applied every 20\,MHz. No linear interpolation is done
  before application. The staircase look and the baseline oscillations
  disappeared. The atmospheric line around 110.8\,GHz now appears in
  absorption as it should because the reference position was localized
  about 1 degree away from the OTF observations. 
\item Finally, in Fig.~\ref{fig:calib-bandwidth-otf:4}, the calibration
  parameters are derived every 20\,MHz and linearly interpolated before
  being applied. The improvement with respect to the previous solution
  exists even though it is not obvious on this plot.
\end{enumerate} 
\mrtcal{} proposes by default the fourth solution. It thus delivers better
behaved baselines. The \mrtcal{} default is also intended to improve the
line calibration accuracy in regions where calibration parameters vary
quickly as a function of frequency, as shown in
Sect.~\ref{sec:cal-vs-freq:quant}.

\newpage %

\FigCalibBandwidthOTFone{} %
\FigCalibBandwidthOTFtwo{} %
\FigCalibBandwidthOTFthree{} %
\FigCalibBandwidthOTFfour{} %

\clearpage %

\section{Observations dedicated to the comparison between \mrtcal{} and
  \mira{}}

\TabObs{} %

Observations on the approximately point-like source IRC$+$10216 were
obtained under the technical time T06-16 during 2016 November 15--17 under
mostly stable weather with opacities of 0.1--0.2 at 225\,GHz.  Four EMIR
frequency setups (and one setup for HERA not included in this report) were
tested, including the 1mm band around the CO(2--1) line of frequent
interest for observers, as well as a setup close to the edge of the
atmospheric window of the 2mm band, which is expected to be especially
sensitive to the calibration.  All spectral line backends - WILMA, FTS in
its wide resolution mode, and VESPA configured to 40\,kHz resolution and
120\,MHz bandwidth - were connected.  The 1mm band setup was observed in
all three switching modes available for spectral line observations: wobbler
switching (designated WSW in the following) observations used a throw of
$\pm$90\arcsec \ in azimuth with a phase time of 2\,s, frequency switching
(FSW) a throw of $\pm$23.4\,MHz at a phase time of 0.2\,s, and position
switching (PSW) was done relative to an off position 600\arcsec \ west (in
right ascension) of the source. Table~\ref{tab:obs} lists the observing
setups and table~\ref{tab:lines} lists the spectral lines that are used in
the following work.

\section{Qualitative comparison of raw spectra}

\FigRawComparisonVespa{} %
\FigRawComparisonFTS{} %

Figure~\ref{fig:spectra-raw-vespa} compares two \mira{} and
\mrtcal-calibrated lines covered at high resolution with VESPA.
Figure~\ref{fig:spectra-raw-fts} compares \mira{} and \mrtcal-calibrated
FTS spectra for all four frequency setups.  In all cases, default
calibration settings were used. Both polarizations and all consistent scans
were averaged. Spikes and a spurious signal at intermediate frequencies
5.62 and 11.24$\pm$0.01\,GHz in the E330 setup, which stems from
interference with a network switch in the backend room, have been
blanked. No futher processing was applied. In particular, no baselines were
subtracted.

The line shape observed at high spectral resolution show variations of the
order of at most a few percents (cf.\
Fig.~\ref{fig:spectra-raw-vespa}). Systematic differences are discernable
on spectral lines in Fig.~\ref{fig:spectra-raw-fts}, with either \mira{}-
or \mrtcal{}-calibrated spectra showing higher intensities depending on the
frequency. For instance, the differences are exacerbated for setup
E150/L170250 that is situated close to the upper edge of the atmospheric
window of the 2mm band (it shows a notable increased in the baseline noise
at the high frequency end). These differences will be quantified and
explained in the next sections

\section{Quantitative comparison of line intensities}

\FigFluxComparison{} %

We selected all the lines present in the FTS200 spectra with a
signal-to-noise-ratio larger than four. We disgarded blended lines, lines
from the image side band and ``ghost'' lines in the E230 setup arising from
mixing with higher order harmonics of the local oscillator frequency. For
each selected line, the intensity was integrated over a fixed interval of
29\,km/s, equal to the typical linewidth of the source, after subtraction
of a baseline of first order in a region of three times the linewidth.  The
relative difference of integrated line intensities between \mira{} and
\mrtcal{}-calibrated spectra (\ie{}, the difference of integrated
intensities divided by the mean integrated intensity) as a function of
frequency is shown in Fig.~\ref{fig:diff-vs-freq-all-setups}.

The mean of the relative difference over all lines and scans is consistent
with zero difference for all frequency setups ($-$0.7$\pm$0.7\% for setup
E150/POINT2MM, 1$\pm$18\% for setup E150/L170250, 0.0$\pm$2.2\% for setup
E230, and $-$1.2$\pm$1.8\% for setup E330). This indicates an on-average
good agreement of line intensities between \mira{}- and
\mrtcal{}-calibrated spectra. For the E230 setup the maximum relative
difference for individual lines is 12\%, for the E330 and E150/POINT2MM
setup it does not exceed 5\%, compatible with the typical expected
calibration accuracy\footnote{Typical differences of 5$\pm$5\% are found
  between integrated line intensities in horizontal and vertical
  polarization for all frequency setups. These are not adressed here
  because they originate from the hardware side, and are consistent between
  \mira{}- and \mrtcal{}-calibrated spectra.}. Significant deviations are
noted at the high frequency end of the E150/L170250 setup, close to the
edge of the 2\,mm band atmospheric window, with integrated line intensities
in \mrtcal{}-calibrated spectra up to a factor of two higher than those
from \mira{}-calibrated spectra. This particular case will be considered in
detail in the following section.

\section{Quantitative impact of the \mrtcal{} frequency dependent
  calibration}
\label{sec:cal-vs-freq:quant}

\FigCalibBandwidthTracked{} %
\FigTsysComparison{} %
\FigLineRatios{} %

Opacity increases strongly at the upper end of the EMIR 2\,mm band because
of the atmospheric water line at 183.3\,GHz. Observations near the upper
edge of the 2\,mm atmospheric band will thus exacerbate the change in the
calibration strategy that should better take into account the frequency
dependency. 

That the differences in line intensities between \mrtcal{} and \mira{}
close to the atmospheric window are a direct consequence of the different
calibration bandwidths, is shown in
Fig.~\ref{fig:e1-edge-natural-bandwidth}. The top panel shows the relative
difference of integrated line intensities for \mrtcal{} calibration with
default settings (\ie{}, in 20\,MHz steps), while the bottom panel shows it
for a \mrtcal{} calibration in steps of the natural hardware units, the
\mira{} calibration bandwidth. In the second case, the relative differences
are reduced from up to 100\% to $\leq$11\%. Residual differences in the
bottom panel are possibly due to the remaining difference in the correction
of the intermediate frequency bandpass.

The spectra and system temperature derived by both calibration softwares at
the edge of the atmospheric window are shown in
Fig.~\ref{fig:e1-tsys-spectra}. In the rightmost third of this figure, the
system temperature (\Tsys{}) derived by \mrtcal{} better traces the strong
increase of atmospheric contribution than the single mean \Tsys{} value
used by \mira{}.  In agreement with this, line peaks in the
\mira{}-calibrated spectrum are underestimated compared to those from
\mrtcal{} in the regions where the \mira{} value of \Tsys{} is below that
of \mrtcal{} (\ie, above 181.2\,GHz, see also
figure~\ref{fig:diff-vs-freq-all-setups}), and vice versa. Moreover, the
baseline noise at the high frequency end is increased in the
\mrtcal{}-calibrated spectrum due to the proportionality to \Tsys,
providing a more realistic magnitude in this region of low atmospheric
transmission.

Figure~\ref{fig:e1-ratios-spectra-tsys} shows a numerical comparison of the
ratio of the integrated line intensities in \mira{}- and
\mrtcal{}-calibrated spectra with the ratio of the respective system
temperature applied at the line frequencies. The ratio of system
temperature indeed shows the same trends as the ratio of line integrated
intensities. The relative error between the two ratios is of the order of
20\%. This could be due either to uncertainties in line intensities or to
the scheme used to correct for the bandpass shape that is slightly
different between \mira{} and \mrtcal{}. Additional work is required to
explore this discrepancy.

\section{Comparison of switching modes}

\FigSwitchingComparison{} %

All three switching modes available for spectral line observations were
observed with the same EMIR 1\,mm band setup in order to check the
consistency of the line intensities between the different switching
mode. To our knowledge, this is the first time this kind of study is done
at the 30m-Telescope.

Figures~\ref{fig:e2-obsmodes} compares the integrated line intensities for
seven lines in position, wobbler, and frequency switching mode. In all
cases, the individual scans were corrected for the gain-elevation curve as
the source is barely resolved. Moreover, both polarizations were averaged.
Integrated line intensities from the frequency-switched spectra may suffer
from a higher uncertainty due to strong baseline ripples that are
associated with this switching mode. This is especially true for the weaker
lines.

The integrated line intensities in position-switching are consistent
between both calibration software, with \mrtcal{} intensities reaching
99$\pm$1\% (mean over the seven lines and its 1$\sigma$ standard deviation)
of the \mira{} intensities.

For wobbler-switching, the integrated line intensities amounts to
93$\pm$1\% of the intensities in position-switching for both \mira{}- and
\mrtcal{}-calibrated spectra. This reduction of line intensity is expected
because of the reduced anntena gain when tilting the subreflector. For a
tilt of 90\arcsec, the antenna main beam gain at 230\,GHz is reduced to
0.93 (see report by Pe\~nalver 2016), in agreement with the observed value.

For frequency-switching, the integrated intensities reach 94$\pm$1\% of the
position-switching intensities for the \mrtcal{}-, and 89$\pm$1\% for
\mira{}-calibrated spectra. \mrtcal{} delivers integrated intensities that
better match the position switching ones, probably because the frequency
calibration and folding of the two phases is done in a different way than
in the usual combination of \mira{} and \class{}. Indeed, Winkel et
al. (2012) indicate that the usual approach underestimates line intensities
when the line strengths is not negligible compared to the system temperature.

The remaining difference of 6$\pm$1\% between frequency-switching and
position-switching when the data is calibrated by \mrtcal{} could be
related to a lost of receiver efficiency when the frequency throw is
large. In our case, it was set to the maximum value of $\pm$23.4\,MHz
because IRC+10216 lines are relatively broad. This effect will be further
explored in new observations.

\section{Calibration stability with time and elevation}

\FigFluxVsElevation{} %

Figure~\ref{fig:e2-obsmodes-time-elevation} shows the integrated line
intensity of the strongest lines in the E230 setup as a function of the
observation time or the source elevation. The intensities were corrected
for the gain-elevation-curve (Pe\~nalver 2012). The correction amounts to
about 15\% for the lowest elevations of 25\degr. 

The line intensities are relatively stable except between 44 and 54\degr{}
where the intensities appear low compared to the remaining points. This
also corresponds to an observing time interval (8.5--9.25\,UT) between two
pointing observations. An error in the pointing correction could explain
this difference.

\section{Acknowledgments}

The authors thank H.~Wiesemeyer for useful indications on \mira{} behavior.

\section{References}

\begin{itemize}
\item C. Kramer, 1997 January 24: Calibration of spectral line data at
  the IRAM 30m radio telescope
\item G. Paubert, 2002 August 23: VESPA user's guide.
\item J. Pe\~nalver, 2016 April 18: Antenna Gain depending on Wobbler
  Tilt.
\item J. Pe\~nalver, 2012 April 16: Antenna Gain Elevation Curve.
\item B. Winkel, A. Kraus, U. Bach, 2012, A\&A\,540
\end{itemize}

\clearpage{} %

\appendix{} 

\section{List of used lines}

\TabLines{} %


\end{document}

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