\subsection{SANS Wavelength Calculation}
The instrument SANS has a neutron velocity selector. A wavelength is
selected by varying tilt angle and rotation speed of the velocity selector.
The relation between tilt angle and rotation speed to wavelength is given by
a formula: \begin{eqnarray}
 \lambda & = & A + \frac{B}{rot}\\
 \lambda & = & wavelength in nm\\
 rot & = & rotation speed in revolutions per minute.
\end{eqnarray} 
A and B are coefficients which are calculated from fourth degree polynoms.
The coefficients of these polynoms have been obtained by fitting them
against experimental data. This module now provides for this calculation and
the driving of wavelength. This code does not vary tilt angle.

This object data structure is simple:
\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap1}
$\langle$wavedat {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@   typedef struct __SANSwave {@\\
\mbox{}\verb@                              pObjectDescriptor pDes;@\\
\mbox{}\verb@                              pIDrivable        pDrivInt;@\\
\mbox{}\verb@                              pVelSel           pSelector;@\\
\mbox{}\verb@                             };@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-1ex}
\footnotesize\addtolength{\baselineskip}{-1ex}
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
\item Macro never referenced.
\end{list}
\end{minipage}\\[4ex]
\end{flushleft}
The fields are:
\begin{description}
\item[pDes] The standard SICS object descriptor.
\item[pDrivInt] A standard drivable interface.
\item[pSelector] The velocity selector to act upon.
\end{description}

Most functionality of this module is hidden in the functions comprising the
drivable interface. Thus the external functions of this object are limited
to:

\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap2}
$\langle$sanswaveint {\footnotesize ?}$\rangle\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@  typedef struct __SANSwave *pSANSWave;@\\
\mbox{}\verb@/*-----------------------------------------------------------------------*/@\\
\mbox{}\verb@@\\
\mbox{}\verb@  int CalculateLambda(float fRot, float fTilt, float *fLambda);@\\
\mbox{}\verb@@\\
\mbox{}\verb@  int MakeSANSWave(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
\mbox{}\verb@                   int argc, char *argv[]);@\\
\mbox{}\verb@@\\
\mbox{}\verb@  int SANSWaveAction(SConnection *pCon, SicsInterp *pSics, void *pData,@\\
\mbox{}\verb@                   int argc, char *argv[]);@\\
\mbox{}\verb@@\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-1ex}
\footnotesize\addtolength{\baselineskip}{-1ex}
\begin{list}{}{\setlength{\itemsep}{-\parsep}\setlength{\itemindent}{-\leftmargin}}
\item Macro referenced in scrap ?.
\end{list}
\end{minipage}\\[4ex]
\end{flushleft}
The coefficients for the calculation of A and B are hidden in the module
static function CalculateCoefficients.

\begin{flushleft} \small
\begin{minipage}{\linewidth} \label{scrap3}
\verb@"sanswave.h"@ {\footnotesize ? }$\equiv$
\vspace{-1ex}
\begin{list}{}{} \item
\mbox{}\verb@@\\
\mbox{}\verb@/*---------------------------------------------------------------------------@\\
\mbox{}\verb@                            S A N S W A V E@\\
\mbox{}\verb@@\\
\mbox{}\verb@  Wavelength calculations for a neutron velocity selector.  Allows to drive@\\
\mbox{}\verb@  the neutron wavelength directly.@\\
\mbox{}\verb@@\\
\mbox{}\verb@  copyright: see copyright.h@\\
\mbox{}\verb@@\\
\mbox{}\verb@  Mark Koennecke, October 1998@\\
\mbox{}\verb@---------------------------------------------------------------------------*/@\\
\mbox{}\verb@#ifndef SANSWAVE@\\
\mbox{}\verb@#define SANSWAVE@\\
\mbox{}\verb@@$\langle$sanswaveint {\footnotesize ?}$\rangle$\verb@@\\
\mbox{}\verb@#endif @\\
\mbox{}\verb@@$\diamond$
\end{list}
\vspace{-2ex}
\end{minipage}\\[4ex]
\end{flushleft}
