\chapter{Sensor characteristics}
 \label{sec:sensor}

 \starthistory
 110826 & A simple version by Patrick Eriksson.\\
 \stophistory


A sensor model is needed because a practical instrument gives consistently
spectra deviating from the hypothetical monochromatic pencil beam spectra
provided by the atmospheric part of the forward model. For a radio
(heterodyne) instrument, the most influential sensor parts are the antenna,
the mixer, the sideband filter and the spectrometer. The response (as a
function of frequency, zenith angle \dots) of such instrument parts is here
denoted as the sensor characteristics.

The treatment of sensor variables is introduced in
Section~\ref{sec:fm_defs:sensor1}. As described in that section, the position
and line-of-sight (\builtindoc{sensor\_pos} and \builtindoc{sensor\_los}) are
treated separately, while remaining sensor characteristics are summarised by a
``response matrix'' denoted as \wsvindex{sensor\_response}. This matrix is
applied following Equation~\ref{eq:fm_defs:measseq}. The purpose of this
section is to describe how data on sensor characteristics are inputted to
obtain a \builtindoc{sensor\_response} that matches your particular
instrument.

The implementation follows closely \citet{eriksson:06}. That article provides
also a more careful description of the approach of applying a response matrix,
and the equations used to convert different type of characteristics to
response values. As a user of ARTS, the main practical issue is to understand
the different file formats used for the different sensor parts. For the
moment, this is only described mainly through the on-line documentation.


\section{General}
\label{sec:sensor:general}
%
In principle, a sensor must always be specified. However, if this shall be a
hypothetical sensor just providing the monochromatic pencil beam data coming
out of the atmospheric radiative transfer calculations, use
\wsmindex{sensorOff} (\builtindoc{sensor\_response} is in this case just an
identity matrix).

For other cases, the definition of the sensor characteristics is initiated by
calling \wsmindex{sensor\_responseInit}. The natural order to call the main
functions for the different sensor parts should be to follow the radiation
through the instrument. That is, the antenna should normally be the first part
to consider. If the order can be changed depends on the conditions. For
example, for a double side-band receiver the antenna must be considered before
the mixer, if the antenna response differs between the two bands. If the same
antenna response can be assumed for both bands, the same result is obtained
even if the mixer is introduced before the antenna.

Each response is defined for some grid. All responses are assumed to be zero
outside the range covered by the grid, even if the end values deviate from
zero. A positive aspect of this definition is that it is possible to define true
``rectangular'' responses. This is achieved by setting the end points of the
grid where the response drops to zero.

The sensor parts are normally associated with some loss of power, and sensor
contains also some amplification device. In general, it is not needed to
consider these aspects, as such effects are cancelled out by the calibration
process. The sensor should then be modelled as having no losses, which is
ensured by setting \wsvindex{sensor\_norm} to 1. The different responses are
then normalised in an appropriate manner. With \builtindoc{sensor\_norm} set to
0, all normalisation issues must be handled when defining the response files.


\section{Some comments}

Some text removed from other chapters, to be intgrated into this chapter:

For each sensor position, a number of monochromatic pencil beam
spectra are calculated. The monochromatic frequencies are given by
\builtindoc{f\_grid}. The pencil
beam directions are obtained by summing the sensor line-of-sight
angles (\builtindoc{sensor\_los}) for the position and the values of
\builtindoc{mblock\_dlos\_grid}. For
example, pencil beam zenith angle $i$ is calculated as
\begin{equation}
  \aZntAng{i} = \aZntAng{0} + \Delta\aZntAng{i}
  \label{eq:fm_defs:psi_grid}
\end{equation}
where \aZntAng{0} is the sensor line-of-sight for the position of
concern and $\Delta\aZntAng{i}$ is value $i$ of the first column of
\builtindoc{mblock\_dlos\_grid}.  With other words,
\builtindoc{mblock\_dlos\_grid} gives
the grid (relative to the sensor line-of-sight) for the calculation of
the intensity field that will be weighted with the antenna response.


As the sensor line-of-sight and block grid values are just added,
there is an ambiguity of the line-of-sight. It is possible to apply a
constant off-set to the line-of-sights, if the block grids are
corrected accordingly. For example, if the simulations deal with limb
sounding and a 1D atmosphere, where normally a single block should be
used despite a number of spectra are recorded, it could be practical
to set the line-of-sight to the viewing direction of the uppermost or
lowermost spectrum, and the zenith angles in \builtindoc{mblock\_dlos\_grid}
will not be centred around zero which is the case when the ``true''
line-of-sight is used.




%\section{Antenna}
%\label{sec:sensor:antenna}

%The main function for including an antenna response is
%\wsmindex{sensor\_responseAntenna}, with the antenna characteristics described
%by \wsvindex{antenna\_response}. Other relevant workspace variables are 
%\wsvindex{antenna\_dim} and \wsvindex{antenna\_dlos}. Methods dedicated to set
%up \builtindoc{antenna\_response} are \wsmindex{antenna\_responseGaussian}
%and \wsmindex{AntennaConstantGaussian1D}.

%A real antenna response varies as a function of both zenith and azimuth angle,
%but the azimuth variation is frequently ignored. For 1D and 2D atmosphere there
%is no azimuth angle defined and 