\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{hyperref}
\usepackage{natbib} 

\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 Pety \& Bardeau, 2011: \class{} spectral axis}
\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 \url{www.iram-institute.org/medias/uploads/class-spectral-axis-v12.pdf}}
   \fancyfoot[C]{\bfseries \thepage{}}
}

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

\newcommand{\aap}{\emph{A\&A}}

\newcommand{\implication}{\emm{\Rightarrow}}

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

\newcommand{\emm}[1]{\ensuremath{#1}}   % Ensures math mode
\newcommand{\emr}[1]{\emm{\mathrm{#1}}} % Uses math roman fonts
\newcommand{\unit}[1]{\emm{\, \emr{#1}}}

%
\newcommand{\kms}{\unit{km\,s^{-1}}}
\newcommand{\mm}{\unit{mm}}
\newcommand{\kHz}{\unit{kHz}}

%
\newcommand{\nds}[1]{\emm{\displaystyle#1}} % Normal display size for array and tabular environment

% Makes usual math delimiters of the right size
\newcommand{\abs}[1]  {\emm{\left|  #1 \right| }} % Absolute value
\newcommand{\paren}[1]  {\emm{\left(  #1 \right) }} % Parenthesis 
\newcommand{\cbrace}[1] {\emm{\left\{ #1 \right\}}} % Curly Braces
\newcommand{\hbrace}[1] {\emm{\left\{ #1 \right.}}  % Left Curly Brace
\newcommand{\bracket}[1]{\emm{\left[ #1 \right] }} % Brackets
\newcommand{\sbracket}[1]{\emm{\left[ #1 \right]}} % Small brackets

% Relational
\newcommand{\Definition}{\emm{\equiv}} % Definition Symbol
\newcommand{\about}{\emm{\sim}}        % Order of Magnitude Equality

%
\newcommand{\ic}[1][]{\emm{i_{\emr{#1}}}}
\newcommand{\freq}[2][]{\emm{f_\emr{#2}^{\emr{#1}}}}
\newcommand{\wave}[2][]{\emm{\lambda_\emr{#2}^{\emr{#1}}}}
\newcommand{\velo}[2][]{\emm{v_{\emr{#2}}^{\emr{#1}}}}
\newcommand{\doppler}[2][]{\emm{d_{\emr{#2}}^{\emr{#1}}}}

\newcommand{\SBSign}[1][]{\emm{SB_\emr{sign}^{\emr{#1}}}}
\newcommand{\SBSep}[1][]{\emm{SB_{\emr{sep}}^{\emr{#1}}}}
\newcommand{\SBSrest}{\SBSep[rest]}
\newcommand{\SBSobs}{\SBSep[obs]}

\newcommand{\lrest}[1][]{\wave[rest]{#1}}
\newcommand{\lobs} [1][]{\wave[obs]{#1}}

\newcommand{\frest}[1][]{\freq[rest]{#1}}
\newcommand{\fmeas}[1][]{\freq[meas]{#1}}
\newcommand{\fobs} [1][]{\freq[obs]{#1}}
\newcommand{\flsr} [1][]{\freq[lsr]{#1}}

\newcommand{\dfrest}[1][]{\emm{\delta \frest[#1]}}
\newcommand{\dfmeas}[1][]{\emm{\delta \fmeas[#1]}}
\newcommand{\dfobs}[1][]{\emm{\delta \fobs[#1]}}
\newcommand{\dflsr}[1][]{\emm{\delta \flsr[#1]}}
\newcommand{\dvmeas}[1][]{\emm{\delta \vmeas[#1]}}
\newcommand{\dvobs}[1][]{\emm{\delta \vobs[#1]}}
\newcommand{\dvlsr}[1][]{\emm{\delta \vlsr[#1]}}

\newcommand{\vmeas}[1][]{\velo[meas]{#1}}
\newcommand{\vobs}[1][]{\velo[obs]{#1}}
\newcommand{\vlsr}[1][]{\velo[lsr]{#1}}

\newcommand{\dmeas}[1][]{\doppler[meas]{#1}}
\newcommand{\dobs}[1][]{\doppler[obs]{#1}}
\newcommand{\dlsr}[1][]{\doppler[lsr]{#1}}

\newcommand{\Dvobs}[1][]{\emm{\delta \vobs[#1]}}

\newcommand{\clight}{\emm{c}}

\newcommand{\class}{\texttt{CLASS}}
\newcommand{\mira}{\texttt{MIRA}}
\newcommand{\mrtcal}{\texttt{MRTCAL}}

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

\newcommand{\TabHeader}{%
  \begin{table}
    \centering
    \caption{\class{} header parameters used to describe the
      frequency/velocity axes and their translation in this document.}
    \begin{tabular}{cccc}
      \hline
      \hline
      \class{} name & Unit & Translation & Notation \\
      \hline
      \texttt{nchan}   &    --- & Number of channel           & ---               \\
      \texttt{rchan}   &    --- & Reference channel           & \ic[0]            \\
      \texttt{restf}   &    MHz & Tuned signal rest frequency & \frest[tuned,sig] \\
      \texttt{image}   &    MHz & Tuned image rest frequency  & \frest[tuned,ima] \\
      \texttt{fres}    &    MHz & Observatory channel spacing & \dfmeas{}         \\
      \texttt{vres}    & \kms{} & Velocity channel spacing    & \dvmeas{}         \\
      \texttt{voff}    & \kms{} & source systemic velocity    & \vmeas[sys]       \\
      \texttt{doppler} &    --- & Doppler factor              & \dmeas[sys]       \\
      \hline
    \end{tabular}
    \label{tab:header}
  \end{table}}

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

\begin{document}

\thispagestyle{firststyle}

\begin{center}
  \includegraphics[width=5cm]{gildas-logo}\\[2\bigskipamount]
  \huge{}
  IRAM Memo 2011-4\\
  Description of the spectral axis handling in \class{}\\[3\bigskipamount]
  \large{}
  J.~Pety$^{1,2}$ \& S.~Bardeau$^1$\\[0.5cm]
  1. IRAM (Grenoble) \\
  2. LERMA, Observatoire de Paris\\[0.5cm]
  \normalsize{}
  July 6$^\emr{th}$, 2019\\
  Version 1.2\\
  (Version 1.1 released on October 10$^\emr{th}$, 2014)\\
  (Version 1.0 released on October 20$^\emr{th}$, 2011)
\end{center}

\begin{abstract}
  An observer is interested by the physical properties (line frequencies,
  velocity of the gas) of a source in its own reference frame. However, the
  observations happen in a different frame, namely the topocentric frame
  for ground-based observations. This implies a change of frame to infer
  the physical properties in the source frame from the measured frequencies
  in the measurement frame. This memo tries to explain the different
  interpretation of the spectral axis, the additional subtleties related to
  heterodyne receivers in radio-astronomy, the current description of the
  spectral axis handling in \class{}, and the impact of various
  short-comings that happen for historical reasons.
\end{abstract}

\newpage{}
\tableofcontents{}

\newpage{}

\section{Introduction}

\subsection{Spectrometers in radio-astronomy}

Typical radio-astronomy spectrometers (\eg{}, correlators or Fourier
transform spectrometers) deliver the brightness along a given line of sight
at regularly spaced frequencies \emph{in the observatory frame}. The
spectrum can be represented as a set of brightness temperatures $T(\ic)$,
where the frequency axis in the observatory frame is defined as
\begin{equation}
  \fobs(\ic) = \fobs[tuned] + (\ic-\ic[0]) \, \dfobs,
  \label{eq:fobs:rf}
\end{equation}
where \fobs(\ic) is the frequency at the channel \ic{}, \fobs[tuned] the
frequency at the reference channel \ic[0], and \dfobs{} the channel
spacing.

\subsection{The Doppler effect}

The Doppler effect is used to interpret the frequency axis of the measured
spectrum. Using the radio convention, the non-relativistic Doppler effect
in the observatory frame can be written as
\begin{equation}
  \frac{\vobs}{\clight} = \frac{\frest-\fobs}{\frest} = 1-\frac{\fobs}{\frest},
\end{equation}
where \vobs{} is the velocity of the source in the observatory frame,
\fobs{} and \frest{} are the frequency of the measured photon in the
observatory and rest frame respectively. \vobs{} is positive if the source
recesses and the rest frame is defined as the frame where the velocity of
the emitting gas cell is zero. Introducing the doppler parameter
\dobs{}, we obtain
\begin{equation}
  \frac{\fobs}{\frest} = 1+\dobs
  \quad \mbox{with} \quad
  \dobs \Definition -\frac{\vobs}{\clight}.
\end{equation}

\subsection{Interpretation 1: At fixed \vobs{}}
\label{sec:interpretation:vobs}

Let's assume that the same gas cell in the source emits two lines at
different frequencies. We are at fixed \vobs{} and thus \dobs{} because we
consider the same gas cell. The frequency axes in the rest and observatory
frames are thus given by
\begin{equation}
  \frest = \frac{\fobs}{1+\dobs}.
\end{equation}
This means that the frequency separation between the two lines is different
in the rest and observatory frames. The modeller has easily access to the
rest frame frequencies of the line. It is thus important to display the
spectrum frequency axis in the rest frequency axis. This can be achieved
only for one velocity (The reasoning is here done at fixed \vobs{}), which
is by default assumed to be the systemic velocity of the source in the
observatory frame, \ie{}, the mean velocity of the source gas in the
observatory frame, written \vobs[\emr{sys}].

As a convention, \class{} assumes that the tuned rest frequency and its
corresponding observatory frequency at the source systemic velocity are
associated to the common reference channel \ic[0]. \class{} then displays the
frequency axis in the rest frequency associated to the source systemic
velocity through
\begin{equation}
  \frest(\ic) = \frest[tuned] + (\ic-\ic[0]) \, \dfrest
  \quad \mbox{with} \quad
  \dfrest = \frac{\dfobs}{1+\dobs[\emr{sys}]}
  \quad \mbox{and} \quad
  \dobs[\emr{sys}] = -\frac{\vobs[\emr{sys}]}{\clight}.
  \label{eq:frest}
\end{equation}
The plotted spectrum thus correctly displays the line at rest frequency
positions, \ie{}, the brightnesses of the gas whose velocity is equal to
the systemic velocity in the observatory frame.

\subsection{Interpretation 2: At fixed \frest{}}
\label{sec:interpretation:frest}

Let's assume that the measured spectrum is made of a line centered around
\fobs[tuned] in the observatory frame. The associated rest frame frequency,
\ie{}, the frequency of the line at rest, will be \frest[tuned]. The
observation is naturally set up so that the source frame is also the rest
frame. This implies that \fobs[tuned], \frest[tuned] and \vobs[sys] are linked through
\begin{equation}
  \frac{\fobs[tuned]}{\frest[tuned]} = 1+\dobs[sys]
  \quad \mbox{with} \quad
  \dobs[sys] \Definition -\frac{\vobs[sys]}{\clight}.
\end{equation}

The modeller will use the Doppler effect to interpret the observed
frequency difference $\fobs(\ic)-\fobs[tuned]$ as a local velocity
difference (projected along the line of sight direction) around the
systemic velocity of the source.  Let's write \vobs(\ic) the velocity
associated to \fobs(\ic).  The velocity difference will be noted
\begin{equation}
  \Dvobs(\ic) \Definition \vobs(\ic)-\vobs[sys].
\end{equation}
In order to derive this velocity difference, we associate the velocity to
each observed frequency through the Doppler effect, \ie{},
\begin{equation}
  \frac{\fobs(\ic)}{\frest[tuned]} = 1+\dobs(\ic)
  \quad \mbox{with} \quad
  \dobs(\ic) \Definition -\frac{\vobs(\ic)}{\clight}.
\end{equation}
It is easy to deduce that
\begin{equation}
  \Dvobs(\ic) = \clight\,\frac{\fobs[tuned]-\fobs(\ic)}{\frest[tuned]},
\end{equation}
\ie{}, the local velocity difference is proportional to the observed
frequency difference. We can define a linear velocity axis associated to
the set of brightnesses, $T(\ic)$ as
\begin{equation}
  \vobs(\ic) = \vobs[sys] + (\ic-\ic[0]) \, \dvobs
  \quad \mbox{with} \quad
  \dvobs = -\clight\frac{\dfobs}{\frest[tuned]}.
\end{equation}
\emph{This velocity scale is only meaningful locally, \ie{}, as long as the
  brightnesses can be associated to the line rest frequency under
  consideration.}

\section{Heterodyne receivers and signal/image frequency axes}

\subsection{USB and LSB frequency axes in the observatory frame}

Heterodyne receivers mix a local oscillator frequency, \fobs[LO], to the
astronomical signal to transfer the frequency axis from high radio
frequencies, \fobs[RF], to low intermediate frequencies, \fobs[IF], which
are then suitable for easy electronic processing. A consequence is that two
bands of radio frequencies, namely the lower side band (LSB) and the upper
side band (USB) are mixed in the observed spectrum, \ie{}, the set of
brightnesses, $T(\ic)$, are associated to one IF frequency axis and two RF
frequency axes linked through
\begin{equation}
  \fobs[IF](\ic) = \SBSign \, \bracket{\fobs[RF](\ic)-\fobs[LO]}
\end{equation}
with $\SBSign=-1$ for the RF frequency axis belonging to the lower side
band (LSB) tuning and $\SBSign=+1$ for the RF frequency axis belonging to
the upper side band (USB). The measured spectra is thus in the IF axis and
Eq.~\ref{eq:fobs:rf} must be modified as
\begin{equation}
  \fobs[IF](\ic) = \fobs[IFtuned] + (\ic-\ic[0]) \, \dfobs[IF],
  \label{eq:fobs:if}
\end{equation}
with
\begin{equation}
  \fobs[IFtuned] \Definition \SBSign \, (\fobs[RFtuned] -\fobs[LO])
                 \Definition  \emr{cste}.
\end{equation}
The constancy of \fobs[IFtuned] is a property of the heterodyne receivers.
Combining the last 3 equations, we yield
\begin{equation}
  \fobs[RF](\ic) = (\fobs[LO]+\SBSign \,\fobs[IFtuned]) 
                 + \SBSign \, (\ic-\ic[0]) \, \dfobs[IF].
\end{equation}

\subsection{Signal and image frequency axes in the observatory frame}

The RF tuning frequency, \fobs[RFtuned], can be choosen in either band.
This band is called the signal band. The other band is then called the
image band. The associated RF frequencies are written \fobs[sig] and
\fobs[ima]. We obtain
\begin{equation}
  \fobs[sig](\ic) = \fobs[sig,tuned] + \SBSign \, (\ic-\ic[0]) \, \dfobs[IF]
  \quad \mbox{with} \quad
  \fobs[sig,tuned] \Definition \fobs[LO]+\SBSign \,\fobs[IFtuned],
  \label{eq:sig}
\end{equation}
and
\begin{equation}
  \fobs[ima](\ic) = \fobs[ima,tuned] - \SBSign \, (\ic-\ic[0]) \, \dfobs[IF]
  \quad \mbox{with} \quad
  \fobs[ima,tuned] \Definition \fobs[LO]-\SBSign \,\fobs[IFtuned].
  \label{eq:ima}
\end{equation}
The sign of the product $\SBSign \,\dfobs[IF]$ is arbitrary. Indeed, it
only defines how the brightnesses are ordered in memory, \ie{}, whether the
frequency increases or decreases when \ic{} increases. It thus is simpler
to assume that this product is always positive. This implies that the
signal frequency increases and the image frequency decreases when \ic{}
increases. In other words, we adopt the convention that the signal
brightnesses are ordered by increasing frequency when \ic{} increases,
\ie{}, the product $\SBSign \,\dfobs[IF]$ is always positive.

As the absolute value of \SBSign{} is 1, we will greatly simplify the
equations by replacing $\SBSign \,\dfobs[IF]$ with \dfobs[IF] with the
convention that $\dfobs[IF] > 0$ in Eqs~\ref{eq:sig} and~\ref{eq:ima}. We
can then rewrite them as
\begin{equation}
  \fobs[sig](\ic) = \fobs[sig,tuned] + (\ic-\ic[0]) \, \dfobs[IF]
  \quad \mbox{with} \quad
  \fobs[sig,tuned] \Definition \fobs[LO]+\SBSign \,\fobs[IFtuned],
\end{equation}
and
\begin{equation}
  \fobs[ima](\ic) = \fobs[ima,tuned] - (\ic-\ic[0]) \, \dfobs[IF]
  \quad \mbox{with} \quad
  \fobs[ima,tuned] \Definition \fobs[LO]-\SBSign \,\fobs[IFtuned].
\end{equation}
with
\begin{equation}
  \dfobs[IF] > 0.
\end{equation}

\subsection{Signal and image frequency axes in the rest frame}

The discussion of Section~\ref{sec:interpretation:vobs} is still valid for
both the signal and image frequency axes. Eq.~\ref{eq:frest} can easily be
rewritten
\begin{equation}
  \frest[sig](\ic) = \frest[sig,tuned] + (\ic-\ic[0]) \, \dfrest,
\end{equation}
and
\begin{equation}
  \frest[ima](\ic) = \frest[ima,tuned] - (\ic-\ic[0]) \, \dfrest,
\end{equation}
with
\begin{equation}
  \dfrest = \frac{\dfobs[IF]}{1+\dobs[\emr{sys}]}
  \quad \mbox{and} \quad
  \dobs[\emr{sys}] = -\frac{\vobs[\emr{sys}]}{\clight}.  
\end{equation}
\frest[sig,tuned] is simply the tuning frequency entered by the user.
However, \frest[ima,tuned] must be computed. The easiest way is to define
the side band separation as
\begin{equation}
  \SBSobs \Definition \SBSign\bracket{\fobs[sig,tuned]-\fobs[ima,tuned]}.
\end{equation}
It is straightfoward to show that it is constant and equal to
\begin{equation}
  \SBSobs = \emr{cste} = 2\,\fobs[IFtuned].
\end{equation}
In the rest (source) frame, the following relations hold
\begin{equation}
  \frac{\fobs[sig,tuned]}{\frest[sig,tuned]} = 1+\dobs[sys]{}
  \quad \mbox{} \quad
  \frac{\fobs[ima,tuned]}{\frest[ima,tuned]} = 1+\dobs[sys]{}.
\end{equation}
The side band separation in the rest frame is defined as
\begin{equation}
  \SBSrest \Definition \SBSign\bracket{\frest[sig,tuned]-\frest[ima,tuned]}.
\end{equation}
It is then straightforward to show that
\begin{equation}
  \SBSobs = \SBSrest\,\bracket{1+\dobs[sys]},
\end{equation}
and
\begin{equation}
  \label{eq:ima-vs-sig}
  \frest[ima,tuned] = \frest[sig,tuned]-\frac{\SBSobs}{\SBSign\,\bracket{1+\dobs[sys]}}.
\end{equation}

\section{Earth movements}

\subsection{Periodic shift and dilatation of the rest frequency axis}

For a Earth-based observatory, the observed velocity of the source changes
with time due to the rotation of the Earth around its axis and around the
sun. This implies that the change from the observatory to the rest
frame varies with time. The frequency scale in the observatory frame is
fixed by the hardware. The frequency scale in the rest frame thus changes
with time in two different ways, a shift and a dilatation. The tuned rest
frequency is shifted, while the frequency resolution dilates the frequency
axis around the tuned frequency.

If nothing is done, averaging spectra to increase the signal-to-noise ratio
would imply first a resampling to align the observed frequency scales. It
is desirable to avoid this because resampling has many unwanted
side-effects, as round-off errors or introduced correlations of the noise
levels between channels (see IRAM Memo 2009-4). We present here hardware
solutions to this problem.

\subsection{Stopping the periodic shift}
\label{sec:shift}

As the systemic velocity of the source in the observatory frame varies with
time in a predictable way, the radio-observatories tune the local
oscillator frequency in order to stop the shifting of the observed
frequency scale. For instance, the relation between the observatory
frequency and the LSR (Local Standard of Rest) frequency is
\begin{equation}
  \flsr = \fobs + \frest \, \frac{\vobs[sys]-\vlsr[sys]}{\clight},
\end{equation}
because
\begin{equation}
  \fobs = \frest \, \paren{1-\frac{\vobs[sys]}{\clight}}
  \quad \mbox{and} \quad
  \flsr = \frest \, \paren{1-\frac{\vlsr[sys]}{\clight}}.
\end{equation}
Thus adding $\bracket{\SBSign \, \frest \,
  (\vobs[sys]-\vlsr[sys])/\clight}$ to the local oscillator frequency makes
the signal frequency appear as if it was measured in the LSR frame. All the
velocities are then expressed in the LSR frame instead of the observatory
frame.

However, there is a single local oscillator frequency. Let's assume that
the correction is done at the tuned signal frequency, \ie{},
\begin{equation}
  \flsr[sig,tuned] = \fobs[sig,tuned] + \frest[sig,tuned] \, \frac{\vobs[sys]-\vlsr[sys]}{\clight}.
\end{equation}
The correction which is applied to another frequency is then
\begin{equation}
  \flsr(\ic) = \fobs(\ic) + \frest[sig,tuned] \, \frac{\vobs[sys]-\vlsr[sys]}{\clight},
\end{equation}
while the correction that should have been applied to another frequency is
\begin{equation}
  \flsr(\ic) = \fobs(\ic) + \frest(\ic) \, \frac{\vobs[sys]-\vlsr[sys]}{\clight}.
\end{equation}
The difference (or error) is
\begin{equation}
  \Delta\flsr(\ic) = (\ic-\ic[0])\,\dfrest \, \frac{\vobs[sys]-\vlsr[sys]}{\clight}.
\end{equation}
The correction is thus exact only in $\ic = \ic[0]$, \ie{}, for the tuned
signal frequency\footnote{In fact, there often are several local
  oscillators in a radio-observatory. At the Plateau de Bure
  Interferometer, two of them are used to stop both the signal and image
  tuned frequencies. This was useful at the time when the 1mm receivers
  were double-sideband and the sideband separation was obtained with Walsh
  phase modulation/demodulation.}. All the other signal and image
frequencies oscillates with time with a frequency amplitude which linearly
increases with the distance to the reference channel. In other words, this
corrects only the global frequency shift, not the dilatation around the
reference channel.

\subsection{Stopping the periodic dilatation}

At IRAM-30m, G.~Paubert proposes to stop the periodic dilatation in the
rest frequency by adapting the channel spacing of the spectrometer
frequency comb in real time. This in combination with LO tuning will stop
all temporal variations of the frequency axis, removing the need for
resampling when averaging spectra observed at different time of year.

This proposition is equal to a change of reference frame for the channel
spacing. Due to hardware limitation, this change of frame can only be done
from the observatory to the barycentric frame. This implies that adaptation
of the frequency channel spacing when going from the barycentric frame to
the source rest frame will still be needed.

\section{\class{} implementation}
\label{sec:class}

\subsection{The header parameters}

\TabHeader{} %

Table~\ref{tab:header} describes the \class{} header parameters used to
describe the frequency/velocity axes and their translation in this
document. The signal and image frequency axis are given in the source (rest) frame
by
\begin{equation}
  \frest[sig](\ic) = \frest[sig,tuned] + (\ic-\ic[0]) \, \dfrest,
\end{equation}
and
\begin{equation}
  \frest[ima](\ic) = \frest[ima,tuned] - (\ic-\ic[0]) \, \dfrest,
\end{equation}
with
\begin{equation}
  \dfrest = \frac{\dfmeas[IF]}{1+\dmeas[\emr{sys}]}
  \quad \mbox{and} \quad
  \dmeas[\emr{sys}] = -\frac{\vmeas[\emr{sys}]}{\clight},
\end{equation}
where \dfmeas[IF] is the frequency channel spacing , and \vmeas[\emr{sys}]
is the source systemic velocity \emph{in the measurement frame}. The
corresponding velocity axis in the measurement frame is thus given by
\begin{equation}
  \vmeas(\ic) = \vmeas[sys] + (\ic-\ic[0]) \, \dvmeas
  \quad \mbox{with} \quad
  \dvmeas = -\clight\frac{\dfmeas}{\frest[tuned]}.
\end{equation}

\subsection{The IRAM-30m case as of 2019-07-06: Systemic velocity in
  (slightly) different frames}

The previous equations assume that the systemic velocity is given in the
same frame as the frequency channel spacing. However, at the 30m the
systemic velocity is usually given in the LSR frame (as requested by the
user) and the channel spacing and the doppler factor are given in the
observatory frame.

On one hand, the rest frequency scale is correctly computed by \class{}
because the channel spacing and the doppler factor are given in the same
frame. On the other hand, the velocity scale is only approximated because
the source systemic velocity is given in another frame, most often the LSR
frame.

The end-user (astronomer) is interested with the velocity scale in the LSR
frame
\begin{equation}
  \vlsr(\ic) = \vlsr[sys] + (\ic-\ic[0]) \, \dvlsr
  \quad \mbox{with} \quad
  \dvlsr = -\clight\frac{\dflsr}{\frest[tuned]}.
\end{equation}
But he actually gets
\begin{equation}
  \vlsr(\ic) = \vlsr[sys] + (\ic-\ic[0]) \, \dvobs
  \quad \mbox{with} \quad
  \dvobs = -\clight\frac{\dfobs}{\frest[tuned]}.
\end{equation}
The relative error can be expressed as
\begin{equation}
  \frac{\dvobs-\dvlsr}{\dvlsr} = \frac{\dfobs}{\dflsr}-1 = \frac{1+\dlsr[sys]}{1+\dobs[sys]}-1.
\end{equation}
We yield to first order in $v/\clight$
\begin{equation}
  \frac{\dvobs-\dvlsr}{\dvlsr} = \frac{\vobs[sys]-\vlsr[sys]}{\clight} \sim 10^{-4}.
\end{equation}
If we tolerate an error of 1/10th of a channel on the velocity, this
implies that the velocity scale is correct for about 1000 channels around
the systemic velocity. This translates into $\sim250\kms$ at 1\mm{} for a
spectral resolution of 195\kHz. This means that the interpretation of the
velocity scale of Galactic observations is correct. On the other hand, this
could be a problem for extra-galactic observations at extremely high
spectral resolution, assuming that the observers do not first downsample
their spectra to increase the signal-to-noise ratio per channel...

The easiest way out of the problem would be to write the parameters of the
header in the LSR frame in the calibration software that writes the \class{}
observation with
\begin{equation}
  \dflsr = \dfobs \, \frac{1+\dobs[sys]}{1+\dlsr[sys]},
  \quad
  \dvlsr = -\clight\frac{\dflsr}{\frest[tuned]},
  \quad \mbox{and} \quad
  \dlsr = 1-\frac{\vlsr}{\clight}.
\end{equation}
In other words, we trick \class{} into thinking that the measurement frame
is LSR, while the true measurement frame was the observatory.

% \begin{verbatim}
% ***************************************************************************
% Question: What about the image frequency? Should it be changed as in the
% case of the MODIFY VELOCITY command?
% ***************************************************************************
% \end{verbatim}

\subsection{The \texttt{MODIFY FREQUENCY} command}
\label{sec:modify:freq}

This command is used to assign a new rest frequency to the current
spectrum. The velocity axis is thus recomputed to set the source systemic
velocity at this new rest frequency (see
Section~\ref{sec:interpretation:frest}). For consistency the description of
the image frequency axis must also be changed.

This command exists because the line rest frequency is sometimes more
uncertain than the spectrometer resolution, implying that the line appeared
at velocity different from the source systemic velocity.  Nowdays, the
bandwidth of the receivers is moreover so large that many lines appear in
the same spectrum. For this latter use case, the only way to associate the
right velocity to different line rest frequency is to use this command.

\subsubsection{Signal frequency axis}

The signal frequency axis stays constant under this transform. Only its
description changes. This can be written as
\begin{eqnarray}
  \frest[sig](\ic) & = & \frest[sig,old] + (\ic-\ic[0,old]) \, \dfrest,\\
                   & = & \frest[sig,new] + (\ic-\ic[0,new]) \, \dfrest,
\end{eqnarray}
with
\begin{equation}
  \dfrest = \frac{\dfmeas[IF]}{1+\dmeas[\emr{sys}]}.
\end{equation}
It is then easy to deduce that only the reference channel must be changed as
\begin{equation}
    \ic[0,new]
  = \ic[0,old]
  + \frac{\frest[sig,new]-\frest[sig,old]}{\dfmeas[IF]} \, \paren{1+\dmeas[\emr{sys}]}
\end{equation}

\subsubsection{Image frequency axis}

The image frequency axis must also be kept fixed. This implies
\begin{eqnarray}
  \frest[ima](\ic) & = & \frest[ima,old] - (\ic-\ic[0,old]) \, \dfrest,\\
                   & = & \frest[ima,new] - (\ic-\ic[0,new]) \, \dfrest,
\end{eqnarray}
We thus yield for the new tuned signal and image frequency the following relations
\begin{eqnarray}
  \frest[sig,new] & = & \frest[sig,old] + (\ic[0,new]-\ic[0,old]) \, \dfrest,\\
  \frest[ima,new] & = & \frest[ima,old] - (\ic[0,new]-\ic[0,old]) \, \dfrest.
\end{eqnarray}
Adding them gives
\begin{equation}
  \frest[ima,new] + \frest[sig,new] = \frest[sig,old]+\frest[ima,old].
\end{equation}
This relation can be used to computes the new image frequency. It can be
interpreted as the LO tuning frequency is kept fixed under the
transformation. But the side band separation changed.

\subsubsection{Velocity axis}

The reference channel of the velocity axis was already changed. It only
remains to recompute the new velocity resolution associated to the new rest
frequency
\begin{equation}
  \dvmeas[new] =  - \clight \frac{\dfmeas}{\frest[sig,new]}.
\end{equation}

\subsection{The \texttt{MODIFY VELOCITY} command}
\label{sec:modify:velo}

This command is used to assign a new source systemic velocity to the
current spectrum. This command is used when the line rest frequency is
known very accurately but the line appears shifted. This implies that the
source systemic velocity is slightly offset (see
Section~\ref{sec:interpretation:vobs}).

\subsubsection{Principle}

Changing the source systemic velocity is a change of source reference
frame. The signal and image frequency scales in the measurement frame must
stay constant under this transform. However they change in the source
reference frame. Indeed
\begin{equation}
  \fmeas = (1+\dmeas[old]) \, \frest[old] = (1+\dmeas[new]) \, \frest[new],
\end{equation}
with
\begin{equation}
  \dmeas[old] = -\frac{\vmeas[sys,old]}{\clight}
  \quad \mbox{and} \quad
  \dmeas[new] = -\frac{\vmeas[sys,new]}{\clight}.
\end{equation}
Hence
\begin{equation}
  \frest[new] = \frest[old] \, \frac{1+\dmeas[old]}{1+\dmeas[new]}.
\end{equation}

\subsubsection{The signal frequency axis}

The rest signal frequency must be kept fixed. Indeed, the user is trying to
characterize a line at the rest signal frequency. But the rest frequency
axis changed
\begin{eqnarray}
      \frest[sig,new](i)
  &=& \frest[sig,tuned] + (\ic-\ic[0,new]) \, \dfrest[new]\\
  &=& \bracket{\frest[sig,tuned] +  (\ic-\ic[0,old]) \, \dfrest[old]}
      \, \frac{1+\dmeas[old]}{1+\dmeas[new]}. 
\end{eqnarray}
This equality must be true whatever \ic{}. This implies that the reference
channel and the frequency resolution must be recomputed with
\begin{equation}
  \ic[0,new] = \ic[0,old] 
             + \frac{\frest[sig,tuned]}{\dfmeas[old]} \, \bracket{\dmeas[new]-\dmeas[old]},
\end{equation}
and 
\begin{equation}
  \dfrest[new] = \dfrest[old] \, \frac{1+\dmeas[old]}{1+\dmeas[new]},
  \quad \mbox{\ie{},} \quad
  \dfmeas[new] = \dfmeas[old].
\end{equation}
The last equation just indicates that the channel spacing, which were
measured in the measurement frame, did not changed. Indeed, this is the
source frame (and not the measurement frame) which is changed through this
transformation. The equation for the computation of the rest frequency
resolution from measurement frequency resolution is the usual one
(Eq.~\ref{eq:frest}).

\subsubsection{The image frequency axis}

Now that the reference channel has been computed to keep the rest signal
frequency fixed, the only free parameter to compute the new image frequency
axis is the tuned image frequency.

\begin{eqnarray}
      \frest[ima,new](i)
  &=& \frest[ima,tuned,new] - (\ic-\ic[0,new]) \, \dfrest[new]\\
  &=& \bracket{\frest[ima,tuned,old] -  (\ic-\ic[0,old]) \, \dfrest[old]}
      \, \frac{1+\dmeas[old]}{1+\dmeas[new]}. 
\end{eqnarray}
\begin{equation}
    \frest[ima,new]
  = \frest[ima,old] \, \frac{1+\dmeas[old]}{1+\dmeas[new]}
  - \frest[sig,tuned] \, \frac{\dmeas[new]-\dmeas[old]}{1+\dmeas[new]}.
\end{equation}

\subsubsection{The doppler factor}

Note that the systemic velocity is often given in a different frame (LSR,
heliocentric) than the measervatory frame. As long as the new systemic
velocity is given in the same frame as the old systemic velocity, it is
possible to compute the new doppler factor from the old one. Let's assume
that the systemic velocity is given in the LSR frame. We have
\begin{equation}
  \dmeas[old] = -\frac{\vmeas[lsr]+\vlsr[sys,old]}{\clight}
  \quad \mbox{and} \quad
  \dmeas[new] = -\frac{\vmeas[lsr]+\vlsr[sys,new]}{\clight}.  
\end{equation}
Subtracting both equation gives
\begin{equation}
  \dmeas[new] = \dmeas[old] + \frac{\vlsr[sys,old]-\vlsr[sys,new]}{\clight}.  
\end{equation}

\section{Velocity conventions}

\newcommand{\vpara}{\vobs[\parallel]}
\newcommand{\vperp}{\vobs[\perp]}

\subsection{The generic Doppler formula}

The Doppler effect expresses that a source emitting in its rest frame at a
frequency \frest{} will appear to emit at a frequency \fobs{} in the
observation frame, which depends on the velocity of the source in the
observation frame, \vobs{}. The relation between \frest{} and \fobs{} is
given by
\begin{equation}
  \fobs = \frest \, \frac{\sqrt{\clight^2-{\vobs}^2}}{\clight+\vpara},
  \label{eq:doppler:1}
\end{equation}
with ${\vobs}^2 = {\vpara}^2+{\vperp}^2$, where \vpara{} and \vperp{} are
respectively the velocity components along and perperdicular to the line of
sight. \vpara{} and \vperp{} are often called the radial and transverse
velocity components. 

For objects far from the observer, $\vpara \gg \vperp$ because of the
universe expansion. For close-by objects, Eq.~\ref{eq:doppler:1} shows that
the dependency on \vperp{} is of second order in $v/\clight$, while the
dependency on \vpara{} is only of first order in $v/\clight$. Hence, for
all cases, the Doppler equation is simplified to
\begin{equation}
  \fobs = \frest \, \sqrt{\frac{\clight-\vpara}{\clight+\vpara}}.
  \label{eq:doppler:relativistic}
\end{equation}
In other words, the frequency change under a change of frame is attributed
only to the radial velocity between the rest and observation frame. 

\subsection{The radio velocity convention}
\label{sec:conv:radio}

If the radial velocity is negligeable compared to the light velocity, we
obtain to first order
\begin{equation}
  \fobs = \frest \, \paren{1-\frac{\vpara}{\clight}}.
  \label{eq:doppler:radio}
\end{equation}
In this case, we can establish a linear velocity scale (see
Sect.~\ref{sec:interpretation:frest})
\begin{equation}
  \vobs(\ic) = \vobs[sys] + (\ic-\ic[0]) \, \dvobs
  \quad \mbox{with} \quad
  \dvobs = -\clight\frac{\dfobs}{\frest[tuned]}.
\end{equation}
This linear velocity scale is only a first order approximation, which is
called the radio velocity convention. Indeed, it is well adapted to the
radio spectrometer because 1) their natural output is a spectral axis
regularly spaced in frequency and 2) the radio velocity convention gives a
linear relation between the velocity and the frequency scale. This is why
this convention is the default in \class{}.

\subsection{The optical velocity convention}

Optical spectrometers (\eg{}, grates) naturally delivers a spectral axis
regularly spaced in wavelength. Eq.~\ref{eq:doppler:relativistic} can then
be rewritten as
\begin{equation}
  \lobs = \lrest \, \sqrt{\frac{\clight+\vpara}{\clight-\vpara}}.
\end{equation}
The first order approximation gives
\begin{equation}
  \lobs = \lrest \, \paren{1+\frac{\vpara}{\clight}}.
\end{equation}
In frequency this gives
\begin{equation}
  \fobs = \frac{\frest}{1+\frac{\vpara}{\clight}}.
  \label{eq:doppler:optical}
\end{equation}
Following the same path as in Sect.~\ref{sec:interpretation:frest} but now
in wavelenght, it is easy to show that we can establish a linear velocity
scale proportional to the wavelength axis
\begin{equation}
  \vobs[opt](\ic) = \vobs[sys,opt] + (\ic-\ic[0]) \, \dvobs[opt]
  \quad \mbox{with} \quad
  \dvobs[opt] = +\clight \, \frac{\delta\lobs}{\lrest[tuned]}.
\end{equation}
This velocity scale is called the optical velocity convention. The relation
between this velocity scale and the frequency spectral axis is
non-linear. This is why it is not used in \class{}.

\subsection{Mixing conventions between observation and analysis}

For the moment, \class{} assumes that the data were observed in the
observatory frame using a doppler tracked tuning frequency that follows the
radio convention. However, the observations may have been done using the
relativistic or optical convention. This section deals with the
consequences of this mis-match between observation and analysis.

\subsubsection{General case}
\label{sec:mixing:general}

\newcommand{\vconv}[1]{\velo{\emr{#1}}}
\newcommand{\Doppler}[2]{\emm{D_{\emr{#1}}(#2)}}

Let's assume that the user wishes to observe a line that appears at the
rest frequency, \frest[tuned], for a source that has a systemic velocity,
\vconv{1}, in a given velocity convention \#1. The rest frame and
observatory frame frequencies are linked by the Doppler effect through
\begin{equation}
  \fobs[tuned,conv1] = \frest[tuned]\,\Doppler{1}{\vconv{1}},
\end{equation}
where \Doppler{1}{} is the Doppler function that can be deduced from
Eq.~\ref{eq:doppler:relativistic}, \ref{eq:doppler:radio}, or
\ref{eq:doppler:optical}, depending on the assumed convention. For
instance, the Doppler function of the optical convention is
\begin{equation}
  D_\emr{opt}(\velo{opt}) = \frac{1}{1+\frac{\velo{opt}}{\clight}}.
\end{equation}

Now, let's assume that the analysis exactly uses the same observed
frequency, \fobs[tuned,1], and systemic velocity, \vconv{1}, but it
interprets it using another Doppler convention and thus Doppler function,
\Doppler{2}{}. The spectral axis in the rest frame is then computed as
\begin{equation}
  \frest(\ic) = \frest[apparent] + (\ic-\ic[0]) \, \dfrest[apparent],
\end{equation}
with
\begin{equation}
  \frest[apparent] = \frest[tuned]\,\frac{\Doppler{1}{\vconv{1}}}{\Doppler{2}{\vconv{1}}},
  \quad \mbox{and} \quad
  \dfrest[apparent] = \dfrest[tuned]\,\frac{\Doppler{1}{\vconv{1}}}{\Doppler{2}{\vconv{1}}}.
\end{equation}
This means that the lines will seem to appear at a wrong rest frequency
with a wrong full width at half maximum.

\subsubsection{The IRAM-30m case as of 2019-07-06}
\label{sec:mixing:30m}

\begin{figure}[t]
  \centering{} %
  \includegraphics[width=\linewidth]{class-spectral-axis-v12-optic-vs-radio}
  \caption{\textbf{Left:} Relative error on the dilatation
    factor. \textbf{Right:} Frequency offset for a line at 115 GHz. The red
    lines correspond to typical LSR velocities for Galactic/extra-Galactic
    sources, respectively.}
  \label{fig:mixing:30m}
\end{figure}

For historical reasons, the velocity convention used to stop the periodic
shift due to Earth rotation (see Sect.~\ref{sec:shift}) has always been the
optical convention at the IRAM-30m. The systemic velocity given by the
observer is then interpreted as a radio velocity by \mira{} and \mrtcal{}
to compute the doppler factor from the observatory to the source rest
frame. This is exactly the situation described in
Sect.~\ref{sec:mixing:30m}. Figure~\ref{fig:mixing:30m} shows the relative
error on the dilatation factor (left panel) and the frequency offset for a
line at 115 GHz (right panel).

The corresponding frequency offset is 3.0 kHz for a velocity of 28\kms{},
and 1.0 MHz for a velocity of 885\kms{}. Hence the position of the tuned
line for both Galactic and extra-Galactic measurements is affected in a
measurable way. Moreover, the dilatation factor differs from 1.0 by a value
of the order of $10^{-5}$ for a velocity of 885\kms{}. This means that the
frequency of the lines that were not tuned will be wrong by 1/10th of
channel when they are located 10\,000 channels from the tuned
frequency. This is a 2nd order effect that is more difficult to measure
with today generation of receivers but it may become measurable with future
generations.

To fix this behavior, we first propose to modify the way the spectroscopic
section of \class{} data is filled by \mrtcal{} as follows
\begin{equation}
  \frest[sig,new] = \frest[sig,old]\,\frac{D_\emr{optic}(\vobs[sys,old])}{D_\emr{radio}(\vobs[sys,new])},
  \quad
  \frest[ima,new] = \frest[ima,old]\,\frac{D_\emr{optic}(\vobs[sys,old])}{D_\emr{radio}(\vobs[sys,new])},
\end{equation}
\begin{equation}
  \dfmeas[new] = \dfmeas[old]\,\frac{D_\emr{optic}(\vobs[sys,old])}{D_\emr{radio}(\vobs[sys,new])},
  \quad \mbox{and} \quad
  \dvmeas[new] = -\clight\frac{\dfmeas[new]}{\frest[sig,new]}.
\end{equation}
The inconvenient of this solution is that it makes \frest[sig,new],
\frest[ima,new], and \dfmeas[new] dependent on time because the correction
contains the Doppler effect from the observatory to the LSR frame.

A more consistent solution would be that the 30m changes the formula it
uses to stop the periodic shift due to Earth rotation and now uses the
radio convention.

\subsubsection{The APEX case as of 2019-07-06}
\label{sec:mixing:apex}

At APEX, the velocity convention used to stop the periodic shift due to
Earth rotation (see Sect.~\ref{sec:shift}) is the special relativity one.
In order to try to fit into the \class{} format, it was decided to deliver
the frequency axis in the source frame at the systemic velocity defined
using the special relativity convention and to set the doppler factor to
0. In other words, the interpretation of spectroscopy section of the
\class{} header as explained in Table~\ref{tab:header} has been tweaked as
follows.
\begin{description}
\item[\texttt{fres}] is the channel spacing in the rest frame.
\item[\texttt{vres}] is the velocity spacing in the frame where the
  systemic velocity is defined, e.g., LSR.
\item[\texttt{voff}] is the systemic velocity in the same frame, e.g., LSR.
\item[\texttt{doppler}] is set to zero. 
\end{description}
All other spectroscopic parameters keep their standard definition. 

The advantage of this method is that it gives 1) the correct frequency axis
in the rest frame, and 2) the correct velocity axis in the velocity frame,
as long as the systemic velocity is correct (see Sect.~\ref{sec:class}
and~\ref{sec:modify:freq}). The inconvenient of this method is that the
change the systemic velocity as coded in \class{} can not work. Indeed,
this change uses the \texttt{doppler} parameter (see Sect.~\ref{sec:class}
and~Sect.~\ref{sec:modify:velo}), which has been set to zero. While the
\texttt{MODIFY FREQUENCY} command works as expected, the \texttt{MODIFY
  VELOCITY} command gives unexpected results. Note that the \texttt{MODIFY
  DOPPLER} command will not fix the situation either because it just
recomputes the Doppler factor (assuming the radio velocity convention) but
it will not change the other parameters of the spectroscopy section
accordingly. This command should only be used when the Doppler factor is
wrong. This is not the case here as a zero valued Doppler factor is
consistent with the definition of the frequency axis.

The only correct solution is to undo the Doppler correction applied at
observing time and apply the new Doppler correction associated to the new
velocity, all this using the same velocity convention (i.e., the special
relativity one) to avoid having \class{} files containing APEX data with
different interpretation of the spectroscopy section. We need to update the
signal frequency, the image frequency, and the frequency and velocity
channel spacing as follows
\begin{equation}
  \frest[sig,new] = \frest[sig,old]\,\frac{D_\emr{relat}(\vobs[sys,old])}{D_\emr{relat}(\vobs[sys,new])},
  \quad
  \frest[ima,new] = \frest[ima,old]\,\frac{D_\emr{relat}(\vobs[sys,old])}{D_\emr{relat}(\vobs[sys,new])},
\end{equation}
\begin{equation}
  \dfmeas[new] = \dfmeas[old]\,\frac{D_\emr{relat}(\vobs[sys,old])}{D_\emr{relat}(\vobs[sys,new])},
  \quad \mbox{and} \quad
  \dvmeas[new] = -\clight\frac{\dfmeas[new]}{\frest[sig,new]}.
\end{equation}

One difficulty is the fact that filling the spectroscopic section as
described above implies that the Doppler correction to go from the
observatory to the LSR frame has been lost. Fortunately, the velocity
composition rule in special relativity implies that
\begin{equation}
    \frac{D_\emr{relat}(\vobs[sys,old])}{D_\emr{relat}(\vobs[sys,new])}
  = \frac{D_\emr{relat}(\vlsr[sys,old])}{D_\emr{relat}(\vlsr[sys,new])}.
\end{equation}
We can thus replace the previous set of equations by
\begin{equation}
  \frest[sig,new] = \frest[sig,old]\,\frac{D_\emr{relat}(\vlsr[sys,old])}{D_\emr{relat}(\vlsr[sys,new])},
  \quad
  \frest[ima,new] = \frest[ima,old]\,\frac{D_\emr{relat}(\vlsr[sys,old])}{D_\emr{relat}(\vlsr[sys,new])},
\end{equation}
\begin{equation}
  \dfmeas[new] = \dfmeas[old]\,\frac{D_\emr{relat}(\vlsr[sys,old])}{D_\emr{relat}(\vlsr[sys,new])},
  \quad \mbox{and} \quad
  \dvmeas[new] = -\clight\frac{\dfmeas[new]}{\frest[sig,new]}.
\end{equation}
And finally to update the value of \vlsr[sys] to the new one.

This situation should not happen often because galactic targets often have
well defined systemic velocity and the general advice is to observe
extra-galactic target at the red-shifted frequency to avoid
trouble~\citep{gordon92}.

\section*{Acknowledgement}

We thank S.Guilloteau, P.Hily-Blant, H.Liszt, R.Lucas, D.Muders, and
V.Piétu for useful discussions.

\bibliographystyle{aa}
\bibliography{class-spectral-axis-v12}

\end{document}

\subsection{High redshift sources}

If the source is far from the observer, the radial velocity may a sizeable
fraction of the light velocity and the above approximation is not valid
anymore. However, let's assume that the observer is interested to model the
source kinematic. It is then interested in small variations of the velocity
around the systemic velocity of the source. Using the same notations as in
Sect.~\ref{sec:interpretation:frest}, we have
\begin{equation}
  \fobs[tuned] = \frest[tuned] \, \sqrt{\frac{\clight-\vobs[sys]}{\clight+\vobs[sys]}},
\end{equation}
and
\begin{equation}
  \fobs(\ic) = \frest[tuned] \, \sqrt{\frac{\clight-\vobs(\ic)}{\clight+\vobs(\ic)}}.
\end{equation}
The velocity difference is noted
\begin{equation}
    \Dvobs(\ic) \Definition \vobs(\ic)-\vobs[sys].
\end{equation}
As long as\footnote{$1+\dobs[sys] = \frac{2}{1+(1+z)^2}$, where $z$ is the
  redshift. So the conditions are difficult to stand for high redshift
  sources...}
\begin{equation}
  \Dvobs(\ic) \ll \clight \, (1+\dobs[sys])
  \quad \mbox{and} \quad
  \Dvobs(\ic) \ll \clight \, (1-\dobs[sys]),
\end{equation}
it is straightforward to show that
\begin{equation}
    \fobs(\ic) - \fobs[tuned]
  = - \frest[tuned] \, \frac{\Dvobs(\ic)}{\clight} \, \frac{1}{1-{\dobs[sys]}^2}\,\sqrt{\frac{1+\dobs[sys]}{1-\dobs[sys]}}.
\end{equation}
In other words, we can still establish a linear scale for the velocity as
\begin{equation}
  \vobs(\ic) = \vobs[sys] + (\ic-\ic[0]) \, \dvobs
  \quad \mbox{with} \quad
  \dvobs = -\clight \, \frac{\dfobs}{\frest[tuned]} \, \paren{1-{\dobs[sys]}^2}
            \, \sqrt{\frac{1-\dobs[sys]}{1+\dobs[sys]}}.
\end{equation}

\end{document}

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