\subsection{Language}
\index{Language}
\begin{verbatim}

    NEW in v1.2.3 (2014-11-11)
    ==========================

    LISSAJOUS /FOCUS     f1 f2 [... f18] [direction]    ! for NIKA
    LISSAJOUS /POINTING                                 ! for NIKA
    LISSAJOUS /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA

    FOCUS     /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA
    OTFMAP    /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA
    POINTING  /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA

    RECEIVER  BOLOMETER  NIKA         pixel             ! for NIKA






    SUMMARY OF PAKO\ COMMANDS v1.2.3

    Examples how to use HELP:

    for detailed HELP on a command:  HELP OTFMAP
                                     HELP OTFM
    one subtopic or option:          HELP OTFMAP /NOTF
    examples:                        HELP OTFMAP EXAMPLES
    all subtopics and options:       HELP OTFMAP *
    options in general:              HELP OPTIONS
    news about paKo:                 HELP PAKO\ NEWS


    NOTE:  <<TBD     ... >>    (To BE DONE) or
           <<        ... >>    flag items that are planned for the NCS, but
                               not yet implemented or propely tested.
                               Observers should not try to use these features
                               without consulting the NCS team.

       setup:
    SET & SHOW           set general parameters (project, observer, ...)
    CATALOG              select source or line catalogs
    SOURCE               specify a source
    OFFSETS              specify source offsets
    RECEIVER             set up receivers
    BACKEND              set up backends

       switching modes (select 1)
    SWBEAM               select and set up beam switching
    SWFREQUENCY          select and set up frequency switching
    SWTOTAL              select total power (no switching)
    SWWOBBLER            select and set up wobbler switching

       observing modes (select 1)
    CALIBRATE            specify a calibration
    FOCUS                specify a focus measurement
    POINTING             specify a pointing measurement
    TIP                  specify an antenna tipping (a.k.a., "skydip")
    TRACK                specify tracking of a single position, e.g., with SWFRE
    ONOFF                specify on-off (a.k.a, "position switching")
    OTFMAP               specify an On-The-Fly (OTF) map
    LISSAJOUS            specify an On-The-Fly map along a Lissajous curve
    VLBI                 specify tracking of a single position for VLBI

       start:
    START                start an observation, i.e., send it to the queue

       save:
    SAVE                 save parameters to file, i.e., a .pako script




    NEW in v1.2.3 (2014-11-11)
    ==========================

    LISSAJOUS /FOCUS     f1 f2 [... f18] [direction]    ! for NIKA
    LISSAJOUS /POINTING                                 ! for NIKA
    LISSAJOUS /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA

    FOCUS     /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA
    OTFMAP    /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA
    POINTING  /TUNE      xOffsetT     yOffsetT          ! for NIKA
              /TTUNE     tTune                          ! for NIKA

    RECEIVER  BOLOMETER  NIKA         pixel             ! for NIKA


    NEW in v1.1.15:
    ==============

    Support for the upgrade of EMIR band E150 to full 2*2*8 GHz LSB+USB
    in both polarizations, and the E330 local oscillator to higher
    frequencies (2013-09).

    There are NO new commands in v1.1.15


    NEW in 1.1.14:
    ==============

    RECEIVER BOLOMETER NIKA          ! Receiver (bolometer) NIKA

    SUBSCAN xOffset yOffset  /TUNE                    ! for NIKA
    DIY                      /PURPOSE "play my Tune"  ! for NIKA


    NEW in 1.1.12:
    ==============

    RECEIVER BOLOMETER GISMO    ! Receiver (bolometer) GISMO

    LISSAJOUS                   ! Observing Mode Lissajous for GISMO, i.e.,
                                ! an On-The-Fly map along a Lissajous curve


    UPDATED in 1.1.11:
    ==================

    RECEIVER EMIR               ! Receiver EMIR, upgrade of E230 and E330
    BACKEND  FTS                ! Fourier Transform Spectrometer
    BACKEND  BBC                ! Broad Band Continuum Backend

    SET      EMIRcheck          ! limit checking for EMIR
    SET      UserLevel          !


    NEW in v1.1.5:
    =============

    BACKEND BBC                 ! Broad  Band Continuum Backend
    BACKEND NBC                 ! Narrow Band Continuum Backend


    NEW in v1.1.4:
    =============

    BACKEND FTS                 ! Fourier Transform Spectrometer
    SET     EMIRCheck           ! "strict"|"relaxed"|"loose"


    NEW in v1.1.1: SUPPORT FOR EMIR
    ===============================

    --> major changes in

    CALIBRATE
    BACKEND
    RECEIVER



    -----
    NOTE:  <<TBD ... >>    (To BE DONE) or
           <<    ... >>    flag items that are planned for the NCS, but
                           not yet implemented or properly tested.
                           Observers should not try to use these features
                           without consulting the NCS team.




\end{verbatim}
\subsection{BACKEND}
\index{BACKEND}
\begin{verbatim}

    BACKEND  name      nPart resolution bandwidth fShift
                             receiverBand [polarization subband|sideband]

    BACKEND  /CLEAR

    Alternative short syntax (only for the backends shown here!):
    BACKEND  BBC   nPart           /REC receiverBand [polarization sideband]
    BACKEND  NBC   nPart           /REC receiverBand [polarization subband]
    BACKEND  4MHz  nPart           /REC receiverBand [polarization subband]
    BACKEND  WILMA nPart           /REC receiverBand [polarization subband]
    BACKEND  FTS   nPart           /REC receiverBand [polarization subband]
    BACKEND  FTS   nPart /FINE     /REC receiverBand [polarization subband]

    Set up backends for heterodyne receivers.

    Character :: name           ! name of backend
    Integer   :: nPart          ! (logical) number of backend part
    Real      :: resolution     ! [MHz]
    Real      :: bandwidth      ! [MHz]
    Real      :: fShift         ! frequency shift [MHz]
    Character :: receiverBand   ! receiver band      to connect to backend part
    Character :: polarization   ! EMIR: polarization to connect to backend part
    Character :: subband        ! EMIR: subband      to connect to backend part
    Character :: sideband       ! EMIR: sideband     to connect to backend part

    Choices for (backend) name are:
    BBC                         ! Broad  Band Continuum Backend
    NBC                         ! Narrow Band Continuum Backend
    4MHz                        ! filter spectrometers with fixed resolution
    WILMA                       ! autocorrelation spectrometers
    FTS                         ! Fourier Transform Spectrometer
    VESPA                       ! autocorrelator with variable resolution


    Choices for receiverBand are (compare RECEIVER command):
    E090 E150 E230 E330 HERA1 HERA2

    Choices for polarization are (for EMIR; compare RECEIVER command):
    Horizontal Vertical

    Choices for subband   |   sideband, when observing with EMIR, are:
            LO LI UI UO   |   LSB USB
    LSB and USB apply only to EMIR bands with 8 GHz bandwidth (E090, E230,
    and E330) and Backend BBC.

    fShift can be used to shift (offset) the backend band within the
    receiver band; this only applies to some backends, in particular
    VESPA. For VESPA, the range for fShift is much smaller than the 4GHz
    subbands of EMIR. For wide-bandwidth backends, fShift is fixed,
    corresponding to the frequency pattern of the EMIR subbands and
    backend bands. See EMIR and backend documentation.

    /CLEAR completely clears the backend setup.

    If option /CLEAR is present, all other parameters and options are ignored.

    NOTE: EMIR subbands, IF cables, and Backends

    The output signals from EMIR are transmitted to the spectrometers and
    NBC through 8 IF cables. Each IF cable carries one subband of bandwidth
    4 GHz. This subbands are LO, LI, UI, or UO.

    NBC, 4MHz, WILMA, and VESPA can only(!) be connected to IF cables 1 to 4.
    FTS parts 1 to 4 can also be connected to IF cables 1 to 4.

    The command options RECEIVER /HORIZONTAL and RECEIVER /VERTICAL allow
    to select up to 4 EMIR subbands that will be transmitted through IF
    cables 1 to 4 (compare HELP RECEIVER /HORIZONTAL and the EMIR user
    documentation). This selection can include Outer subbands.

    In addition, the IF cables 5 to 8 carry the 4 Outer subbands
    corresponding to the subbands selected for IF cables 1 to 4. E.g., if
    we select for IF 1 to 4:
    E230 ver UO    E090 ver UI    E230 hor UI   E090 hor UI
    then the IF cables 5 to 8 will transmit:
    E230 ver UO    E090 ver UO    E230 hor UO   E090 hor UO.

    Only FTS parts 5 to 8 can be connected to IF cables 5 to 8.

    BACKEND NBC|WILMA|FTS /DEFAULT will automatically set the maximum
    number of backend parts for all available subbands.

    BACKEND BBC is completely independant of the sub band selections for
    the IF cables.

    NOTES:
    - for some backends the resolution and/or bandwidth are fixed and the
      short syntax can be used. (The full syntax is supported for all backends).
    - for VESPA always use the full syntax!
    - after changing the receiver configuration: BACKEND /CLEAR is recommended
      followed by the backend setup for the new receivers; without that it is
      possible that pako will not accept BACKEND commands because of unresolved
      conflicts between the RECEIVER and BACKEND setups.
    - However, the backend command will automatically try to disconnect
      backends that were connected to receiver (sub)bands that are not
      connected anymore.



\end{verbatim}
\subsubsection{BACKEND BBC}
\index{BACKEND!BBC}
\begin{verbatim}

    BBC                         ! Broad  Band Continuum Backend

    BBC works only with the EMIR receiver.  One part of BBC always covers
    the full 8 GHz bandwidth of each sideband of each polarization of each
    EMIR band selected with the RECEIVER command.

    Band  Sidebands      IF      Width  Polariz.  # BBC parts
                         [GHz]   [GHz]            -----------

    E090  LSB and USB    4--12    8     H and V       4
    E150  LSB and USB    4--12    8     H and V       4
    E230  LSB and USB    4--12    8     H and V       4
    E330  LSB and USB    4--12    8     H and V       4

    Shortcut: after selecting EMIR bands and subbands, BACKEND BBC
    /DEFAULT automatically sets all this appropriately!



\end{verbatim}
\subsubsection{BACKEND FTS}
\index{BACKEND!FTS}
\begin{verbatim}

    FTS                         ! Fourier Transform Spectrometer

    The FTS supports two modes:
     -  wide bandwidth, up to ~ 4000 MHz on EMIR (~ 1000 MHz on HERA),
        with a resolution of ~ 0.195 [MHz], or
     -  fine resolution, ~ 0.049 MHz,
        with a bandwidth up to 1820 MHz on EMIR (~ 500 MHz on HERA)

    All parts of the FTS must use the same resolution.

    NOTE: EMIR subbands, IF cables, and Backends

    The output signals from EMIR are transmitted to the spectrometers and
    NBC through 8 IF cables. Each IF cable carries one subband of bandwidth
    4 GHz. This subbands are LO, LI, UI, or UO.

    NBC, 4MHz, WILMA, and VESPA can only(!) be connected to IF cables 1 to 4.
    FTS parts 1 to 4 can also be connected to IF cables 1 to 4.

    The command options RECEIVER /HORIZONTAL and RECEIVER /VERTICAL allow
    to select up to 4 EMIR subbands that will be transmitted through IF
    cables 1 to 4 (compare HELP RECEIVER /HORIZONTAL and the EMIR user
    documentation). This selection can include Outer subbands.

    In addition, the IF cables 5 to 8 carry the 4 Outer subbands
    corresponding to the subbands selected for IF cables 1 to 4. E.g., if
    we select for IF 1 to 4:
    E230 ver UO    E090 ver UI    E230 hor UI   E090 hor UI
    then the IF cables 5 to 8 will transmit:
    E230 ver UO    E090 ver UO    E230 hor UO   E090 hor UO.

    Only FTS parts 5 to 8 can be connected to IF cables 5 to 8.

    BACKEND NBC|WILMA|FTS /DEFAULT will automatically set the maximum
    number of backend parts for all available subbands.

    BACKEND BBC is completely independant of the sub band selections for
    the IF cables.


    NOTE: bandwidth selection with EMIR

    The pako command already allows some flexibility that is not yet fully
    supported by the data handling, e.g., to select only part of the full
    bandwidth.


    NOTE: FTS on HERA

    With HERA, the FTS can be connected to HERA1 and/or HERA2.

    On HERA, the FTS provides some extra bandwidth, which is not
    symmetrical to the point where the line (the commanded frequency) gets
    centered.

    With HERA /width wide, the line gets centered at the center of WILMA
    and 4MHz.  Relative to this point, the FTS in wide mode covers IF
    offset frequencies from < -512 to > +512. In pako the nominal value of
    the bandwidth is 1024, symmetric around the line.

    With HERA /width narrow, the line gets centered at the center of
    VESPA.  Relative to this point, the FTS in fine mode covers IF offset
    frequencies from < -256 to > +360. In pako the nominal value of the
    bandwidth is 512, symmetric around the line.

    It is also possible to connect FTS in fine mode on HERA /width wide or
    FTS in wide mode on HERA /width narrow.  However, in these cases the
    FTS band coverages are very asymmetric to the line. (See HERA and FTS
    documentation for the exact details of the IF ranges).




\end{verbatim}
\subsubsection{BACKEND /DEFAULTS}
\index{BACKEND!/DEFAULTS}
\begin{verbatim}

    /DEFAULTS  [yes|no]

    Set default values.

    If EMIR sub bands have been selected with the RECEIVER command,
    this option has a special function for some Backends:

    BACKEND BBC       /Defaults     connects one BBC  part to each
                                    sideband (!) of each selected EMIR band
                                    (up to 8)

    BACKEND NBC       /Defaults     connects one NBC  part to each
                                    selected EMIR sub band (up to 4)

    BACKEND 4MHZ      /Defaults     connects one 4MHz part to each of
                                    the 1st and 2nd selected EMIR sub band

    BACKEND WILMA     /Defaults     connects one WILMA part to each
                                    selected EMIR sub band (up to 4)

    BACKEND FTS       /Defaults     connects one FTS part in "wide" bandwidth
                                    to each EMIR sub band (up to 4) selected
                                    for IF cables 1 to 4, and additionally
                                    one part to each of the available Outer
                                    subbands (up to 4) on IF cables 5 to 8

    BACKEND FTS /Fine /Defaults     connects one FTS part in "fine" resolution
                                    to each EMIR sub band (up to 4) selected
                                    for IF cables 1 to 4, and additionally
                                    one part to each of the available Outer
                                    subbands (up to 4) on IF cables 5 to 8

\end{verbatim}
\subsubsection{BACKEND /CLEAR}
\index{BACKEND!/CLEAR}
\begin{verbatim}
    /CLEAR  [yes|no]

    Completely clear a list of connected hardware, e.g., receivers, backends,
    or parameters of the associated command.



    After changing the receiver configuration: BACKEND /CLEAR is recommended
    followed by the backend setup for the new receivers; without that it is
    possible that pako will not accept BACKEND commands because of unresolved
    conflicts between the RECEIVER and BACKEND setups.

\end{verbatim}
\subsubsection{BACKEND /CONNECT}
\index{BACKEND!/CONNECT}
\begin{verbatim}

    /CONNECT [yes|no]

    connect (or disconnect) the specified hardware, e.g.,
    backend or backend part.

    --> DEPRECATED. PROTECTED (needs SET userLevel)

\end{verbatim}
\subsubsection{BACKEND /DISCONNECT}
\index{BACKEND!/DISCONNECT}
\begin{verbatim}

    /DISCONNECT

    disconnect the specified hardware, e.g.,
    backend or backend part.

    -->  DEPRECATED. PROTECTED (needs SET userLevel)

\end{verbatim}
\subsubsection{BACKEND /FINE}
\index{BACKEND!/FINE}
\begin{verbatim}

    /FINE

    for BACKEND FTS select the "fine" mode with a resolution of ~ 0.049 [MHz]

    Note: with the option /DEFAULT or the short syntax, this allows to
    select the fine resolution without explicitly entering the values of
    resolution and bandwidth.



\end{verbatim}
\subsubsection{BACKEND /MODE}
\index{BACKEND!/MODE}
\begin{verbatim}

    /MODE mode

    Character :: mode                ! backend mode

    Choices for mode are:
    SIMPLE                           ! simple (standard)
    PARALLEL                         ! parallel mode
    POLARIZATION                     ! polarimetry

    Select special mode for VESPA.
    See VESPA user's guide for details.

    For EMIR, /MODE PARALLEL or /MODE POLARIZATION connect VESPA
    to the same band and subband in both polarizations; they must
    previously have been selected with the RECEIVER command. For
    exmples, see:
    HELP BACKEND Examples


\end{verbatim}
\subsubsection{BACKEND /LINENAME}
\index{BACKEND!/LINENAME}
\begin{verbatim}


    /LINENAME lineName

    Character :: lineName          ! name of line. don't use @ < >

    --> OPTION OF BACKEND COMMAND FOR USE WITH EMIR

    This allows to set a "line" name for each backend part.

    If a line name is set for a backend part, it will be used in the CLASS
    header of the spectrum from that backend part.

    If no line name is set for a backend part (default), the line name
    from the corresponding RECEIVER band will be used in the CLASS header.

    This is an optional convenience feature to make it easier to identify
    spectra by appropriate names, in particular in cases where several
    different lines are observed simultaneously with the same receiver
    band.

    This is only a name or label, and has no influence on any frequencies
    or other control parameters.

\end{verbatim}
\subsubsection{BACKEND /PERCENTAGE}
\index{BACKEND!/PERCENTAGE}
\begin{verbatim}

    /PERCENTAGE percentage

    Real :: percentage  !  percentage of bandwidth to use

    This is a special option for the autocorrelators, VESPA and WILMA.

    For autocorrelators normally some channels at both ends of the band
    are blanked because they do not contain usable data, and only the
    central 'percentage' of the "theoretical" bandwidth is used, typically
    about 90%.  Reasonable conservative defaults are automatically
    applied: in general 90%, but 82% for VESPA with bandwidth 640.  This
    option allows the observer to adjust the percentage for special
    purposes.

    For WILMA connected to EMIR, the useful bandwidth is 3720 MHz,
    and counted as 100%.

    See VESPA user's guide for details.


\end{verbatim}
\subsubsection{BACKEND /RECEIVER}
\index{BACKEND!/RECEIVER}
\begin{verbatim}
    /RECEIVER receiverBand [polarization subband|sideband]

    Character :: receiverBand   ! receiver band      to connect to backend part
    Character :: polarization   ! EMIR: polarization to connect to backend part
    Character :: subband        ! EMIR: subband      to connect to backend part
    Character :: sideband       ! EMIR: sideband     to connect to backend part

    Choices for receiverBand are (compare RECEIVER command):
    E090 E150 E230 E330 HERA1 HERA2

    Choices for polarization are (for EMIR; compare RECEIVER command):
    Horizontal Vertical

    Choices for subband   |   sideband, when observing with EMIR, are:
            LO LI UI UO   |   LSB USB
    LSB and USB apply only to EMIR bands with 8 GHz bandwidth (E090, E230,
    and E330) and Backend BBC.

\end{verbatim}
\subsubsection{BACKEND EXAMPLES}
\index{BACKEND!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-backend.pako
    !     basic BACKEND EXAMPLES,v 1.1.11 2011-11-24 Hans Ungerechts
    !
    swTotal /default                              ! select a switching mode
    !                                             ! compatible with all backends
    !
    !   one example of a complex EMIR setup:
    !
    ! pako\RECEIVER
    pako\RECEIVER /clear
    !
    RECEIVER E090 CS(2-1) 97.980965 LI  -
     /horizontal  LI                    -
     /vertical    LI
    !
    RECEIVER E230 CO(2-1) 230.537994 LI -
     /horizontal  LI                    -
     /vertical    LI
    !
    !
    BACKEND /CLEAR                                ! clear all backend setups
    !
    !                                             ! EMIR BBC
    BACKEND BBC        /Default                   ! connect 1 part
    !                                             ! to both polarizations
    !                                             ! of each sideband
    !                                             ! of each selected EMIR band
    pause
    !
    !                                             ! EMIR NBC
    backend /clear
    BACKEND NBC        /Default                   ! connect 1 part to
    !                                             ! each selected EMIR subband
    pause
    !
    !                                             ! EMIR WILMA
    backend /clear
    BACKEND WILMA      /Default                   ! connect 1 part to
    !                                             ! each selected EMIR subband
    pause
    !
    !
    !                                             ! EMIR 4MHz
    !                                             ! NOTE: 4MHz has only 2
    !                                             !       parts with EMIR
    backend /clear
    BACKEND 4MHz       /Default                   ! connect 1 part to each of
    !                                             ! the first 2 EMIR subbands
    pause
    !
    BACKEND 4MHZ 1    /Receiver E090 Horiz LI     ! connect 1 part to E090 Ho LI
    BACKEND 4MHZ 2    /Receiver E230 Verti LI     !       2nd part to E230 Ve LI
    pause
    !
    !                                             ! EMIR FTS wide bandwidth mode
    !                                             !    /Fine is NOT present
    backend /clear
    BACKEND FTS        /Default                   ! connect 1 part to
    !                                             ! each selected EMIR subband
    !                                             ! plus 1 part to each of the
    !                                             ! 4 outer subbands of E090
    pause
    !
    backend /clear
    !                                             ! short syntax (still wide)
    BACKEND FTS 1        /Receiver E090 hor LI    !
    BACKEND FTS 2        /Receiver E090 ver LI    !
    BACKEND FTS 3        /Receiver E230 hor LI    !
    BACKEND FTS 4        /Receiver E230 ver LI    !
    BACKEND FTS 5        /Receiver E090 ver LO    !
    BACKEND FTS 6        /Receiver E230 ver LO    !
    BACKEND FTS 7        /Receiver E090 hor LO    !
    BACKEND FTS 8        /Receiver E230 hor LO    !
    !                                             !
    pause
    !
    !                                             ! EMIR FTS fine resolution
    !                                             !   because /Fine is present
    backend /clear
    BACKEND FTS   /Fine  /Default                 ! connect 1 part to
    !                                             ! each selected EMIR subband
    !                                             ! plus 1 part to each of
    !                                             ! the 4 outer subbands of E090
    pause
    !
    backend /clear
    !                                             ! short syntax (fine)
    BACKEND FTS 1 /Fine  /Receiver E090 hor LI    !
    BACKEND FTS 2 /Fine  /Receiver E090 ver LI    !
    BACKEND FTS 3 /Fine  /Receiver E230 hor LI    !
    BACKEND FTS 4 /Fine  /Receiver E230 ver LI    !
    BACKEND FTS 5 /Fine  /Receiver E090 ver LO    !
    BACKEND FTS 6 /Fine  /Receiver E230 ver LO    !
    BACKEND FTS 7 /Fine  /Receiver E090 hor LO    !
    BACKEND FTS 8 /Fine  /Receiver E230 hor LO    !
    !                                             !
    pause
    !
    !
    !                                             ! EMIR WILMA + 4MHz + VESPA
    backend /clear
    BACKEND WILMA      /Default                   !
    BACKEND 4MHz       /Default                   !
    BACKEND VESPA  1   0.040   40.0    0.0   E090  Horiz  LI
    BACKEND VESPA  2   0.040   40.0    0.0   E090  Verti  LI
    BACKEND VESPA  3   0.040   40.0    0.0   E230  Horiz  LI
    BACKEND VESPA  4   0.040   40.0    0.0   E230  Verti  LI
    say                                         " ! backends can be combined"
    pause
    !
    !
    !! EMIR VESPA autocorrelator -- basic mode with fShift. optional: line name
    !
    backend /clear
    BACKEND VESPA  1   0.040   40.0  -120.0  E090  Horiz  LI /line E0HUO-M
    BACKEND VESPA  2   0.040   40.0   120.0  E090  Horiz  LI /line E0HUO-P
    BACKEND VESPA  3   0.040   40.0  -100.0  E090  Verti  LI /line myLine3
    BACKEND VESPA  4   0.040   40.0   110.0  E090  Verti  LI /line myLine4
    BACKEND VESPA  5   0.040   80.0  -150.0  E230  Horiz  LI /line ""
    BACKEND VESPA  6   0.040   80.0   150.0  E230  Horiz  LI /line apple
    BACKEND VESPA  7   0.040   80.0  -200.0  E230  Verti  LI /line orange
    BACKEND VESPA  8   0.040   80.0   200.0  E230  Verti  LI /line red
    pause
    !
    !! EMIR VESPA autocorrelator -- basic and parallel modes
    !
    backend /clear
    BACKEND VESPA  1   0.320  240.0    0.0   E090  Horiz  LI
    BACKEND VESPA  2   0.320  240.0    0.0   E090  Verti  LI
    BACKEND VESPA  3   0.320  240.0    0.0   E230  Horiz  LI /mode parallel
    pause
    !
    !! NOTE: BACKEND VESPA ... E230 Horiz LI /mode parallel
    !!       connects one VESPA part in parallel to
    !!       E230 Horiz LI and E230 Verti LI
    !!       (both must be selected in RECEIVER command)
    !
    !
    !! HERA with FTS wide bandwidth
    !
    receiver /clear
    RECEIVER HERA1 /WIDTH wide
    RECEIVER HERA2 /WIDTH wide
    !
    backend /clear
    BACKEND FTS 1           /RECEIVER HERA1
    BACKEND FTS 2           /RECEIVER HERA2
    !
    !
    !! HERA narrow bandwidth with FTS fine resolution
    !
    receiver /clear
    RECEIVER HERA1 /WIDTH narrow
    RECEIVER HERA2 /WIDTH narrow
    !
    backend /clear
    BACKEND FTS 1   /FINE   /RECEIVER HERA1
    BACKEND FTS 2   /FINE   /RECEIVER HERA2
    !


\end{verbatim}
\subsection{CALIBRATE}
\index{CALIBRATE}
\begin{verbatim}


    CALIBRATE (no parameters)

    Specify a calibration measurement with the heterodyne receivers,
    normally with subscans "SAC": Sky -- Ambient temperature load -- Cold load

    NOTE: CALIBRATE is always and automatically done with switching mode "total
    and the time per phase is adjusted to be in the range 0.1 to 0.5 [sec]

    /SKY xOffsetC yOffsetC
    or
    /SKY NO                        ! do not do sky calibration

    Do a calibration subscan on sky.

    Real      :: xOffsetC          ! x-offset
    Real      :: yOffsetC          ! y-offset

    NOTES: with the usage /SKY xOffsetC yOffsetC, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.
    The system for the offsets is selected through the option /SYSTEM.


\end{verbatim}
\subsubsection{CALIBRATE /DEFAULTS}
\index{CALIBRATE!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{CALIBRATE /AMBIENT}
\index{CALIBRATE!/AMBIENT}
\begin{verbatim}
    /AMBIENT [yes|no]

    Do a calibration subscan on the ambient temperature load.

    Logical   :: doAmbient        ! default: true

\end{verbatim}
\subsubsection{CALIBRATE /COLD}
\index{CALIBRATE!/COLD}
\begin{verbatim}
    /COLD [yes|no]

    Do a calibration subscan on the cold temperature load.

    Logical   :: doCold           ! default: true

\end{verbatim}
\subsubsection{CALIBRATE /GAINIMAGE}
\index{CALIBRATE!/GAINIMAGE}
\begin{verbatim}


     --> NOTE: OBSOLETE WITH CHANGE TO EMIR


\end{verbatim}
\subsubsection{CALIBRATE /GRID}
\index{CALIBRATE!/GRID}
\begin{verbatim}

    /GRID [yes|no]

    NOT YET AVAILABLE FOR EMIR

    Do a calibration subscan on a grid.  This is a special calibration
    option for polarization observations.

    Logical   :: doGrid           ! default: true

    IMPORTANT NOTE:
    remember to turn this option off again for normal calibrations:
    e.g., CALIBRATE /GRID NO or CALIBRATE /DEFAULT.


\end{verbatim}
\subsubsection{CALIBRATE /SKY}
\index{CALIBRATE!/SKY}
\begin{verbatim}
    /SKY xOffsetC yOffsetC
    or
    /SKY NO                        ! do not do sky calibration

    Do a calibration subscan on sky.

    Real      :: xOffsetC          ! x-offset
    Real      :: yOffsetC          ! y-offset

    NOTES: with the usage /SKY xOffsetC yOffsetC, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.
    The system for the offsets is selected through the option /SYSTEM.

\end{verbatim}
\subsubsection{CALIBRATE /SYSTEM}
\index{CALIBRATE!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{CALIBRATE /TCALIBRATE}
\index{CALIBRATE!/TCALIBRATE}
\begin{verbatim}
    /TCALIBRATE tCalibrate

    Time per CALIBRATE subscan.

    Real       :: tCalibrate       ! time





\end{verbatim}
\subsection{CATALOG}
\index{CATALOG}
\begin{verbatim}


    CATALOG [SOURCE|LINE] fileName

    Select a source or line catalog.

    Character :: kind              ! SOURCE or LINE
    Character :: fileName          ! file name

    Selects a file with name fileName as source or line catalog.


    Source Catalog:

    The format of a line in the source catalog is the same as
    that of the parameters of the SOURCE command, without the
    keyword "SOURCE" and without any options (see HELP SOURCE). Example:

    W3OH EQ 2000 02:27:03.8812  +61:52:24.572  LSR -45.0 [FLUX 3.73 1.00]

    IMPORTANT NOTE:
    sourceName is limited to 12 characters.


    Line Catalog:

    The format of a line in the line catalog is same as that of the
    2nd, 3rd, and 4th parameter of the RECEIVER command:

    lineName        frequency       SB

    with frequency in unit [GHz] (see HELP RECEIVER).
    Example:

    12CO(1-0)       115.271204      UI      (for EMIR)
    12CO(2-1)       230.537990      LI      (for EMIR)
    12CO(2-1)       230.537990      LSB     (for HERA)

    IMPORTANT NOTE:
    lineName is limited to 12 characters.

    NB: Don't use / & < > in names of sources, lines, projects,
    PI, observer, operator, etc. Don't use ()/ in source names.


\end{verbatim}
\subsubsection{CATALOG SOURCE}
\index{CATALOG!SOURCE}
\begin{verbatim}

    Source Catalog:

    The format of a line in the source catalog is the same as
    that of the parameters of the SOURCE command, without the
    keyword "SOURCE" and without any options (see HELP SOURCE). Example:

    W3OH EQ 2000 02:27:03.8812  +61:52:24.572  LSR -45.0 [FLUX 3.73 1.00]

    IMPORTANT NOTE:
    sourceName is limited to 12 characters.


\end{verbatim}
\subsubsection{CATALOG LINE}
\index{CATALOG!LINE}
\begin{verbatim}

    Line Catalog:

    The format of a line in the line catalog is same as that of the
    2nd, 3rd, and 4th parameter of the RECEIVER command:

    lineName        frequency       SB

    with frequency in unit [GHz] (see HELP RECEIVER).
    Example:

    12CO(1-0)       115.271204      UI      (for EMIR)
    12CO(2-1)       230.537990      LI      (for EMIR)
    12CO(2-1)       230.537990      LSB     (for HERA)

    IMPORTANT NOTE:
    lineName is limited to 12 characters.



\end{verbatim}
\subsection{DISPLAY}
\index{DISPLAY}
\begin{verbatim}


    DISPLAY REDO

    Redo (refresh) the text in the display window.



\end{verbatim}
\subsection{DIYLIST}
\index{DIYLIST}
\begin{verbatim}

    DIYLIST

    User-defined list of subscans and segments for observing mode "DIY";
    to define subscans, see HELP SUBSCAN.

    NB: this is a protected command (needs privilege).

    DIYLIST without any parameters or options:

      - lists defined subscans and segments in the pako window
        (this requires SET LEVEL 2 or lower)
      - in the pakoDisplay shows conditions, e.g., maximum possible elevation
      - plots defined subscans and segments (depending on SET plotStyle)

\end{verbatim}
\subsubsection{DIYLIST /CLEAR}
\index{DIYLIST!/CLEAR}
\begin{verbatim}

    /CLEAR  [yes|no]

    Completely clear the used-defined list of subscans and segments DIY.



\end{verbatim}
\subsubsection{DIYLIST /PURPOSE}
\index{DIYLIST!/PURPOSE}
\begin{verbatim}
    /PURPOSE purpose

    Set a purpose for a scan, i.e., an intended use of the data.
    The applies in particular to DIYLIST.

    Character :: purpose             !

    NOTE: /PURPOSE by itself or
          /DIY     clears the purpose.

    NOTE: at this time (2012-11-08) this is only for information,
    and included in the XML, but it has no practical effect.



\end{verbatim}
\subsection{FOCUS}
\index{FOCUS}
\begin{verbatim}


    FOCUS lengthFocus

    Specify a focus measurement.

    Real      :: lengthFocus       ! length [mm] of focus scan


    The sequence of focus subscans is determined by
    lengthFocus /nSubscans /otfFocus:

     lengthFocus     ! total length [mm] of the focus scan
     /nSubscans      ! number of focus subscans
     << TD:/otfFocus       ! not yet implemented>>

     focus subscan 1 is at offset  0.0
     focus subscan 2 is at offset  lengthFocus/2
     in case /nSubscans 3:
     focus subscan 3 is at offset -lengthFocus/2
     in case /nSubscans >3:
     focus subscan 3 is at offset  lengthFocus/2
     focus subscan 4 is at offset -lengthFocus/2
     focus subscan 5 is at offset -lengthFocus/2
     focus subscan 6 is at offset  0.0
     (etc.)



\end{verbatim}
\subsubsection{FOCUS /DEFAULTS}
\index{FOCUS!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{FOCUS /NSUBSCANS}
\index{FOCUS!/NSUBSCANS}
\begin{verbatim}
    /NSUBSCANS nSubscans

    Integer   :: nSubscans         ! number of subscans

\end{verbatim}
\subsubsection{FOCUS /TSUBSCAN}
\index{FOCUS!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time

\end{verbatim}
\subsubsection{FOCUS /TUNE}
\index{FOCUS!/TUNE}
\begin{verbatim}
    /TUNE xOffsetT yOffsetT
    or
    /TUNE NO                  ! no tune subscan

    Tune subscan at the specified offsets, before any other subscans.

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan

    NOTE: with the usage /TUNE xOffsetT yOffsetT, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.

    For FOCUS, the offsets for the tune subscan are in the
    "trueHorizontal" system.

\end{verbatim}
\subsubsection{FOCUS /TTUNE}
\index{FOCUS!/TTUNE}
\begin{verbatim}
    /TTUNE tTune

    time per TUNE subscan

    Real       :: tTune             ! time


\end{verbatim}
\subsubsection{FOCUS EXAMPLES}
\index{FOCUS!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-focus.pako
    !     FOCUS EXAMPLE,v 1.1.1 2009-05-08 Hans Ungerechts
    !
    SWBEAM                                      !  to select beam switching
    !
    FOCUS            2.0                      - !  length [mm]
      /NSUBSCANS     6                        - !  number of subscans
      /TSUBSCAN     12                          !  time per subscan
    !
    PAUSE "FOCUS OK to start? [c/q]"            !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! We assume here that a pointing measurement has been done
    !! immediately before the FOCUS (strongly recommended!),
    !! see: demo-pointing, and therefore
    !! we assume here that source, receivers, and backends
    !! already have been selected and set up.
    !! If you want the intensity of the Focus data to be
    !! calibrated, you have to do a Calibrate with the same
    !! receivers and (continuum) backends before.


\end{verbatim}
\subsection{LISSAJOUS}
\index{LISSAJOUS}
\begin{verbatim}


    LISSAJOUS    xAmplitude   yAmplitude
      /CENTER    xCenter      yCenter
      /FREQUENCY frequencyX   frequencyY
      /PHASES    phiX         phiY
      /TOTF      tOtf
      /SYSTEM    system

    additionally for NIKA:

      /FOCUS     f1 f2 [... f18] [direction]
      /POINTING  [yes|no]
      /TUNE      xOffsetT     yOffsetT
      /TTUNE     tTune

    Specify an On-The-Fly (OTF) map with a Lissajous curve in 1 subscan.
    LISSAJOUS is at this time (2014-11-10) supported only for GISMO and NIKA

    Real      :: xAmplitude        ! amplitude for x-offsets
    Real      :: yAmplitude        ! amplitude for y-offsets
    Real      :: xCenter           ! center x-offset
    Real      :: yCenter           ! center y-offset
    Real      :: frequencyX        ! frequency    [Hz]  for x
    Real      :: frequencyY        ! frequency    [Hz]  for y
    Real      :: phiX              ! phase offset [rad] for x
    Real      :: phiY              ! phase offset [rad] for y

    Real      :: tOtf              ! time [s]
    Character :: systemName        ! name of system, one of:
                                   ! PROJECTION
                                   ! TRUEHORIZON

    Real      :: f1 f2 [... f18]   ! focus offset [mm] during each Lissajous cur
    Character :: direction         ! direction of focus offsets, one of:
                                   ! X
                                   ! Y
                                   ! Z

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan
    Real      :: tTune             ! time [s] for tune subscan


    During a Lissajous OTF segment, the position offsets
    x and y as a function of time t are:

    x = xCenter + xAmplitude * SIN(2 Pi frequencyX t + phiX)
    y = yCenter + yAmplitude * SIN(2 Pi frequencyY t + phiY)

    SIN is the usual sine function, Pi is the number Pi.

    xAmplitude yAmplitude xCenter yCenter are in angle units ([arc sec])
    frequencyX frequencyY                 are in [Hz]
    phiX       phiY                       are in [rad]

    Note that the possible frequencies are very low,
    typically 0.01 to 0.15 Hz.

    At the start of a Lissajous subscan, paKo will insert a "ramp" along a
    straight line, i.e., a linear OTF segment, increasing the count of
    segments by 2.  This ramp up starts with speed 0 relative to the
    source and joins smoothly with the start position and velocity of the
    Lissajous segment.  The purpose is to avoid a sudden acceleration at
    the start of the Lissajous segment.  The inserted ramp up
    segment and the Lissajous segment become part of the same subscan.

    Lissajous curves with large amplitudes or frequencies can reach the
    antenna's speed and acceleration limits for tracking.  Lissajous
    curves can be executed only for elevations less than a maximum, which
    depends on the Lissajous parameters.  For information, this elevation
    condition is shown by pako. Even below the limits, during very fast
    Lissajous curves the tracking errors will be higher, several arc sec,
    than during most other observations.

    DO NOT TRY TO OBSERVE LISSAJOUS ABOVE THIS MAXIMUM ELEVATION.

\end{verbatim}
\subsubsection{LISSAJOUS /CENTER}
\index{LISSAJOUS!/CENTER}
\begin{verbatim}
    /CENTER    xCenter      yCenter

    position of center

    Real      :: xCenter           ! center x-offset
    Real      :: yCenter           ! center y-offset

\end{verbatim}
\subsubsection{LISSAJOUS /FREQUENCY}
\index{LISSAJOUS!/FREQUENCY}
\begin{verbatim}
    /FREQUENCY frequencyX   frequencyY

    Real      :: frequencyX        ! frequency    [Hz]  for x
    Real      :: frequencyY        ! frequency    [Hz]  for y

\end{verbatim}
\subsubsection{LISSAJOUS /PHASES}
\index{LISSAJOUS!/PHASES}
\begin{verbatim}
    /PHASES    phiX         phiY

    Real      :: phiX              ! phase offset [rad] for x
    Real      :: phiY              ! phase offset [rad] for y

\end{verbatim}
\subsubsection{LISSAJOUS /SYSTEM}
\index{LISSAJOUS!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{LISSAJOUS /TOTF}
\index{LISSAJOUS!/TOTF}
\begin{verbatim}
    /TOTF tOtf

    time per OTF subscan or segment

    Real       :: tOtf             ! time

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{LISSAJOUS /FOCUS}
\index{LISSAJOUS!/FOCUS}
\begin{verbatim}
    /FOCUS f1 f2 [... f18] [direction]
    or
    /FOCUS NO

    [For Lissajous] designate the purpose of the scan to be "Focus", i.e.,
    to determine focus corrections.  A subscan with a Lissajous curve will
    be executed for each focus offset specified.

    Real      :: f1 f2 [... f18]   ! focus offsets [mm]
                                   ! (at least 2, at most 18 values)
    Character :: direction         ! direction of focus offsets, one of:
                                   ! X
                                   ! Y
                                   ! Z

    /FOCUS NO clears the option /FOCUS.
\end{verbatim}
\subsubsection{LISSAJOUS /POINTING}
\index{LISSAJOUS!/POINTING}
\begin{verbatim}
    /POINTING [YES|NO]

    Logical   :: doPointing      ! default: no

    [For Lissajous] designate the purpose of the scan to be "Pointing",
    i.e., to determine pointing corrections.

    /POINTING NO clears the option /POINTING.
\end{verbatim}
\subsubsection{LISSAJOUS /TUNE}
\index{LISSAJOUS!/TUNE}
\begin{verbatim}
    /TUNE xOffsetT yOffsetT
    or
    /TUNE NO                  ! no tune subscan

    Tune subscan at the specified offsets, before any other subscans.

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan

    NOTE: with the usage /TUNE xOffsetT yOffsetT, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.

    The offsets for the tune subscan are in the system selected with /SYSTEM.

\end{verbatim}
\subsubsection{LISSAJOUS /TTUNE}
\index{LISSAJOUS!/TTUNE}
\begin{verbatim}
    /TTUNE tTune

    time per TUNE subscan

    Real       :: tTune             ! time


\end{verbatim}
\subsection{OFFSETS}
\index{OFFSETS}
\begin{verbatim}


    OFFSETS xOffset yOffset

    Specify source offsets.

    Real      :: xOffset           ! x-offset
    Real      :: yOffset           ! y-offset

    IMPORTANT NOTE: one should be careful with the OFFSETS command, which
    is only used and only needed in a few special situations, e.g., with
    Wobbler-switching ONOFF and to set NASMYTH offsets for
    focal-plane-array receivers.  The function of OFFSETS is explained in
    the paKo user's manual, Section "A Guide to the Perplexed" and, in
    more detail, in the Section "NCS Explained", Subsection "Coordinate
    Systems, Projections, and Offsets."

    For many observations all "offsets" are specified as parameters or
    options of the command for the observing mode.

    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).


\end{verbatim}
\subsubsection{OFFSETS /DEFAULTS}
\index{OFFSETS!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{OFFSETS /CLEAR}
\index{OFFSETS!/CLEAR}
\begin{verbatim}
    /CLEAR  [yes|no]

    Completely clear a list of connected hardware, e.g., receivers, backends,
    or parameters of the associated command.


\end{verbatim}
\subsubsection{OFFSETS /SYSTEM}
\index{OFFSETS!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).



\end{verbatim}
\subsection{ONOFF}
\index{ONOFF}
\begin{verbatim}


    ONOFF xOffset yOffset

    Specify on-off measurement, a.k.a. "position switching".

    Real      :: xOffset           ! x-offset of "on-source" position
    Real      :: yOffset           ! y-offset of "on-source" position

    Character :: sourceName        ! name of "on-source" position

    NOTE: if SWWOBBLER is the selected switching mode, the special option
    /SWWOBBLER YES (TRUE) is implied even without specifying it, and the
    on-off parameters appropriate for on-off Wobbler switching are set.


    If SWWOBBLER and ONOFF are combined in the standard way, we
    effectively take data at 3 positions:

    1. the source position
    2. the source position + throw  (offset in the "true-angle" horizontal syste
    3. the source position - throw  (offset in the "true-angle" horizontal syste

    with throw = ABS(wOffset2-wOffset1).

    Data from 1. are treated as source signal, data from 2 and 3 as
    off-source reference signal.  Note that in the astronomical
    coordinates, positions 2 and 3 will rotate around the source position
    (1).  Therefore one must normally be sure that the extent of the source
    is less than throw-beamWidth (/2).


    /REFERENCE xOffsetR yOffsetR [systemNameRef]
    or
    /REFERENCE NO                  ! no reference

    position of off-source reference subscans

    Real      :: xOffsetR          ! x-offset
    Real      :: yOffsetR          ! y-offset
    Character :: systemNameRef     ! name of system
                                   ! see /SYSTEM for choices

    NOTE: with the usage /REFERENCE xOffsetR yOffsetR, both parameters are requi
    but you can replace either parameter with * to leave it unchanged.

    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).


\end{verbatim}
\subsubsection{ONOFF /DEFAULTS}
\index{ONOFF!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{ONOFF /NSUBSCANS}
\index{ONOFF!/NSUBSCANS}
\begin{verbatim}
    /NSUBSCANS nSubscans

    Integer   :: nSubscans         ! number of subscans

\end{verbatim}
\subsubsection{ONOFF /REFERENCE}
\index{ONOFF!/REFERENCE}
\begin{verbatim}
    /REFERENCE xOffsetR yOffsetR [systemNameRef]
    or
    /REFERENCE NO                  ! no reference

    position of off-source reference subscans

    Real      :: xOffsetR          ! x-offset
    Real      :: yOffsetR          ! y-offset
    Character :: systemNameRef     ! name of system
                                   ! see /SYSTEM for choices

    NOTE: with the usage /REFERENCE xOffsetR yOffsetR, both parameters are requi
    but you can replace either parameter with * to leave it unchanged.

\end{verbatim}
\subsubsection{ONOFF /SWWOBBLER}
\index{ONOFF!/SWWOBBLER}
\begin{verbatim}
    /SWWOBBLER [yes|no]

    (option of command ONOFF)

    set parameters appropriate for on-off Wobbler switching

    Logical   :: doSwWobbler

    If switching mode SWWOBBLER has been selected, the following parameters
    of ONOFF are set according to wOffset1 and wOffset2:

    ONOFF
          xOffset        is set to: -wOffset1
          yOffset        is set to:  0.0

    /REFERENCE           is set to:  Yes
          xOffsetR       is set to: -wOffset2
          yOffsetR       is set to:  0.0
          systemNameRef  is set to:  TRUEHORIZON

    /SYSTEM
          systemName     is set to:  TRUEHORIZON

    NOTE: in this case the values selected by /SWWOBBLER overrule the
    corresponding values specified directly in the command.

    NOTE: To do ONOFF with Wobbler switching and other (unconventional)
    values for the parameters listed above, simply specify the values
    using command ONOFF with option /SWWOBBLER NO (not recommended).

    NOTE: If the selected switching mode is SWWOBBLER and if the option
    /SWWOBBLER is no explicitly given, it will be assumed to be .True. (Yes),
    If the selected switching mode is not SWWOBBLER and if the option
    /SWWOBBLER is no explicitly given, it will be assumed to be .False. (No),

\end{verbatim}
\subsubsection{ONOFF /SYMMETRIC}
\index{ONOFF!/SYMMETRIC}
\begin{verbatim}
    /SYMMETRIC [yes|no]

    Logical   :: doSymmetric      ! default: no

    (For ONOFF) select a subscan sequence that is "symmetric" in time.
    This requires that the number of subscans is a multiple of 4.

    Example for ONOFF with /SYMMETRIC no     /SYMMETRIC yes
    1st subscan:                      OFF               OFF
    2nd  "                            ON                ON
    3rd  "                            OFF               ON
    4th  "                            ON                OFF
    (and so on)

    NOTE that this does not in anyway change the positions
    of the ON-source and OFF-source subscans!

\end{verbatim}
\subsubsection{ONOFF /SYSTEM}
\index{ONOFF!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{ONOFF /TSUBSCAN}
\index{ONOFF!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time


\end{verbatim}
\subsubsection{ONOFF EXAMPLES}
\index{ONOFF!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-onoff.pako
    !     ONOFF SWTOTAL EXAMPLE,v 1.1.1 2009-05-05 Hans Ungerechts
    !     "POSITION SWITCHING"
    !
    @ demo-rx-spectrometers                     !  demo setup of receivers
    !                                           !  and spectrometers
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    SET ANGLE arcsec                            !
    !
    SWTOTAL                                   - !  select total power
      /TPHASE        0.5                        !  time per phase (data sample)
    !
    CALIBRATE                                 - !
      /AMBIENT                                - !  ambient load
      /COLD                                   - !  cold    load
      /SKY       -600.0   0.0                 - !  sky at offsets -600.0 0.0
      /SYSTEM       projection                - !  system for SKY offsets
      /TCALIBRATE   5.0                         !  time per calibration subscan
    !
    PAUSE "CALIBRATE OK to start? [c/q]"        !  a chance to check
    !
    START                                       !  start
    !
    ONOFF           40.0   -30.0              - !  offsets of on position
      /NSUBSCANS    12                        - !  number of subscans
      /REFERENCE  -600.0     0.0   projection - !  offsets of off-source referen
      /SYSTEM       projection                - !  system for offsets
      /SYMMETRIC                              - !  "symmetric" subscan sequence
      /TSUBSCAN     30                          !  time per subscan
    !
    PAUSE "ONOFF SWTOTAL OK to start? [c/q]"    !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! we assume here that the source already has been selected,
    !! see: demo-source

    !
    ! Id: demo-onoff-swwobbler.pako
    !     ONOFF SWWOBBLER EXAMPLE,v 1.1.6 2011-07-31 Hans Ungerechts
    !     "WOBBLER SWITCHING"
    !
    @ demo-rx-spectrometers                     !  demo setup of receivers
    !                                           !  and spectrometers
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    SET ANGLE arcsec                            !
    !
    !                                           !  select wobbler switching
    SWWOBBLER     -120.0   120.0              - !  wobbler -/+ 120 arc sec
      /TPHASE        1.0                        !  1 seconds per phase
    !
    CALIBRATE                                 - !
      /AMBIENT                                - !  ambient load
      /COLD                                   - !  cold    load
      /SKY       -600.0   0.0                 - !  sky at offsets -600.0 0.0
      /SYSTEM       projection                - !  system for SKY offsets
      /TCALIBRATE   5.0                         !  time per calibration subscan
    !
    PAUSE "CALIBRATE OK to start? [c/q]"        !  a chance to check
    !
    START                                       !  start
    !
    !!                                          !  OPTIONAL:
    !! OFFSETS  20 30                         - !  mapping offsets in
    !!  /SYSTEM projection                      !  system projection
    !
    ONOFF   /SWWOBBLER                        - !  ONOFF for Wobbler switching
      /NSUBSCANS    12                        - !  number of subscans
      /SYMMETRIC                              - !  "symmetric" subscan sequence
      /TSUBSCAN     30                          !  time per subscan
    !
    PAUSE "ONOFF SWWOBBLER OK to start? [c/q]"  !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! we assume here that the source already has been selected,
    !! see: demo-source
    !!
    !! IMPORTANT NOTE: ONOFF with SWWOBBLER (wobbler switching on-off)
    !! requires that the subscans are offset relative to the source
    !! in the trueHorizon system by -1 * the  Wobbler elongations (offsets).
    !! With the commands above, paKo recognizes this and automatically
    !! sets the correct values.
    !! In this case, OFFSETS can be used to set additional mapping
    !! offsets in the  "projection" of the astronomical coordinate
    !! system.  These mapping offsets in the projection apply
    !! to all ONOFF subscans.

\end{verbatim}
\subsection{OTFMAP}
\index{OTFMAP}
\begin{verbatim}


    OTFMAP xStart yStart xEnd yEnd

    Specify an On-The-Fly (OTF) map with linear OTF subscans.

    Real      :: xStart            ! x-offset of start of first OTF  subscan
    Real      :: yStart            ! y-offset of start of first OTF  subscan
    Real      :: xEnd              ! x-offset of end   of first OTF  subscan
    Real      :: yEnd              ! y-offset of end   of first OTF  subscan

    The sequence of subscans is determined by:
    /croLoop /nOtf /reference /step /zigzag

    /croLoop     sequence of:
                 R off-source Reference
                 O on-source OTF
    /nOtf        number of OTF subscans
    /reference   off-source reference position
    /step        step in x and y between OTF subscans
                 = translation of one OTF subscans to the next
    /zigzag      option to scan back-and-forth

    The scan analysis loops through the letter codes in croLoop until nOtf
    OTF subscans have been generated, starting with first letter in the
    croLoop.

       IF THE CROCODE LETTER IS "R" AND /REFERENCE IS TRUE:

       1 subscan tracking the fixed off-source reference position
       is generated

       IF THE CROCODE LETTER IS "O":

       1 linear OTF subscan is generated.
       - The start and end positions of the first OTF subscan are:
         parameters xStart yStart xEnd yEnd of the OTFMAP command
       - For the second and all following OTF subscans:
         xStart yStart xEnd yEnd of the previous OTF subscan are
         incremented by parameters dx and dy of option /step.
         If /zigzag is true, xStart yStart and xEnd yEnd are
         interchanged.

    Then the next letter code in the croLoop is considered
    in the same way.

    If /reference is true, a croCode ending in "R" will ensure that an
    off-source reference subscan follows the last OTF subscan.

    /CROLOOP croLoop

    sequence of R = off-source Reference
                O = On-source subscans

    Character :: croLoop

    Example:
    /croLoop ROOR

    /NOTF nOtf

    Integer   :: nOtf              ! number of OTF (on-the-fly) subscans

    /REFERENCE xOffsetR yOffsetR [systemNameRef]
    or
    /REFERENCE NO                  ! no reference

    position of off-source reference subscans

    Real      :: xOffsetR          ! x-offset
    Real      :: yOffsetR          ! y-offset
    Character :: systemNameRef     ! name of system
                                   ! see /SYSTEM for choices

    NOTE: with the usage /REFERENCE xOffsetR yOffsetR, both parameters are requi
    but you can replace either parameter with * to leave it unchanged.

    /STEP dx dy

    Step (shift or translation)  between lines in a map.

    Real      :: dx                ! shift in x-offsets
    Real      :: dy                ! shift in y-offsets

    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).


\end{verbatim}
\subsubsection{OTFMAP /DEFAULTS}
\index{OTFMAP!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{OTFMAP /CROLOOP}
\index{OTFMAP!/CROLOOP}
\begin{verbatim}
    /CROLOOP croLoop

    sequence of R = off-source Reference
                O = On-source subscans

    Character :: croLoop

    Example:
    /croLoop ROOR

\end{verbatim}
\subsubsection{OTFMAP /NOTF}
\index{OTFMAP!/NOTF}
\begin{verbatim}
    /NOTF nOtf

    Integer   :: nOtf              ! number of OTF (on-the-fly) subscans

\end{verbatim}
\subsubsection{OTFMAP /REFERENCE}
\index{OTFMAP!/REFERENCE}
\begin{verbatim}
    /REFERENCE xOffsetR yOffsetR [systemNameRef]
    or
    /REFERENCE NO                  ! no reference

    position of off-source reference subscans

    Real      :: xOffsetR          ! x-offset
    Real      :: yOffsetR          ! y-offset
    Character :: systemNameRef     ! name of system
                                   ! see /SYSTEM for choices

    NOTE: with the usage /REFERENCE xOffsetR yOffsetR, both parameters are requi
    but you can replace either parameter with * to leave it unchanged.

\end{verbatim}
\subsubsection{OTFMAP /STEP}
\index{OTFMAP!/STEP}
\begin{verbatim}
    /STEP dx dy

    Step (shift or translation)  between lines in a map.

    Real      :: dx                ! shift in x-offsets
    Real      :: dy                ! shift in y-offsets

\end{verbatim}
\subsubsection{OTFMAP /SPEED}
\index{OTFMAP!/SPEED}
\begin{verbatim}
    /SPEED speed1 [speed2]

    speed of OTF subscans

    Real      :: speed1            ! speed at start
    Real      :: speed2            ! speed at end

    For OTFMAP speed2 = speed1.

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{OTFMAP /SYSTEM}
\index{OTFMAP!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{OTFMAP /TOTF}
\index{OTFMAP!/TOTF}
\begin{verbatim}
    /TOTF tOtf

    time per OTF subscan or segment

    Real       :: tOtf             ! time

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{OTFMAP /TREFERENCE}
\index{OTFMAP!/TREFERENCE}
\begin{verbatim}
    /TREFERENCE tReference

    time per off-source reference

    Real       :: tReference       ! time

\end{verbatim}
\subsubsection{OTFMAP /ZIGZAG}
\index{OTFMAP!/ZIGZAG}
\begin{verbatim}
    /ZIGZAG [yes|no]

    alternate direction between lines in a map

    Logical    :: doZigzag

\end{verbatim}
\subsubsection{OTFMAP /TUNE}
\index{OTFMAP!/TUNE}
\begin{verbatim}
    /TUNE xOffsetT yOffsetT
    or
    /TUNE NO                  ! no tune subscan

    Tune subscan at the specified offsets, before any other subscans.

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan

    NOTE: with the usage /TUNE xOffsetT yOffsetT, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.

    The offsets for the tune subscan are in the system selected with /SYSTEM.

\end{verbatim}
\subsubsection{OTFMAP /TTUNE}
\index{OTFMAP!/TTUNE}
\begin{verbatim}
    /TTUNE tTune

    time per TUNE subscan

    Real       :: tTune             ! time


\end{verbatim}
\subsubsection{OTFMAP EXAMPLES}
\index{OTFMAP!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-otfmap.pako
    !     OTFMAP SWTOTAL EXAMPLE,v 1.1.6 2011-07-21 Hans Ungerechts
    !
    @ demo-rx-spectrometers                     !  demo setup of receivers
    !                                           !  and spectrometers
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    SET ANGLE arcsec                            !
    !
    SWTOTAL                                   - !  to select total power
      /TPHASE        0.5                        !  time per phase (data sample)
    !
    CALIBRATE                                 - !
      /AMBIENT                                - !  ambient load
      /COLD                                   - !  cold    load
      /SKY       -500.0 -400.0                - !  sky at offsets -500.0 -400.0
      /SYSTEM       projection                - !  system for SKY offset
      /TCALIBRATE   5.0                         !  time per calibration subscan
    !
    PAUSE "CALIBRATE OK to start? [c/q]"        !  a chance to check
    !
    START                                       !  start
    !
    OTFMAP        -300   -15  300  -15        - !  offsets at start and end of f
      /CROLOOP      ROR                       - !  subscans: reference-OTF-refer
      /NOTF          4                        - !  number of on-the-fly subscans
      /REFERENCE  -500  -400  projection      - !  offsets of off-source referen
      /STEP          0    10                  - !  step (shift) between OTF subs
      /SYSTEM       projection                - !  system for offsets
      /TOTF         120.0                     - !  time per on-the-fly subscan
      /TREFERENCE    20.0                     - !  time per off-source reference
      /ZIGZAG                                   !  go back and forth
    !
    PAUSE "OTFMAP SWTOTAL OK to start? [c/q]"   !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! we assume here that the source already has been selected,
    !! see: demo-source
    !!
    !! /CROLOOP      ROR means that there will be an
    !!               off-source reference subscan (R)
    !!               before and after each OTF suscan (O).
    !!               Therefore with /NOTF 4 on-the-fly subscans the complete
    !!               subscan sequence will be:
    !!               R OTF#1 R   R OTF#2 R   R OTF#3 R   R OTF#4 R
    !!               with
    !! /CROLOOP      ROOROOR it would be:
    !!               R OTF#1       OTF#2   R   OTF#3       OTF#4 R
    !
    !
    ! Id: demo-otfmap-swfrequency.pako
    !     OTFMAP SWFREQUENCY EXAMPLE,v 1.1.11 2011-11-25 Hans Ungerechts
    !
    @ demo-rx                                   !  demo setup of receivers
    !
    BACKEND /CLEAR                              !  clear previous backends
    BACKEND VESPA 1 0.040 40.0 0.0 E090 hor LI  !  high spectral resolution
    BACKEND VESPA 2 0.040 40.0 0.0 E090 ver LI  !  with VESPA
    BACKEND VESPA 3 0.080 80.0 0.0 E230 hor LI
    BACKEND VESPA 4 0.080 80.0 0.0 E230 ver LI
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    SET ANGLE arcsec                            !
    !
    !                                           !  setup frequency switching
    SWFREQUENCY   -3.9     3.9  /receiver E090  !  for EMIR band E090
    SWFREQUENCY  -11.7    11.7  /receiver E230  !  for EMIR band E230
    SWFREQUENCY                 /tphase   0.20  !  same for all receivers/bands
    !
    CALIBRATE                                 - !
      /AMBIENT                                - !  ambient load
      /COLD                                   - !  cold    load
      /SKY       -600.0   0.0                 - !  sky at offsets -600.0 0.0
      /SYSTEM       projection                - !  system for offset
      /TCALIBRATE   5.0                         !  time per calibration subscan
    !
    PAUSE "CALIBRATE OK to start? [c/q]"        !  a chance to check
    !
    START                                       !  start
    !
    OTFMAP        -300  -300  300 -300        - !  offsets at start and end of f
      /CROLOOP      O                         - !  only OTF subscans
      /NOTF         4                         - !  number of on-the-fly subscans
      /REFERENCE    no                        - !  no off-source reference subsc
      /STEP          0    10                  - !  step (shift) between OTF subs
      /SYSTEM       projection                - !  system for offset
      /TOTF         120.0                     - !  time per on-the-fly subscan
      /ZIGZAG                                   !  go back and forth
    !
    PAUSE "OTFMAP SWFREQUENCY OK to start? [c/q]" !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! we assume here that the source already has been selected,
    !! see: demo-source


\end{verbatim}
\subsection{POINTING}
\index{POINTING}
\begin{verbatim}


    POINTING length

    Specify a pointing measurement with linear OTF subscans in the
    "true-angle" horizontal system, along azimuth and elevation, all
    centered on the source.

    Real      :: length            ! length (angle) of each subscan

    The first subscan is incrementing in azimuth. If the number of OTF
    subscans, nOtf, is 2, the second subscan is incrementing in
    elevation.  If nOtf > 2, the subscan sequence is: incrementing
    azimuth, decrementing azimuth, incrementing elevation, and if nOtf >
    3: decrementing elevation, etc.


\end{verbatim}
\subsubsection{POINTING /DEFAULTS}
\index{POINTING!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{POINTING /DOUBLEBEAM}
\index{POINTING!/DOUBLEBEAM}
\begin{verbatim}
    /DOUBLEBEAM [yes|no]

    Pointing: do a "double-beam" pointing

    Logical    :: doDoubleBeam

    This is valid only for pointing with Wobbler switching (SWWOBBLER).

    This option has an effect only if SET 2nRotation 0.0

\end{verbatim}
\subsubsection{POINTING /NOTF}
\index{POINTING!/NOTF}
\begin{verbatim}
    /NOTF nOtf

    Integer   :: nOtf              ! number of OTF (on-the-fly) subscans

\end{verbatim}
\subsubsection{POINTING /TOTF}
\index{POINTING!/TOTF}
\begin{verbatim}
    /TOTF tOtf

    time per OTF subscan or segment

    Real       :: tOtf             ! time

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{POINTING /TUNE}
\index{POINTING!/TUNE}
\begin{verbatim}
    /TUNE xOffsetT yOffsetT
    or
    /TUNE NO                  ! no tune subscan

    Tune subscan at the specified offsets, before any other subscans.

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan

    NOTE: with the usage /TUNE xOffsetT yOffsetT, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.

    For POINTING, the offsets for the tune subscan are in the
    "trueHorizontal" system.

\end{verbatim}
\subsubsection{POINTING /TTUNE}
\index{POINTING!/TTUNE}
\begin{verbatim}
    /TTUNE tTune

    time per TUNE subscan

    Real       :: tTune             ! time


\end{verbatim}
\subsubsection{POINTING EXAMPLES}
\index{POINTING!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-pointing.pako
    !     POINTING EXAMPLE,v 1.1.11 2011-11-25 Hans Ungerechts
    !
    SOURCE   Mars                               !
    OFFSETS /CLEAR                              !  clear previously set offsets
    !
    @ demo-rx                                   !  demo setup of EMIR
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    BACKEND /CLEAR                              !  clear previous backend setup
    !
    BACKEND BBC        /Default                 !  connect 1 part to each
    !                                           !  EMIR subband selected
    !
    SET ANGLEUNIT arcsec                        !  make sure angle unit is arc s
    !
    SWBEAM                                      !  to select beam switching
    !
    POINTING /DEFAULT                           !  reset all options
    !
    POINTING      120                         - !  pointing with subscan length
       /NOTF       4                          - !  4 OTF subscans
       /TOTF      30.0                          !  30 seconds per OTF subscan
    !
    PAUSE "POINTING OK to start? [c/q]"         !  a chance to check
    !
    START                                       !  start
    !
    RETURN
    !
    !!
    !! NOTE:
    !! if you use NASMYTH offsets for an off-center pixel
    !! of a mutlibeam receiver don't use OFFSETS/ CLEAR.
    !! If you want the intensity of the Pointing data to be
    !! calibrated, you have to do a Calibrate with the same
    !! receivers and (continuum) backends before the pointing.
    !!






\end{verbatim}
\subsection{RECEIVER}
\index{RECEIVER}
\begin{verbatim}


    RECEIVER              receiverBand    lineName [frequency SB]
    RECEIVER BOLOMETER    bolometerName   [pixel]

    Specify selection and setup for receivers.

    The first form is for heterodyne receivers,
    the second form for bolometers.

    Heterodyne:
    ===========

    Character    :: receiverBand      ! name of receiver band to connect
    Character*12 :: lineName          ! name of line. don't use @ < >
    Real         :: frequency         ! [GHz]
    Character    :: SB                ! sideband or subband
                                      ! choices for HERA: LSB USB
                                      ! choices for EMIR: LO LI UI UO

    Choices for receiverBand are:
    E090 E150 E230 E330 HERA1 HERA2

    lineName is limited to 12 characters.


    NB: Don't use / & < > in names of sources, lines, projects,
    PI, observer, operator, etc. Don't use ()/ in source names.


    E090 E150 E230 E330 are the 4 EMIR (Eight MIxer Receiver) bands,
    HERA1 and HERA2     are the 2 parts of HERA (HEterodyne Receiver Array).

    If only receiverBand and lineName are specified, we try to read the
    frequency and sideband/subband from the line catalog specified with:
    CATALOG LINE fileName.

    The local oscillator for the receiverBand will be set so that the
    frequency (corrected for the Doppler shift) will be in the requested
    sideband/subband SB.  See receiver documentation for the exact values
    of the IF.

    NOTE: EMIR subbands, IF cables, and Backends

    The output signals from EMIR are transmitted to the spectrometers and
    NBC through 8 IF cables. Each IF cable carries one subband of bandwidth
    4 GHz. This subbands are LO, LI, UI, or UO.

    NBC, 4MHz, WILMA, and VESPA can only(!) be connected to IF cables 1 to 4.
    FTS parts 1 to 4 can also be connected to IF cables 1 to 4.

    The command options RECEIVER /HORIZONTAL and RECEIVER /VERTICAL allow
    to select up to 4 EMIR subbands that will be transmitted through IF
    cables 1 to 4 (compare HELP RECEIVER /HORIZONTAL and the EMIR user
    documentation). This selection can include Outer subbands.

    In addition, the IF cables 5 to 8 carry the 4 Outer subbands
    corresponding to the subbands selected for IF cables 1 to 4. E.g., if
    we select for IF 1 to 4:
    E230 ver UO    E090 ver UI    E230 hor UI   E090 hor UI
    then the IF cables 5 to 8 will transmit:
    E230 ver UO    E090 ver UO    E230 hor UO   E090 hor UO.

    Only FTS parts 5 to 8 can be connected to IF cables 5 to 8.

    BACKEND NBC|WILMA|FTS /DEFAULT will automatically set the maximum
    number of backend parts for all available subbands.

    BACKEND BBC is completely independant of the sub band selections for
    the IF cables.

    Bolometer:
    ==========


    RECEIVER BOLOMETER    bolometerName   [pixel]
    RECEIVER BOLOMETER    GISMO
    RECEIVER BOLOMETER    NIKA            [pixel]

    Character :: bolometerName     ! name of bolometer
    Integer   :: pixel             ! number of NIKA pixel

    Choices for bolometerName are:
    GISMO NIKA

    If the pixel number is specified with RECEIVER BOLOMETER NIKA, pako
    will try to find and use the Nasmyth offsets for this pixel in a
    coresponding configuration file.

    However, if Nasmyth offsets are explicitly specified with
    OFFSETS /SYSTEM Nasmyth, the values from OFFSETS take precedence over
    any values found for a NIKA pixel.



\end{verbatim}
\subsubsection{RECEIVER /DEFAULTS}
\index{RECEIVER!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{RECEIVER /CLEAR}
\index{RECEIVER!/CLEAR}
\begin{verbatim}
    /CLEAR  [yes|no]

    Completely clear a list of connected hardware, e.g., receivers, backends,
    or parameters of the associated command.


\end{verbatim}
\subsubsection{RECEIVER /CONNECT}
\index{RECEIVER!/CONNECT}
\begin{verbatim}

    /CONNECT [yes|no]

    connect (or disconnect) the specified hardware, e.g.,
    backend or backend part.

     --> DEPRECATED. PROTECTED (needs SET userLevel)

\end{verbatim}
\subsubsection{RECEIVER /DEROTATOR}
\index{RECEIVER!/DEROTATOR}
\begin{verbatim}
    /DEROTATOR angle system

    Specify derotator angle for HERA

    Real      :: angle             ! in units [deg] (!)
    Character :: system            !

    Choices for system:
    "Nasmyth"
    "horizon"
    "equatorial"
    "frame"                        ! same as Nasmyth
    "sky"                          ! same as equatorial

    NOTES: The last 2 are for consistency with old control system and HERA conve
    This option works only for RECEIVER HERA1 or RECEIVER HERA2 (of course it's
    same angle for HERA1 and HERA2).

\end{verbatim}
\subsubsection{RECEIVER /DISCONNECT}
\index{RECEIVER!/DISCONNECT}
\begin{verbatim}

    /DISCONNECT

    disconnect the specified hardware, e.g.,
    backend or backend part.

     --> DEPRECATED. PROTECTED (needs SET userLevel)

\end{verbatim}
\subsubsection{RECEIVER /DOPPLER}
\index{RECEIVER!/DOPPLER}
\begin{verbatim}
    /DOPPLER doppler

    Character :: doppler           ! apply doppler correction?
                                   ! choices: DOPPLER|FIXED


\end{verbatim}
\subsubsection{RECEIVER /EFFICIENCY}
\index{RECEIVER!/EFFICIENCY}
\begin{verbatim}
    /EFFICIENCY forwardEfficiency beamEfficiency

    specify forward and beam efficiencies

    Real      :: forwardEfficiency !
    Real      :: beamEfficiency    !



\end{verbatim}
\subsubsection{RECEIVER /GAINIMAGE}
\index{RECEIVER!/GAINIMAGE}
\begin{verbatim}

    /GAINIMAGE gainImage [dB]

    Specify the gain ratio of image to signal sidebands.

    Real      :: gainImage         !

    If "dB" is added after the value, the ratio is assumed to be in dB,
    otherwise a decimal fraction.

    --> A standard value for EMIR is -13 db, for HERA -10 db.


\end{verbatim}
\subsubsection{RECEIVER /HORIZONTAL}
\index{RECEIVER!/HORIZONTAL}
\begin{verbatim}
    /HORIZONTAL [sb1 [sb2]]
    /HORIZONTAL n[one]

    EMIR subbands for Horizontal polarization.


    This option applies only to EMIR.

    Character   :: sb1, sb2   ! for EMIR: LO|LI|UI|UO

    This option selects which EMIR subband(s) of this polarization will be
    transmitted through IF cables 1 to 4.  Note that some backends, NBC,
    4MHz, WILMA, VESPA, can only be connected to IF cables 1 to 4, i.e.,
    only to the EMIR subbands selected with the RECEIVER command.

    For each EMIR band and polarization, at most 2 subbands can be
    transmitted through IF cables 1 to 4.  Which combinations of EMIR
    bands, polarizations, and subbands are possibble is determined by the
    hardware of the EMIR IF switching box.  See the EMIR documentation for
    details.

    If no subband is explicitly specified with this option, paKo will
    assume that for this polarization the same single subband SB is
    requested as specified for the main parameters (frequency, tuning) of
    the RECEIVER command for this EMIR band.


    /HORIZONTAL n[one] means that from this polarization no subband
    will be transported through IF cables 1 to 4.


\end{verbatim}
\subsubsection{RECEIVER /SCALE}
\index{RECEIVER!/SCALE}
\begin{verbatim}
    /SCALE scale

    Select the calibration intensity scale.

    Character :: scale             ! choices: ANTENNA|BEAM

    If scale is "ANTENNA", the scale is antenna temperature.
    If scale is "BEAM", the scale is (main) beam temperature.




\end{verbatim}
\subsubsection{RECEIVER /TEMPLOAD}
\index{RECEIVER!/TEMPLOAD}
\begin{verbatim}

    /TEMPLOAD tempColdLoad tempAmbientLoad
    /TEMPLOAD L[OOKUP]     L[OOKUP]
    /TEMPLOAD *            ...

    Set effective temperatures for the calibration loads at cold and ambient
    temperature.

    Real      :: tempColdLoad      !
    Real      :: tempAmbientLoad   !

    NEW LOGIC FOR SINGLE-PIXEL SIS RECEIVERS (FROM SUMMER 2007, paKo v1.0.7)

    If a numerical value is entered for tempColdLoad or tempAmbientLoad,
    that value is used for calibration calculations.

    Instead of specifying a value one may enter the string L(OOKUP) for
    tempColdLoad and/or tempAmbientLoad.  This is shown in the pakoDisplay
    by the letter "L" instead of a number.

    In this case, during the execution of the observations, the NCS will
    use measured values for the corresponding load temperature(s).

    A * can be substituted for tempColdLoad, which means to leave the
    value for tempColdLoad unchanged from the previous RECEIVER command.

    NOTE: FOR HERA
    measured values are always used during the execution of the
    observations. This is the same logic as in older versions of paKo/NCS.


\end{verbatim}
\subsubsection{RECEIVER /VERTICAL}
\index{RECEIVER!/VERTICAL}
\begin{verbatim}

    /VERTICAL [sb1 [sb2]]
    /VERTICAL n[one]

    EMIR subbands for Vertical polarization


    This option applies only to EMIR.

    Character   :: sb1, sb2   ! for EMIR: LO|LI|UI|UO

    This option selects which EMIR subband(s) of this polarization will be
    transmitted through IF cables 1 to 4.  Note that some backends, NBC,
    4MHz, WILMA, VESPA, can only be connected to IF cables 1 to 4, i.e.,
    only to the EMIR subbands selected with the RECEIVER command.

    For each EMIR band and polarization, at most 2 subbands can be
    transmitted through IF cables 1 to 4.  Which combinations of EMIR
    bands, polarizations, and subbands are possibble is determined by the
    hardware of the EMIR IF switching box.  See the EMIR documentation for
    details.

    If no subband is explicitly specified with this option, paKo will
    assume that for this polarization the same single subband SB is
    requested as specified for the main parameters (frequency, tuning) of
    the RECEIVER command for this EMIR band.


    /VERTICAL n[one] means that from this polarization no subband
    will be transported through IF cables 1 to 4.


\end{verbatim}
\subsubsection{RECEIVER /WIDTH}
\index{RECEIVER!/WIDTH}
\begin{verbatim}

    /WIDTH width

    Select receiver setup for WIDE or NARROW bandwidth mode.

    Character :: width             ! width. choices: WIDE|NARROW

    NOTE: Option /WIDTH NARROW changes the (local oscillator) setup of
    receivers HERA1 HERA2 in such a way that a line in the center of the
    receiver bandwidth appears in the center of the bands of VESPA.

    Spectrometers with 1GHz or more bandwidth normally require /WIDTH WIDE.

     --> NOTE: THIS OPTION DOES NOT APPLY TO EMIR!


\end{verbatim}
\subsubsection{RECEIVER BOLOMETER}
\index{RECEIVER!BOLOMETER}
\begin{verbatim}

    RECEIVER BOLOMETER    bolometerName   [pixel]
    RECEIVER BOLOMETER    GISMO
    RECEIVER BOLOMETER    NIKA            [pixel]

    Character :: bolometerName     ! name of bolometer
    Integer   :: pixel             ! number of NIKA pixel

    Choices for bolometerName are:
    GISMO NIKA

    If the pixel number is specified with RECEIVER BOLOMETER NIKA, pako
    will try to find and use the Nasmyth offsets for this pixel in a
    coresponding configuration file.

    However, if Nasmyth offsets are explicitly specified with
    OFFSETS /SYSTEM Nasmyth, the values from OFFSETS take precedence over
    any values found for a NIKA pixel.

\end{verbatim}
\subsubsection{RECEIVER EXAMPLES}
\index{RECEIVER!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-receiver.pako
    !     basic RECEIVER EXAMPLES,v 1.1.15 2013-10-14 Hans Ungerechts
    !
    CATALOG  line   demo-EMIR.lin      ! specify line catalog
    !
    RECEIVER /CLEAR                    ! clear all receivers previously set
    !
    say                              " !   --> E090 band from catalog
    receiver /clear
    RECEIVER E090   12CO(1-0)        - ! line (frequency, subband UO from catalo
                   /Horizontal       - ! subband from catalog
                   /Vertical           ! subband from catalog
    say                              " ! NOTE: E090 band from catalog
    pause
    !
    say                              " !   --> E090 band USB Outer subband
    receiver /clear
    REC E090 12CO(1-0) 115.271204 UO - ! line frequency and subband explicit
                   /Horizontal UO    - ! USB Outer subband explicit
                   /Vertical   UO      ! USB Outer subband explicit
    say                              " ! NOTE: E090 H&V    UO   4 GHz BW
    pause
    !
    !
    say                              " !   --> E090+E150 bands LSB dual polariz.
    receiver /clear
    RECEIVER E090   HCN(1-0)         - !
                   /Hor        LI    - ! LSB Inner subband
                   /Ver        LI      ! LSB Inner subband
    RECEIVER E150   CS(3-2)          - !
                   /H          LI    - ! LSB Inner subband
                   /V          LI      ! LSB Inner subband
    say                              " ! NOTE: E090 H+V LI      4 GHz BW
    say                              " !       E150 H+V LI      4 GHz BW
    say                              " !   ++  E090 H+V LO      4 GHz BW for FTS
    say                              " !   ++  E150 H+V LO      4 GHz BW for FTS
    pause
    !
    !
    say                              " !   --> E090+E230 bands LSB dual polariz.
    receiver /clear
    RECEIVER E090   HCN(1-0)         - !
                   /Horizontal LI    - !
                   /Vertical   LI      !
    RECEIVER E230   12CO(2-1)        - !
                   /Horizontal LI    - !
                   /Vertical   LI      !
    say                              " ! NOTE: E090 H+V LI      4 GHz BW
    say                              " !       E230 H+V LI      4 GHz BW
    say                              " !   ++  E090 H+V LO      4 GHz BW for FTS
    say                              " !   ++  E230 H+V LO      4 GHz BW for FTS
    pause
    !
    !
    say                              " !   --> E150+E330 bands LSB dual polariz.
    receiver /clear
    RECEIVER E150   CS(3-2)          - !
                   /H          LI    - !
                   /V          LI      !
    RECEIVER E330   13CO(3-2)        - !
                   /H          LI    - !
                   /V          LI      !
    say                              " ! NOTE: E150 H+V LI      4 GHz BW
    say                              " !       E330 H+V LI      4 GHz BW
    say                              " !   ++  E150 H+V LO      4 GHz BW for FTS
    say                              " !   ++  E330 H+V LO      4 GHz BW for FTS
    pause
    !
    !!!!
    !
    RECEIVER      /clear
    say                              " !   --> HERA1+HERA2 LSB
    RECEIVER HERA1 12CO(2-1) 230.537990 LSB
    RECEIVER HERA2 12CO(2-1) 230.537990 LSB
    say                              " ! NOTE: HERA1+HERA2 LSB
    pause
    !


\end{verbatim}
\subsection{SAVE}
\index{SAVE}
\begin{verbatim}


    SAVE [commandToSave]
    SAVE ALL [CORRECTIONS]
    SAVE SET [CORRECTIONS]
    SAVE SWITCHING

    Save parameters and options of a command in the form of a valid .pako
    script.

    Character :: commandToSave     ! command to save

    If commandToSave is not specified, the last selected observing mode is
    saved.

    SAVE ALL saves (nearly) all current setup parameters, as well as the
    current switching and observing modes, to file all.pako, or to a
    different file specified with /FILE.

    NOTE: SAVE ALL and SAVE SET save the pointing and focus corrections
    only if they are used in the form
    SAVE ALL C[ORRECTIONS]
    SAVE SET C[ORRECTIONS]

    (Normally SAVE ALL and SAVE SET are meant to generate paKo scripts
    that can be used to re-produce the setup at a later time, when one
    probably wants to use different corrections. On the other hand the
    idiomatic usage: SAVE ALL C /FILE LAST allows to save "really
    everything" in order to recover it with @ LAST)

    SAVE SWITCHING saves the currently selected switching mode (total
    power, beam, frequency, wobbler), to file switching.pako, or to a
    different file specified with /FILE.

    NOTE: the parameters of "unused" (unselected) hardware, switching
    modes, and observing modes are never saved.


\end{verbatim}
\subsubsection{SAVE /APPEND}
\index{SAVE!/APPEND}
\begin{verbatim}
    /APPEND [yes|no]

    Append to existing file, do not create a new one.

    Logical   :: doAppend        ! default: false

\end{verbatim}
\subsubsection{SAVE /FILE}
\index{SAVE!/FILE}
\begin{verbatim}
    /FILE fileName

    Specify file name.

    Character :: fileName          !

\end{verbatim}
\subsubsection{SAVE EXAMPLES}
\index{SAVE!EXAMPLES}
\begin{verbatim}
    !
    ! SAVE EXAMPLES v1.0.0 2005-12-19 Hans Ungerechts
    !
    SOURCE ...
    SWFREQUENCY ...
    SWTOTAL ...
    ONOFF  ...
    OTFMAP ...
    SAVE              ! saves OTFMAP       to file otfmap.pako
    SAVE ALL          ! saves "everything" to file all.pako
    SAVE ONOFF        ! saves ONOFF        to file onoff.pako
    SAVE SOURCE       ! saves SOURCE       to file source.pako
    SAVE SWITCHING    ! saves SWTOTAL      to file switching.pako
    SAVE SWFREQUENCY  ! saves SWFREQUENCY  to file swfrequency.pako
    !





\end{verbatim}
\subsection{SET}
\index{SET}
\begin{verbatim}


    SET keyword   value [value* ...]

    Set values for some general parameters.

    Character               ::  keyword
    Character|Integer|Real  ::  value*

    Keywords    Type of Value(s)
    ========    ================

    Level       Integer [Integer]  ! minumum value(s) for warning and error mess
    Project     Character(len=24)  ! project ID
    PI          Character(len=24)  ! PI. Don't use & < >
    Observer    Character(len=24)  ! Observer(s). Don't use & < >
    Operator    Character(len=24)  ! Telescope operator(s). Don't use & < >

    Pointing    Real Real          ! Pointing corrections [arc sec]
    Focus       Real               ! Focus correction [mm]
    Topology    Character(len=24)  ! Topology for the overlapping azimuth range
    2ndRotation Real               ! Rotation angle for Secondary and Wobbler

    Comment     Character(len=128) ! Purpose. Don't use & < >
    Purpose     Character(len=24)  ! Purpose. Don't use & < >

    EMIRcheck   Character          ! "strict"|"relaxed"|"loose"

    doSubmit    Logical            ! turn submission of jobs to queue on or off


    NB: Don't use / & < > in names of sources, lines, projects,
    PI, observer, operator, etc. Don't use ()/ in source names.


    In  order  to include blank characters in a value of type Character, the
    complete value should be included in " ", see example: SET Observer  be-
    low.

    Only  a  few  of these parameters are shown in the Display.  Use command
    SHOW to list (nearly) all of them.



\end{verbatim}
\subsubsection{SET COMMENT}
\index{SET!COMMENT}
\begin{verbatim}

    SET COMMENT comment
    SET COMMENT ""

    Comment     Character(len=128) ! Comment. Don't use & < >

    Set comment for an observation.  The value of "comment" is displayed
    in the monSDH display during the execution of each scan, and logged in
    the iram30m-scan-*.xml files.

    SET COMMENT ""
    clears the comment.

    NOTE: SET COMMENT can use values of variables, e.g.,
    if 'ii' = 11  and 'imax' = 33 are variables in a loop:
    PAKO> set comment " loop "'ii'" of "'imax'" executing "
    I-SET,  Comment has been set to: loop 11 of 33 executing
    PAKO> start
    Then "loop 11 of 33 executing" will be shown in the monSDH when the
    scan is executed.

\end{verbatim}
\subsubsection{SET DOSUBMIT}
\index{SET!DOSUBMIT}
\begin{verbatim}

    SET DOSUBMIT  YES|NO

    Logical :: doSubmit

    Turn submission of jobs to observing queue on or off.  (compare
    command START).

    IMPORTANT NOTE: to avoid any possible confusion, in each project
    account at the 30-m telescope, only 1 running instance of Pako should
    have SET DOSUBMIT YES!

\end{verbatim}
\subsubsection{SET FOCUS}
\index{SET!FOCUS}
\begin{verbatim}

    SET FOCUS focus

    Real :: focus               ! focus correction [mm]

    Set focus correction in [mm]

\end{verbatim}
\subsubsection{SET LEVEL}
\index{SET!LEVEL}
\begin{verbatim}

    SET LEVEL minimalForStandardOut [ minimalForFile ]

    Integer ::  minimalForStandardOut  !  in range 0 to 9
    Integer ::  minimalForFile         !  in range 0 to 9

    Set minimal "level" for paKo "messages" to be written
    1: interactively to the standard output, i.e., the terminal window
    2: to the message log file pako.mes.

    All paKo "messages" have an associated severity number.  With SET
    LEVEL we can select that only messages with severity higher than
    minimalForStandardOut (minimalForFile) are written.  Very serious
    messages with severity 9 and higher can NOT be turned off.

    The severity number for messages of kind:

    I   is 1 or 2           Informational message
    W   is 3 or 4           Warning       message
    E   is 5 or 6           Error         message
    F   is 7 or higher      Fatal Error   message

    Example: SET LEVEL 5 3

    Has the effect that "I" messages are not shown at all, and only "E"
    and "F" messages are shown in the terminal window.

\end{verbatim}
\subsubsection{SET POINTING}
\index{SET!POINTING}
\begin{verbatim}

    SET POINTING azimuthCorrection [elevationCorrection]

    Real :: azimuthCorrection   !  [arc sec]
    Real :: elevationCorrection !  [arc sec]

    Set pointing corrections in units of [arc sec]
    *  in place of a number: leave the value unchanged

    Example:
    SET POINTING 1.1 2.2

\end{verbatim}
\subsubsection{SET PURPOSE}
\index{SET!PURPOSE}
\begin{verbatim}

    SET PURPOSE purpose
    SET PURPOSE ""

    Purpose     Character(len=24) ! Purpose. Don't use & < >

    Choices for purpose are:

    CALIBRATE FOCUS MAP POINTING TIP

    Set purpose for an observation.  The value of "purpose" is displayed
    in the monSDH display during the execution of each scan, and logged in
    the iram30m-scan-*.xml files.  It may also be used elesewhere, e.g.,
    in data handling software.

    SET PURPOSE ""
    clears the purpose.

\end{verbatim}
\subsubsection{SET 2NDROTATION}
\index{SET!2NDROTATION}
\begin{verbatim}

    SET 2ndRotation rotation

    Real :: rotation               ! rotation angle [deg]

    Set rotation angle for the secondary mirror and Wobbler mechanism [deg].

    The angle is limited to be between -50 and +50 [deg].

    NOTE: Its sense is opposite to the mathematical convention!
    (this will be changed in a future release of the NCS.)

    The rotation angle is relative to the horizontal system.  A value of 0.0
    corresponds to the Wobbler switching purely in Azimuth, i.e., "normal"
    Wobbler switching.

    Observers must inform the operator if they want to use this feature.

    A non-zero values is up to know only meaningful and supported for
    bolometer observations with Wobbler switching and the observing modes:
    POINTING, FOCUS, and OTFMAP.  The OTF map must be set to be in the
    (true-angle) horizontal system and the direction of the OTF subscans
    must agree with that of the 2ndRotation.  (There is a special pako
    script available in the bolometer pool to do this).

    To avoid un-intentional errors, this feature can only be used by "privileged
    users": ask the AOD or the NCS team.

\end{verbatim}
\subsubsection{SET TOPOLOGY}
\index{SET!TOPOLOGY}
\begin{verbatim}

    SET TOPOLOGY topology

    topology   Character(len=24) ! Topology for the overlapping azimuth range

    Choices for topology are:
    LOW HIGH

    Select a "topology" for sources in the overlapping azimuth range
    60 to 100 degrees = 420 to 460 degrees.

    The 30m antenna has azimuth limits of 60 and 460 degrees.  Azimuth 360
    degrees is due North. Therefore there is an overlap range approximately
    toward East-Northeast, which the antenna can reach at a low azimuth 60
    to 100 (from the South) or at a high azimuth 420 to 460 (from the North).

    SET TOPOLOGY LOW  selects to use the azimuth range  60 to 420 degrees
    SET TOPOLOGY HIGH selects to use the azimuth range 100 to 460 degrees

    Note: this is shown in a figure in paKo's manual,
    Section "NCS Explained: Azimuth Topology".


\end{verbatim}
\subsubsection{SET EMIRCHECK}
\index{SET!EMIRCHECK}
\begin{verbatim}


    SET EMIRcheck emirCheck

    emirCheck  Character         !

    Choices for emirCheck are:

    "strict"|"relaxed"|"loose"

    Make the checking of frequency limits less than strict. This allows
    to command frequencies that are completely outside the designed and
    tested range of the receiver bands.

    The standard and recommended limit checking corresponds to "strict".

    THIS MUST BE USED CAREFULLY AND ONLY IN CONSULTATION WITH STAFF
    ASTRONOMERS OR ENGINEERS.


\end{verbatim}
\subsubsection{SET LIMITCHECK}
\index{SET!LIMITCHECK}
\begin{verbatim}


    SET LIMITCHECK limitCheck

    limitCheck  Character(len=24) !

    Choices for limitCheck are:

    "strict"|"relaxed"|"loose"

    Make the checking of some limits less than strict.

    The standard and recommended limit checking corresponds to "strict".

    THIS MUST BE USED CAREFULLY AND ONLY IN CONSULTATION WITH STAFF
    ASTRONOMERS OR ENGINEERS.

    NB: this is a protected command (needs privilege).


\end{verbatim}
\subsubsection{SET USERLEVEL}
\index{SET!USERLEVEL}
\begin{verbatim}


    SET USERLEVEL userLevel

    userLevel  Character(len=24) !

    Choices for userLevel are:

    "beginner"|"normal"|"experienced"

    Sets level of user's experience with paKo and the NCS.  Some features,
    that require special care, are only available if userLevel is set to a
    higher level.


\end{verbatim}
\subsubsection{SET EXAMPLES}
\index{SET!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-set.pako
    !     basic SET EXAMPLES, v 1.1.1 2009-05-18 Hans Ungerechts
    !
    SIC PRIORITY 1 PAKO                         ! PAKO commands get precedence
    !                                           ! over similar GREG commans!
    !
    SET Project   111-22                        ! project ID (project number)
    SET PI       "Dr. Lilo D. Doe"              ! principal investigator
    SET Observer "John Doe"                     !
    SET Operator  Pako                          !
    SET Topology  low                           ! topology for azimuth
    !
    SET Level     3  3                          ! suppress informational message
    !                                           ! ("I-messages") from paKo
    !
    DEVICE image w                              ! for plots
    !
    SHOW                                        ! show the values set with set
    !
    !! NOTE: don't use special characters like <, >, &, accents in the names!
    !!
    !
    ! Id: demo-set2.pako
    !     additional SET EXAMPLES, v 1.1.1 2009-05-08 Hans Ungerechts
    !
    !! SET doSubmit   YES                       ! to allow submission to Queue
    !
    SET Pointing   -1.1 2.2                     ! pointing corrections
    SET Focus      -2.3                         ! focus correction      [mm]
    !
    SHOW                                        ! show the values set with set
    !



\end{verbatim}
\subsection{SHOW}
\index{SHOW}
\begin{verbatim}


      SHOW

      List all parameters that can be set with command SET,
      as well as their current values.

\end{verbatim}
\subsection{SOURCE}
\index{SOURCE}
\begin{verbatim}

    SOURCE sourceName
           [[systemName epoch] lambda beta
              [referenceFrame velocity     ] ]
    SOURCE Body sourceName
                perihelionEpoch ascendingNode      argumentOfPerihelion
                inclination     perihelionDistance eccentricity

    Select a source from the source catalog or specify source parameters
    directly on command the line.

    Character*12  :: sourceName            ! don't use: & < > ( ) /
    Character     :: systemName            !
    [C]Real       :: epoch                 ! in units [years]
                                           ! NOTE: epoch should be J2000.0
    Coordinate    :: lambda                ! longitude
    Coordinate    :: beta                  ! latitude
    Character     :: referenceFrame        ! reference system for velocity
    Real          :: velocity              ! in units [km/s]

    IMPORTANT NOTES:

    sourceName is limited to 12 characters.

    So far only Equatorial J2000.0 coordinates are well tested.
    <<TBD:
    Observations of the Sun and near the Sun are not yet supported.
    >>


    NB: Don't use / & < > in names of sources, lines, projects,
    PI, observer, operator, etc. Don't use ()/ in source names.

    IMPORTANT NOTE ON VELOCITY:

    One should not use very large Doppler velocities (thousands  of  kilome-
    ters)  to  achieve  red-shift  corrections  of  frequencies. Instead one
    should enter the red-shifted frequencies in the line  catalog  (or  with
    the RECEIVER command) and use Doppler velocity of 0.0.

    The alternative approach (with very large Doppler velocities) needs spe-
    cial methods and attention in the data processing, which are "*not*  im-
    plemented  in  CLASS  because it is better to observe in such a way that
    minimum modification to the data is done later on"  (J.  Pety).   For  a
    full  discussion of this question see: Gordon et al. 1992, A&A, 264, 337
    in Sect. 6



    The second form accepts 6 Real arguments to specify the orbital
    elements of a solar system body:
    Body                                ! special keyword -- exactly like this!
    Real       :: perihelionEpoch       ! Julian Date [d]
    Real       :: ascendingNode         ! [deg]
    Real       :: argumentOfPerihelion  ! [deg]
    Real       :: inclination           ! [deg]
    Real       :: perihelionDistance    ! [deg]
    Real       :: eccentricity          !

    If only sourceName is specified, we try to read the other parameters
    from the source catalog specified with CATALOG SOURCE fileName. The
    sourceName in the command must match a source name in the source
    catalog with all characters (no minimum match), but the case is
    ignored for the matching. Example: SOURCE w3oh matches W3OH in the
    source catalog, but SOURCE w3o does not!

    The option: /VELOCITY systemVelocity velocity overrides the values in
    the catalog.

    Epoch can optionally start with a 1-character code "J" or "B" to
    distinguish between "J" and "B" epochs/ equatorial coordinates.  (If
    this code letter is not present, "J" is implied!).

    The coordinates are specified in astronomical sexagesimal format:
    with : as field separator, i.e.:

     hh:mm:ss.ss
    ddd:'':"".""

    Examples:
     12:34:56.78 for  12 hours,   34 minutes,     56.78 seconds
    123:45:67.89 for 123 degrees, 45 arc minutes, 67.89 arc seconds

    For systemName: equatorial and haDec, the longitude, lambda, is
    assumed to be in hours; for all other systems it is assumed to be in
    degrees.  Latitude, beta, is always in degrees.

    Choices for systemName:
    "equatorial"
    "horizontal"

    <<TBD: not yet supported:   >>
    <<TBD: "galactic"           >>
    <<TBD: "apparentEquatorial" >>
    <<TBD: "ecliptic"           >>
    <<TBD: "apparentEcliptic"   >>
    <<TBD: "haDec "             >>

    Choices for referenceFrame:
    "LSR"
    "barycentric"
    "heliocentric"

    <<TBD: not yet supported:    >>
    <<TBD: "3K"                  >>
    <<TBD: "galactocentric"      >>
    <<TBD: "body"                >>
    <<TBD: "geocentric"          >>
    <<TBD: "topocentric"         >>
    <<TBD: "null"                >>

    Planets' names are accepted as a special case, if sourceName is one of:
    "Mercury"
    "Venus"
    "Mars"
    "Jupiter"
    "Saturn"
    "Uranus"
    "Neptune"
    "Pluto"

    Satellites' (moons') names are accepted, if sourceName is one of:
    "Phobos"
    "Deimos"
    "Io"
    "Europa"
    "Ganymede"
    "Callisto"
    "Mimas"
    "Enceladus"
    "Tethys"
    "Dione"
    "Rhea"
    "Titan"
    "Hyperion"
    "Iapetus"
    "Miranda"
    "Ariel"
    "Umbriel"
    "Titania"
    "Oberon"
    "Gabriel"
    "Moon"


\end{verbatim}
\subsubsection{SOURCE /CATALOG}
\index{SOURCE!/CATALOG}
\begin{verbatim}
    /CATALOG catalogName
    /CATALOG *

    Character :: catalogName

    Allows to specify that the search (for a source) should be done
    in the catalog file "catalogName", instead of the catalog specified
    with command CATALOG.  The default file extension is .sou

    /CATALOG *

    Implies that the search will be done in the standard pointing
    source catalog, iram-J2000.sou.

\end{verbatim}
\subsubsection{SOURCE /GREP}
\index{SOURCE!/GREP}
\begin{verbatim}
    /GREP

    Does a "grep" search for the (partial) source name or string in the
    source catalog and lists any matching lines.  This search ignores the
    case.  This is only to help the user search through a source catalog.
    Even if the match is unique, the source found is not selected. (re-enter
    the SOURCE command with the full source name!)

\end{verbatim}
\subsubsection{SOURCE /VELOCITY}
\index{SOURCE!/VELOCITY}
\begin{verbatim}
    /VELOCITY  referenceFrame velocity

    Specify reference frame and source radial velocity

    Character :: referenceFrame    ! reference system for velocity
    Real      :: velocity          ! in units [km/s]

    Choices for referenceFrame:
    "LSR"
    "barycentric"
    "heliocentric"

    <<TBD: not yet supported:    >>
    <<TBD: "3K"                  >>
    <<TBD: "galactocentric"      >>
    <<TBD: "body"                >>
    <<TBD: "geocentric"          >>
    <<TBD: "topocentric"         >>
    <<TBD: "null"                >>

    IMPORTANT NOTE ON VELOCITY:

    One should not use very large Doppler velocities (thousands of
    kilometers) to achieve red-shift corrections of frequencies. Instead
    one should enter the red-shifted frequencies in the line catalog (or
    with the RECEIVER command) and use Doppler velocity of 0.0.

    The alternative approach (with very large Doppler velocities) needs
    special methods and attention in the data processing, which are "*not*
    implemented in CLASS because it is better to observe in such a way
    that minimum modification to the data is done later on" (J. Pety).
    For a full discussion of this question see: Gordon et al. 1992, A&A,
    264, 337 in Sect. 6



\end{verbatim}
\subsubsection{SOURCE EXAMPLES}
\index{SOURCE!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-source.pako
    !     basic SOURCE EXAMPLES,v 1.1.1 2009-05-08 by Hans Ungerechts
    !
    CATALOG SOURCE  demo.sou                ! select source catalog
    !
    SOURCE  NGC7027                         ! select source from catalog
    !! OFFSETS /Clear                       ! optional: clear previously set off
    !
    PAUSE
    !
    !! OTHER WAYS TO SPECIFY A SOURCE:
    !
    SOURCE CALORI /catalog lines-J2000      ! select source from another catalog
    PAUSE
    !
    SOURCE OCET EQ J2000 -
       02:19:20.71 -02:58:36.17 LSR 46.800  ! command-line specification of sour
    PAUSE
    !
    SOURCE Mars                             ! planet Mars
    PAUSE
    !
    SOURCE Moon                             ! our Moon
    PAUSE
    !
    SOURCE Io                               ! Jupiter's satellite "Io"
    PAUSE
    !
    SOURCE Body Pako -                      !
       2455000.0 22.2 33.3 44.4 55.5 0.66   ! solar system body (orbital element
    PAUSE
    !
    SOURCE w3oh                             ! will match W3OH in demo.sou
    !
    !! NOTES: source names must match:
    !!           full source name in catalog or
    !!           full name of planet or satellite
    !!        the case is ignored for source name matching
    !
    RETURN
    !


\end{verbatim}
\subsection{START}
\index{START}
\begin{verbatim}


    START

    Start an observation, i.e., translate its specification to XML
    and submit it to the observing queue.

    Observing jobs are sent to the observing queue only if the observer has
    SET DOSUBMIT YES
    in paKo (see command SET DOSUBMIT) and if the operator has selected
    the current project to be the "current observing queue".

    IMPORTANT NOTE: to avoid any possible confusion, in each project
    account at the 30-m telescope, only 1 running instance of Pako should
    have SET DOSUBMIT YES!

    Example:

    SOURCE ...
    OTFMAP ...
    START              ! will start and OTF map



\end{verbatim}
\subsection{SUBSCAN}
\index{SUBSCAN}
\begin{verbatim}

    SUBSCAN xOffset    yOffset
    SUBSCAN xStart     yStart     xEnd       yEnd
    SUBSCAN xAmplitude yAmplitude frequencyX frequencyY xCenter yCenter phiX phi

    NB: this is a protected command (needs privilege).

    Add to user-defined list of subscans and segments for observing mode "DIY";
    compare command DIY. The subscan command has the 3 main variants above,
    depending on the number of parameters:

    2 --> Track subscan with fixed offsets
    4 --> Linear OTF segment (subscan)
    8 --> Lissajous OTF segment (subscan), IMPORTANT: SEE NOTE BELOW

    Option /TYPE allows to enforce that the command is interpreted for one
    the 3 different types, independant of the number of parameters.

    Option /TUNE allows to specify that a Track subscan will be used to "tune"
    an instrument, e.g., NIKA.

    Real :: xOffset     ! x offset fixed-position TRACK subscan
    Real :: yOffset     ! y offset fixed-position TRACK subscan

    Real :: xStart      ! x offset start  of linear OTF  segment
    Real :: yStart      ! y offset start  of linear OTF  segment
    Real :: xEnd        ! x offset end    of linear OTF  segment
    Real :: yEnd        ! y offset end    of linear OTF  segment

    Real :: xAmplitude  ! x amplitude              Lissajous OTF segment
    Real :: yAmplitude  ! y amplitude              Lissajous OTF segment
    Real :: frequencyX  ! frequency    [Hz]  for x Lissajous OTF segment
    Real :: frequencyY  ! frequency    [Hz]  for y Lissajous OTF segment
    Real :: xCenter     ! x center                 Lissajous OTF segment
    Real :: yCenter     ! y center                 Lissajous OTF segment
    Real :: phiX        ! phase offset [rad] for x Lissajous OTF segment
    Real :: phiY        ! phase offset [rad] for y Lissajous OTF segment

    If an asterisk * appears in place of any parameter, the value will
    remain unchanged from the last valid SUBSCAN command.

    NOTES: pako will make its best effort to "guess" the values for
    unspecified parameters based on the values of its internal variables
    after the previous valid SUBSCAN command.
    Each time a SUBSCAN is accepted without error message, a subscan is
    added to the list; even if the command is only "SUBSCAN" by itself!
    Be careful that a parameter in the command line can refer to different
    variables depending on the type of the segment/subscan, e.g., the 1st
    parameter can refer to xOffset, xStart, or xAmplitude.
    These features should be used with special care, e.g., to experiment
    with the DIYLIST and SUBSCAN commands.
    It is recommended to collect all SUBSCAN commands in a paKo script and
    explicitly specify all parameters for each subscan!

    Before START of a DIY subscanlist, you can enter DIYLIST to review
    pako's I-DIY messages listing the subscan currently defined (this
    requires SET LEVEL 2 or lower), e.g.:
    PAKO> set level 2
    PAKO> diy
    I-DIY,  segments #: 1 to 3
    I-DIY,  1 track on at -400.0 -300.0 arcsec projection 10.0 s
    I-DIY,  2 onTheFly -300.0 -200.0 to 330.0 220.0 arcsec projection 66.0 s
    I-DIY,  3 track on at 440.0 330.0 arcsec projection 10.0 s


    IMPORTANT: LISSAJOUS OTF

    During a Lissajous OTF segment, the position offsets
    x and y as a function of time t are:

    x = xCenter + xAmplitude * SIN(2 Pi frequencyX t + phiX)
    y = yCenter + yAmplitude * SIN(2 Pi frequencyY t + phiY)

    SIN is the usual sine function, Pi is the number Pi.

    xAmplitude yAmplitude xCenter yCenter are in angle units ([arc sec])
    frequencyX frequencyY                 are in [Hz]
    phiX       phiY                       are in [rad]

    Note that the possible frequencies are very low,
    typically 0.01 to 0.15 Hz.

    At the start of a Lissajous subscan, paKo will insert a "ramp" along a
    straight line, i.e., a linear OTF segment, increasing the count of
    segments by 2.  This ramp up starts with speed 0 relative to the
    source and joins smoothly with the start position and velocity of the
    Lissajous segment.  The purpose is to avoid a sudden aceleration at
    the start of the Lissajous segment.  Command DIY lists this inserted
    OTF segment as well as the Lisssajous segment.  The inserted ramp up
    segment and the Lissajous segment become part of the same subscan.

    Lissajous curves with large amplitudes or frequencies can reach the
    antenna's speed and acceleration limits for tracking.  Lissajous
    curves can be executed only for elevations less than a maximum, which
    depends on the Lissajous parameters.  For information, this elevation
    condition is shown by pako. Even below the limits, during very fast
    Lissajous curves the tracking errors will be higher, several arc sec,
    than during most other observations.

    DO NOT TRY TO OBSERVE LISSAJOUS ABOVE THIS MAXIMUM ELEVATION.


\end{verbatim}
\subsubsection{SUBSCAN /CROFLAG}
\index{SUBSCAN!/CROFLAG}
\begin{verbatim}
    /CROFLAG croCode

    Character :: croCode    !   R = off-source Reference
                            !   O = On-source



\end{verbatim}
\subsubsection{SUBSCAN /RAMP}
\index{SUBSCAN!/RAMP}
\begin{verbatim}
            /RAMP      "None"
            /RAMP      "Up"     [tRampUp]
    <<TBD:  /RAMP      "Down"   [tRampDown]   ! not yet implemented >>

    Real       :: tRamp         ! minimal time for ramp

    /RAMP Up tRamp

    /RAMP Up must be used for Lissajous subscans.

    At the start of a Lissajous subscan, paKo will insert a "ramp" along a
    straight line, i.e., a linear OTF segment, increasing the count of
    segments by 2.  This ramp up starts with speed 0 relative to the
    source and joins smoothly with the start position and velocity of the
    Lissajous segment.  The purpose is to avoid a sudden aceleration at
    the start of the Lissajous segment.  Command DIY lists this inserted
    OTF segment as well as the Lisssajous segment.  The inserted ramp up
    segment and the Lissajous segment become part of the same subscan.


    Example:

    SUBSCAN 100 200 0.01 0.02 -10 -20 0.1 0.2 /ramp up 9

    Lissajous subscan with a ramp up of at least 9 [sec].



\end{verbatim}
\subsubsection{SUBSCAN /SYSTEM}
\index{SUBSCAN!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor
    1/cos(elevation) applied to the azimuth offset.  This is the system in
    which OTF maps with Wobbler switching and the bolometer are normally
    done.



\end{verbatim}
\subsubsection{SUBSCAN /TOTF}
\index{SUBSCAN!/TOTF}
\begin{verbatim}
    /TOTF tOtf

    time per OTF subscan or segment

    Real       :: tOtf             ! time

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

    NOTE: this applies to linear and Lissajous OTF subscan segments

\end{verbatim}
\subsubsection{SUBSCAN /TSUBSCAN}
\index{SUBSCAN!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time

    NOTE: this applies to Track subscans

\end{verbatim}
\subsubsection{SUBSCAN /TUNE}
\index{SUBSCAN!/TUNE}
\begin{verbatim}
    /TUNE [yes|no]

    Logical   :: doTune

    "Tune" an instrument, e.g., NIKA.

    NOTE: this applies to Track subscans. If  a  valid  specification  of  a
    TRACK subscan is entered without the option /TUNE, "no" is implied.

\end{verbatim}
\subsubsection{SUBSCAN /TYPE}
\index{SUBSCAN!/TYPE}
\begin{verbatim}
    /TYPE Type

    Specify segment or subscan type.

    Character :: Type                ! one of:
                                     ! TRACK
                                     ! LINEAR
                                     ! LISSAJOUS



\end{verbatim}
\subsection{SWBEAM}
\index{SWBEAM}
\begin{verbatim}


    SWBEAM (no parameters)

    Select beam switching, i.e., switching between 2 positions on the sky
    using the rotating beam-switch chopper wheel. This mode is usually
    only used for POINTING and FOCUS with the heterodyne receivers.

\end{verbatim}
\subsection{SWFREQUENCY}
\index{SWFREQUENCY}
\begin{verbatim}


    SWFREQUENCY fOffset1 [fOffset2]

    Select and set up frequency switching (FS).

    Real      :: fOffset1          ! 1st frequency offset [MHz]
    Real      :: fOffset2          ! 2nd frequency offset [MHz]

    fOffset2 should be set to be = -fOffset1 (symmetric FS).
    This is done by default, if only fOffset1 is specified.
    (Note that then ABS(fOffset1) = FS amplitude = 1/2 FS throw).
    FS  with fOffset2 not equal -fOffset1 is experimental.

    /RECEIVER allows to set fOffset1 and fOffset2 for each connected
    receiver differently.

    Parameters of other options are always the same for all receivers.

    Limits for fOffset1 and fOffset2 are:

      -9 to  +9   with the 3 mm receivers /bands
     -18 to +18   with the 2 mm receivers /bands
     -27 to +27   with the 1 mm receivers /bands


    IMPORTANT NOTES about use of Frequency Switching (FS)

    Frequency Switching (FS) can be very powerful and efficient for some
    projects, e. g., mapping of narrow spectral lines in cold dark clouds
    outside the plane of the Milky Way.  However, before deciding to use
    frequency switching one should consider some potential drawbacks:

    The target lines should be narrow enough so that line signals from the
    2 phases of the switching cycle are well separated.

    The spectral baseline will generally be less flat than in other
    switching modes.

    Some spectral lines are also emitted in the earth's mesosphere, e.g.,
    the mesopheric lines from (12)CO are rather strong, typically several
    [K], and they will be seen in FS spectra taken toward astronomical
    sources with a low Doppler shift. The mesospheric lines will appear at
    a frequency and velocity that correspond to the rest frame of the
    athmosphere, i. e., to good approximation, the observatory.  If,
    e. g., you observe using Doppler corrections for the LSR scale, the
    mesospheric lines will appear in the spectra at -1 * the velocity of
    the Local Standard of Rest relative to the observatory.

    Care must be taken that mesospheric lines are not confused with the
    lines from the astronomical source, which will appear in the spectrum
    at the velocity of the source relative to the LSR.  The ASTRO software
    can calculate the velocity of the LSR relative to the observatory for
    any source and time.  During observations, this velocity is also
    displayed on one of the NCS monitoring windows.

    When observing sources near the plane of the Milky Way, line emission
    from clouds at other velocities than the target source, e. g., other
    spiral arms, can cause confusion.

    In case of any doubt, there is a special report on FS that gives more
    advice!


\end{verbatim}
\subsubsection{SWFREQUENCY /DEFAULTS}
\index{SWFREQUENCY!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{SWFREQUENCY /RECEIVER}
\index{SWFREQUENCY!/RECEIVER}
\begin{verbatim}
    /RECEIVER receiverBand

    Character :: receiverBand   ! receiver / EMIR band

    Choices for receiverBand are:
    E090 E150 E230 E330 HERA1 HERA2

\end{verbatim}
\subsubsection{SWFREQUENCY /TPHASE}
\index{SWFREQUENCY!/TPHASE}
\begin{verbatim}
    /TPHASE tPhase

    time per switching PHASE

    Real       :: tPhase          ! time


\end{verbatim}
\subsubsection{SWFREQUENCY EXAMPLES}
\index{SWFREQUENCY!EXAMPLES}
\begin{verbatim}
    !
    ! SWFREQUENCY EXAMPLES, v1.1 2009-05-11 Hans Ungerechts
    !
    SWFREQUENCY                   /default      ! Defaults
    !
    SWFREQUENCY   -3.8     3.8                  ! for all receiver bands
    !
    SWFREQUENCY   -3.9     3.9  /receiver E090  !  for EMIR band E090
    SWFREQUENCY  -11.7    11.7  /receiver E230  !  for EMIR band E230
    SWFREQUENCY                 /tphase   0.20  !  same for all receivers/bands
    !
    !                                           !  setup frequency switching
    SWFREQUENCY   -3.7          /receiver E090  !  fOffset2 will be   +3.7
    SWFREQUENCY  -11.6          /receiver E230  !  fOffset2 will be  +11.6
    !


\end{verbatim}
\subsection{SWTOTAL}
\index{SWTOTAL}
\begin{verbatim}


    SWTOTAL  (no parameters)

    Select total power, i.e., neither beam, frequency, nor wobbler
    switching. Typically used with OTFMAP with off-source references or
    ONOFF "position switching".



\end{verbatim}
\subsubsection{SWTOTAL /DEFAULTS}
\index{SWTOTAL!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{SWTOTAL /TPHASE}
\index{SWTOTAL!/TPHASE}
\begin{verbatim}
    /TPHASE tPhase

    time per switching PHASE

    Real       :: tPhase          ! time


\end{verbatim}
\subsection{SWWOBBLER}
\index{SWWOBBLER}
\begin{verbatim}


    SWWOBBLER wOffset1 [wOffset2]

    Select and set up wobbler switching using the wobbling secondary
    mirror to switch between 2 positions on the sky.  This is typically
    used with the observing modes POINTING, FOCUS, ONOFF, or --with the
    bolometer-- OTFMAP.

    Real      :: wOffset1          ! 1st wobbler offset (1/2 "throw")
    Real      :: wOffset2          ! 2nd wobbler offset = -wOffset1

    IMPORTANT NOTE: Observers must inform the operator if they want to use
    this feature.

    There is a relation between the maximum allowed Wobbler throw and the
    minimum time per phase: for large throws the switching must be slow,
    i.e., time per phase must be large.  For /timePhase 1 [sec] or longer,
    any wobbler throw is allowed up to the maximum of 240 ["].

    Posssible combinations are, e. g.:

    wOffset1   throw  timePhase
       -22"      44"    0.25 sec
       -22"      44"    1.0  sec
      -120"     240"    1.0  sec
      -120"     240"    2.0  sec

    Note that for OTFMAPs with Wobbler switching, special restoration
    algorithms are needed to recover an image of the source brightness
    distribution. These are available, e. g., in the MOPSIC software.


    If SWWOBBLER and ONOFF are combined in the standard way, we
    effectively take data at 3 positions:

    1. the source position
    2. the source position + throw  (offset in the "true-angle" horizontal syste
    3. the source position - throw  (offset in the "true-angle" horizontal syste

    with throw = ABS(wOffset2-wOffset1).

    Data from 1. are treated as source signal, data from 2 and 3 as
    off-source reference signal.  Note that in the astronomical
    coordinates, positions 2 and 3 will rotate around the source position
    (1).  Therefore one must normally be sure that the extent of the source
    is less than throw-beamWidth (/2).



\end{verbatim}
\subsubsection{SWWOBBLER /DEFAULTS}
\index{SWWOBBLER!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{SWWOBBLER /TPHASE}
\index{SWWOBBLER!/TPHASE}
\begin{verbatim}
    /TPHASE tPhase

    time per switching PHASE

    Real       :: tPhase          ! time


\end{verbatim}
\subsection{TIP}
\index{TIP}
\begin{verbatim}


    TIP [azimuth]

    Specify an antenna tipping (a.k.a., "skydip").

    Real      :: azimuth           ! azimuth of tip

    If azimuth is not specified, the current azimuth of the telescope is
    used.

    NOTE:
    TIP is always and automatically done with switching mode "total power"
    and for bolometer observations the time per phase is fixed at 0.5 [sec]


\end{verbatim}
\subsubsection{TIP /DEFAULTS}
\index{TIP!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{TIP /AIRMASS}
\index{TIP!/AIRMASS}
\begin{verbatim}
    /AIRMASS airmassStart [TO] airmassEnd [BY] airmassStep

    range of airmass for TIP.

    Real      :: airmassStart      !
    Real      :: airmassEnd        !
    Real      :: airmassStep       !

    NOTE 1: elevation = ASIN(1/airmass)

    NOTE 2: for slew-tips, TIP /SLEW:
            airmassStep has no effect
            airmassStart > airmassEnd is allowed; this implies:
            elevation (at start) < elevation (at end), i.e.,
            TIP from low to high elevation.

            (for "traditional" TIP with /SLEW no, airmassStart < airmassEnd,
            i.e., they go from high to low elevation.)


\end{verbatim}
\subsubsection{TIP /TSUBSCAN}
\index{TIP!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time



\end{verbatim}
\subsection{TRACK}
\index{TRACK}
\begin{verbatim}


    TRACK xOffset yOffset

    specify tracking of a single position

    Real      :: xOffset           ! x-offset of "on-source" position
    Real      :: yOffset           ! y-offset of "on-source" position

    NOTES:
    TRACK is normally used for observations with frequency switching
    (SWFREQUENCY); also for some special observations, e.g., of pulsars.
    There is a built-in limit to the time per subscan, currently (2006-07)
    it is 3600 seconds (1 hour).  If for special purposes one needs to
    track a source for a longer time, this can easily be done by using
    several subscans.


\end{verbatim}
\subsubsection{TRACK /DEFAULTS}
\index{TRACK!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{TRACK /SYSTEM}
\index{TRACK!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{TRACK /NSUBSCANS}
\index{TRACK!/NSUBSCANS}
\begin{verbatim}
    /NSUBSCANS nSubscans

    Integer   :: nSubscans         ! number of subscans

\end{verbatim}
\subsubsection{TRACK /TSUBSCAN}
\index{TRACK!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time


\end{verbatim}
\subsubsection{TRACK EXAMPLES}
\index{TRACK!EXAMPLES}
\begin{verbatim}
    !
    ! Id: demo-track.pako
    !     TRACK EXAMPLE,v 1.1.11 2011-11-25 Hans Ungerechts
    !
    @ demo-rx                                   !  demo setup of receivers
    !
    BACKEND /CLEAR                              !  clear previous backends
    BACKEND VESPA 1 0.040 40.0 0.0 E090 hor LI  !  high spectral resolution
    BACKEND VESPA 2 0.040 40.0 0.0 E090 ver LI  !  with VESPA
    BACKEND VESPA 3 0.080 80.0 0.0 E230 hor LI
    BACKEND VESPA 4 0.080 80.0 0.0 E230 ver LI
    !                                           !  REPLACE WITH YOUR SETUP!
    !
    SET ANGLE arcsec                            !
    !
    !                                           !  setup frequency switching
    SWFREQUENCY   -3.9     3.9  /receiver E090  !  for EMIR band E090
    SWFREQUENCY  -11.7    11.7  /receiver E230  !  for EMIR band E230
    SWFREQUENCY                 /tphase   0.20  !  same for all receivers/bands
    !
    CALIBRATE                                 - !
      /AMBIENT                                - !  ambient load
      /COLD                                   - !  cold    load
      /SKY       -600.0   0.0                 - !  sky at offsets -600.0 0.0
      /SYSTEM       projection                - !  system for SKY offsets
      /TCALIBRATE   5.0                         !  time per calibration subscan
    !
    PAUSE "CALIBRATE OK to start? [c/q]"        !  a chance to check
    !
    START                                       !  start
    !
    TRACK           40.0   -30.0           -    !  offsets of on position
      /NSUBSCANS    5                      -    !  number of subscans
      /SYSTEM       projection             -    !  system for offset
      /TSUBSCAN     60                          !  time per subscan
    !
    PAUSE "TRACK SWFREQUENCY OK to start? [c/q]" !  a chance to check
    !
    START                                       !  start
    !
    !! Comments:
    !! we assume here that the source already has been selected,
    !! see: demo-source




\end{verbatim}
\subsection{VLBI}
\index{VLBI}
\begin{verbatim}


    VLBI

    Track a single position for VLBI.

    This observing mode must not be used for other (non-VLBI) observations.

    Some special behaviours are asscociated with the observing mode VLBI:
     - The scan has only one subscan on the (fixed) source position.
     - This subscan will be executed for up to 1 hour.
       In practice it is ended, when the START command is executed for the
       next observation, e.g., when a new VLBI scan, or a POINTING or FOCUS
       is started.
     - Normally, the VLBI field system sends the commands
       SOURCE ...
       VLBI
       START
       directly to paKo, which is running in a special terminal window.  The
       field system sends these commands for the next scan (immediately)
       after the VLBI data recording for the current VLBI target source
       (for the currant scan) is finished.

\end{verbatim}
\subsection{OPTIONS}
\index{OPTIONS}
\begin{verbatim}


    SUMMARY OF OPTIONS FOR PAKO\ COMMANDS:

    (For help on commands say HELP PAKO\ )

    For details say, e.g.,  HELP OPTIONS /CROLOOP
                       or:  HELP OP      /CRO

    To see if a command has a particular option, see the end of the
    HELP for this command.

\end{verbatim}
\subsubsection{OPTIONS /AIRMASS}
\index{OPTIONS!/AIRMASS}
\begin{verbatim}
    /AIRMASS airmassStart [TO] airmassEnd [BY] airmassStep

    range of airmass for TIP.

    Real      :: airmassStart      !
    Real      :: airmassEnd        !
    Real      :: airmassStep       !

    NOTE 1: elevation = ASIN(1/airmass)

    NOTE 2: for slew-tips, TIP /SLEW:
            airmassStep has no effect
            airmassStart > airmassEnd is allowed; this implies:
            elevation (at start) < elevation (at end), i.e.,
            TIP from low to high elevation.

            (for "traditional" TIP with /SLEW no, airmassStart < airmassEnd,
            i.e., they go from high to low elevation.)


\end{verbatim}
\subsubsection{OPTIONS /AMBIENT}
\index{OPTIONS!/AMBIENT}
\begin{verbatim}
    /AMBIENT [yes|no]

    Do a calibration subscan on the ambient temperature load.

    Logical   :: doAmbient        ! default: true

\end{verbatim}
\subsubsection{OPTIONS /APPEND}
\index{OPTIONS!/APPEND}
\begin{verbatim}
    /APPEND [yes|no]

    Append to existing file, do not create a new one.

    Logical   :: doAppend        ! default: false

\end{verbatim}
\subsubsection{OPTIONS /CLEAR}
\index{OPTIONS!/CLEAR}
\begin{verbatim}
    /CLEAR  [yes|no]

    Completely clear a list of connected hardware, e.g., receivers, backends,
    or parameters of the associated command.


\end{verbatim}
\subsubsection{OPTIONS /COLD}
\index{OPTIONS!/COLD}
\begin{verbatim}
    /COLD [yes|no]

    Do a calibration subscan on the cold temperature load.

    Logical   :: doCold           ! default: true

\end{verbatim}
\subsubsection{OPTIONS /CONNECT}
\index{OPTIONS!/CONNECT}
\begin{verbatim}

    /CONNECT [yes|no]

    connect (or disconnect) the specified hardware, e.g.,
    backend or backend part.
\end{verbatim}
\subsubsection{OPTIONS /CROLOOP}
\index{OPTIONS!/CROLOOP}
\begin{verbatim}
    /CROLOOP croLoop

    sequence of R = off-source Reference
                O = On-source subscans

    Character :: croLoop

    Example:
    /croLoop ROOR

\end{verbatim}
\subsubsection{OPTIONS /DEFAULTS}
\index{OPTIONS!/DEFAULTS}
\begin{verbatim}
    /DEFAULTS  [yes|no]

    Restore default values for all parameters and options.

\end{verbatim}
\subsubsection{OPTIONS /DEROTATOR}
\index{OPTIONS!/DEROTATOR}
\begin{verbatim}
    /DEROTATOR angle system

    Specify derotator angle for HERA

    Real      :: angle             ! in units [deg] (!)
    Character :: system            !

    Choices for system:
    "Nasmyth"
    "horizon"
    "equatorial"
    "frame"                        ! same as Nasmyth
    "sky"                          ! same as equatorial

    NOTES: The last 2 are for consistency with old control system and HERA conve
    This option works only for RECEIVER HERA1 or RECEIVER HERA2 (of course it's
    same angle for HERA1 and HERA2).

\end{verbatim}
\subsubsection{OPTIONS /DISCONNECT}
\index{OPTIONS!/DISCONNECT}
\begin{verbatim}

    /DISCONNECT

    disconnect the specified hardware, e.g.,
    backend or backend part.
\end{verbatim}
\subsubsection{OPTIONS /DOPPLER}
\index{OPTIONS!/DOPPLER}
\begin{verbatim}
    /DOPPLER doppler

    Character :: doppler           ! apply doppler correction?
                                   ! choices: DOPPLER|FIXED

\end{verbatim}
\subsubsection{OPTIONS /DOUBLEBEAM}
\index{OPTIONS!/DOUBLEBEAM}
\begin{verbatim}
    /DOUBLEBEAM [yes|no]

    Pointing: do a "double-beam" pointing

    Logical    :: doDoubleBeam

    This is valid only for pointing with Wobbler switching (SWWOBBLER).

    This option has an effect only if SET 2nRotation 0.0

\end{verbatim}
\subsubsection{OPTIONS /EFFICIENCY}
\index{OPTIONS!/EFFICIENCY}
\begin{verbatim}
    /EFFICIENCY forwardEfficiency beamEfficiency

    specify forward and beam efficiencies

    Real      :: forwardEfficiency !
    Real      :: beamEfficiency    !

\end{verbatim}
\subsubsection{OPTIONS /FILE}
\index{OPTIONS!/FILE}
\begin{verbatim}
    /FILE fileName

    Specify file name.

    Character :: fileName          !

\end{verbatim}
\subsubsection{OPTIONS /FINE}
\index{OPTIONS!/FINE}
\begin{verbatim}

    /FINE

    for BACKEND FTS select the "fine" mode with a resolution of ~ 0.049 [MHz]

    Note: with the option /DEFAULT or the short syntax, this allows to
    select the fine resolution without explicitly entering the values of
    resolution and bandwidth.


\end{verbatim}
\subsubsection{OPTIONS /FOCUS}
\index{OPTIONS!/FOCUS}
\begin{verbatim}
    /FOCUS f1 f2 [... f18] [direction]
    or
    /FOCUS NO

    [For Lissajous] designate the purpose of the scan to be "Focus", i.e.,
    to determine focus corrections.  A subscan with a Lissajous curve will
    be executed for each focus offset specified.

    Real      :: f1 f2 [... f18]   ! focus offsets [mm]
                                   ! (at least 2, at most 18 values)
    Character :: direction         ! direction of focus offsets, one of:
                                   ! X
                                   ! Y
                                   ! Z

    /FOCUS NO clears the option /FOCUS.
\end{verbatim}
\subsubsection{OPTIONS /GAINIMAGE}
\index{OPTIONS!/GAINIMAGE}
\begin{verbatim}
    /GAINIMAGE gainImage [dB]

    Specify the gain ratio of image to signal sidebands.

    Real      :: gainImage         !

    If "dB" is added after the value, the ratio is assumed to be in dB,
    otherwise a decimal fraction.

    Simple standard values for these gain ratios can be found on the IRAM
    30-m web pages (Telescope Summary). If you need accurate values for the
    single-pixel heterodyne receivers, you should measure them with:
    CALIBRATE /GAINIMAGE receiverName

\end{verbatim}
\subsubsection{OPTIONS /GREP}
\index{OPTIONS!/GREP}
\begin{verbatim}
    /GREP

    Does a "grep" search for the (partial) source name or string in the
    source catalog and lists any matching lines.  This search ignores the
    case.  This is only to help the user search through a source catalog.
    Even if the match is unique, the source found is not selected. (re-enter
    the SOURCE command with the full source name!)

\end{verbatim}
\subsubsection{OPTIONS /GRID}
\index{OPTIONS!/GRID}
\begin{verbatim}
    /GRID [yes|no]

    Do a calibration subscan on a grid in front of the cold temperature load.
    This is a special calibration option for polarization observations.

    Logical   :: doGrid           ! default: true

    IMPORTANT NOTE:
    remember to turn this option off again for normal calibrations:
    e.g., CALIBRATE /GRID NO or CALIBRATE /DEFAULT.

\end{verbatim}
\subsubsection{OPTIONS /HORIZONTAL}
\index{OPTIONS!/HORIZONTAL}
\begin{verbatim}
    /HORIZONTAL [sb1 [sb2]]
    /HORIZONTAL n[one]

    EMIR subbands for Horizontal polarization.


    This option applies only to EMIR.

    Character   :: sb1, sb2   ! for EMIR: LO|LI|UI|UO

    This option selects which EMIR subband(s) of this polarization will be
    transmitted through IF cables 1 to 4.  Note that some backends, NBC,
    4MHz, WILMA, VESPA, can only be connected to IF cables 1 to 4, i.e.,
    only to the EMIR subbands selected with the RECEIVER command.

    For each EMIR band and polarization, at most 2 subbands can be
    transmitted through IF cables 1 to 4.  Which combinations of EMIR
    bands, polarizations, and subbands are possibble is determined by the
    hardware of the EMIR IF switching box.  See the EMIR documentation for
    details.

    If no subband is explicitly specified with this option, paKo will
    assume that for this polarization the same single subband SB is
    requested as specified for the main parameters (frequency, tuning) of
    the RECEIVER command for this EMIR band.


    /HORIZONTAL n[one] means that from this polarization no subband
    will be transported through IF cables 1 to 4.

\end{verbatim}
\subsubsection{OPTIONS /MODE}
\index{OPTIONS!/MODE}
\begin{verbatim}

    /MODE mode

    Character :: mode                ! backend mode

    Choices for mode are:
    SIMPLE                           ! simple (standard)
    PARALLEL                         ! parallel mode
    POLARIZATION                     ! polarimetry

    Select special mode for VESPA.
    See VESPA user's guide for details.

    For EMIR, /MODE PARALLEL or /MODE POLARIZATION connect VESPA
    to the same band and subband in both polarizations; they must
    previously have been selected with the RECEIVER command. For
    exmples, see:
    HELP BACKEND Examples

\end{verbatim}
\subsubsection{OPTIONS /NOTF}
\index{OPTIONS!/NOTF}
\begin{verbatim}
    /NOTF nOtf

    Integer   :: nOtf              ! number of OTF (on-the-fly) subscans

\end{verbatim}
\subsubsection{OPTIONS /NSUBSCANS}
\index{OPTIONS!/NSUBSCANS}
\begin{verbatim}
    /NSUBSCANS nSubscans

    Integer   :: nSubscans         ! number of subscans

\end{verbatim}
\subsubsection{OPTIONS /PERCENTAGE}
\index{OPTIONS!/PERCENTAGE}
\begin{verbatim}

    /PERCENTAGE percentage

    Real :: percentage  !  percentage of bandwidth to use

    This is a special option for the autocorrelators, VESPA and WILMA.

    For autocorrelators normally some channels at both ends of the band
    are blanked because they do not contain usable data, and only the
    central 'percentage' of the "theoretical" bandwidth is used, typically
    about 90%.  Reasonable conservative defaults are automatically
    applied: in general 90%, but 82% for VESPA with bandwidth 640.  This
    option allows the observer to adjust the percentage for special
    purposes.

    For WILMA connected to EMIR, the useful bandwidth is 3720 MHz,
    and counted as 100%.

    See VESPA user's guide for details.

\end{verbatim}
\subsubsection{OPTIONS /POINTING}
\index{OPTIONS!/POINTING}
\begin{verbatim}
    /POINTING [YES|NO]

    Logical   :: doPointing      ! default: no

    [For Lissajous] designate the purpose of the scan to be "Pointing",
    i.e., to determine pointing corrections.

    /POINTING NO clears the option /POINTING.
\end{verbatim}
\subsubsection{OPTIONS /RECEIVER}
\index{OPTIONS!/RECEIVER}
\begin{verbatim}
    /RECEIVER receiverBand

    Character :: receiverBand   ! receiver / EMIR band

    Choices for receiverBand are:
    E090 E150 E230 E330 HERA1 HERA2

\end{verbatim}
\subsubsection{OPTIONS /REFERENCE}
\index{OPTIONS!/REFERENCE}
\begin{verbatim}
    /REFERENCE xOffsetR yOffsetR [systemNameRef]
    or
    /REFERENCE NO                  ! no reference

    position of off-source reference subscans

    Real      :: xOffsetR          ! x-offset
    Real      :: yOffsetR          ! y-offset
    Character :: systemNameRef     ! name of system
                                   ! see /SYSTEM for choices

    NOTE: with the usage /REFERENCE xOffsetR yOffsetR, both parameters are requi
    but you can replace either parameter with * to leave it unchanged.

\end{verbatim}
\subsubsection{OPTIONS /SCALE}
\index{OPTIONS!/SCALE}
\begin{verbatim}
    /SCALE scale

    Select the calibration intensity scale.

    Character :: scale             ! choices: ANTENNA|BEAM

    If scale is "ANTENNA", the scale is antenna temperature.
    If scale is "BEAM", the scale is (main) beam temperature.


\end{verbatim}
\subsubsection{OPTIONS /SKY}
\index{OPTIONS!/SKY}
\begin{verbatim}
    /SKY xOffsetC yOffsetC
    or
    /SKY NO                        ! do not do sky calibration

    Do a calibration subscan on sky.

    Real      :: xOffsetC          ! x-offset
    Real      :: yOffsetC          ! y-offset

    NOTES: with the usage /SKY xOffsetC yOffsetC, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.
    The system for the offsets is selected through the option /SYSTEM.

\end{verbatim}
\subsubsection{OPTIONS /SPEED}
\index{OPTIONS!/SPEED}
\begin{verbatim}
    /SPEED speed1 [speed2]

    speed of OTF subscans

    Real      :: speed1            ! speed at start
    Real      :: speed2            ! speed at end

    For OTFMAP speed2 = speed1.

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{OPTIONS /STEP}
\index{OPTIONS!/STEP}
\begin{verbatim}
    /STEP dx dy

    Step (shift or translation)  between lines in a map.

    Real      :: dx                ! shift in x-offsets
    Real      :: dy                ! shift in y-offsets

\end{verbatim}
\subsubsection{OPTIONS /SWWOBBLER}
\index{OPTIONS!/SWWOBBLER}
\begin{verbatim}
    /SWWOBBLER [yes|no]

    (option of command ONOFF)

    set parameters appropriate for on-off Wobbler switching

    Logical   :: doSwWobbler

    If switching mode SWWOBBLER has been selected, the following parameters
    of ONOFF are set according to wOffset1 and wOffset2:

    ONOFF
          xOffset        is set to: -wOffset1
          yOffset        is set to:  0.0

    /REFERENCE           is set to:  Yes
          xOffsetR       is set to: -wOffset2
          yOffsetR       is set to:  0.0
          systemNameRef  is set to:  TRUEHORIZON

    /SYSTEM
          systemName     is set to:  TRUEHORIZON

    NOTE: in this case the values selected by /SWWOBBLER overrule the
    corresponding values specified directly in the command.

    NOTE: To do ONOFF with Wobbler switching and other (unconventional)
    values for the parameters listed above, simply specify the values
    using command ONOFF with option /SWWOBBLER NO (not recommended).

    NOTE: If the selected switching mode is SWWOBBLER and if the option
    /SWWOBBLER is no explicitly given, it will be assumed to be .True. (Yes),
    If the selected switching mode is not SWWOBBLER and if the option
    /SWWOBBLER is no explicitly given, it will be assumed to be .False. (No),

\end{verbatim}
\subsubsection{OPTIONS /SYMMETRIC}
\index{OPTIONS!/SYMMETRIC}
\begin{verbatim}
    /SYMMETRIC [yes|no]

    Logical   :: doSymmetric      ! default: no

    (For ONOFF) select a subscan sequence that is "symmetric" in time.
    This requires that the number of subscans is a multiple of 4.

    Example for ONOFF with /SYMMETRIC no     /SYMMETRIC yes
    1st subscan:                      OFF               OFF
    2nd  "                            ON                ON
    3rd  "                            OFF               ON
    4th  "                            ON                OFF
    (and so on)

    NOTE that this does not in anyway change the positions
    of the ON-source and OFF-source subscans!

\end{verbatim}
\subsubsection{OPTIONS /SYSTEM}
\index{OPTIONS!/SYSTEM}
\begin{verbatim}
    /SYSTEM systemName

    Name of system for offsets.

    Character :: systemName          ! name of system, one of:
                                     ! PROJECTION
                                     ! TRUEHORIZON
                                     ! NASMYTH

    <<TBD:                           ! DESCRIPTIVE>>
    <<TBD:                           ! BASIS>>
    <<TBD:                           ! EQUATORIAL>>
    <<TBD:                           ! HADECL>>
    <<TBD:                           ! HORIZONTAL>>

    PROJECTION for now means only the standard simple "radio" projection
    offsets in the chosen coordinate system. This is normally the
    astronomical system of offsets in which point-by-point (TRACK, ONOFF)
    or on-the-fly (OTFMAP) maps are made.

    TRUEHORIZON means the horizontal system with a factor 1/cos(elevation)
    applied to the azimuth offset.

    NASMYTH are special offsets to point an off-center pixel of a
    focal-plane array receiver (bolometer, HERA) to the commanded
    astronomical position, e.g., to use an off-center pixel for pointing,
    focus, ONOFF.

    IMPORTANT NOTE: projection, trueHorizon

       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM projection,
       OFFSETS ... /SYSTEM projection is ignored (not used).
       If the observing mode (LISSAJOUS, ONOFF, OTFMAP, ...)
       is in /SYSTEM trueHorizon,
       OFFSETS ... /SYSTEM trueHorizon is ignored (not used).

    IMPORTANT NOTE: OFFSETS   /SYSTEM Nasmyth


       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are specified in pako,
       the values xOffset yOffset are used during the observations.
       (this inludes the case that they are explicitly set to 0.0).
       It is up to the observer to make sure that they are "correct".
       (in pakoDisplay /SYS Nasmyth will be highlighted as yellow alert.)

       If OFFSETS xOffset yOffset /SYSTEM Nasmyth are not specified
       (cleared), for the MAMBO bolometer, Nasmyth offsets are used
       automatically according to the selected bolometer channel (pixel).

\end{verbatim}
\subsubsection{OPTIONS /TCALIBRATE}
\index{OPTIONS!/TCALIBRATE}
\begin{verbatim}
    /TCALIBRATE tCalibrate

    Time per CALIBRATE subscan.

    Real       :: tCalibrate       ! time

\end{verbatim}
\subsubsection{OPTIONS /TOTF}
\index{OPTIONS!/TOTF}
\begin{verbatim}
    /TOTF tOtf

    time per OTF subscan or segment

    Real       :: tOtf             ! time

    In commands like OTFMAP that have options /SPEED and /TOTF, either
    option /SPEED or /TOTF can be used, the values of the other option are
    then implied!

\end{verbatim}
\subsubsection{OPTIONS /TPHASE}
\index{OPTIONS!/TPHASE}
\begin{verbatim}
    /TPHASE tPhase

    time per switching PHASE

    Real       :: tPhase          ! time

\end{verbatim}
\subsubsection{OPTIONS /TREFERENCE}
\index{OPTIONS!/TREFERENCE}
\begin{verbatim}
    /TREFERENCE tReference

    time per off-source reference

    Real       :: tReference       ! time

\end{verbatim}
\subsubsection{OPTIONS /TSUBSCAN}
\index{OPTIONS!/TSUBSCAN}
\begin{verbatim}
    /TSUBSCAN tSubscan

    time per subscan

    Real       :: tSubscan         ! time

\end{verbatim}
\subsubsection{OPTIONS /TEMPLOAD}
\index{OPTIONS!/TEMPLOAD}
\begin{verbatim}
    /TEMPLOAD tempColdLoad tempAmbientLoad
    /TEMPLOAD L[OOKUP]     L[OOKUP]
    /TEMPLOAD *            ...

    Set effective temperatures for the calibration loads at cold and ambient
    temperature.

    Real      :: tempColdLoad      !
    Real      :: tempAmbientLoad   !

    NEW LOGIC FOR SINGLE-PIXEL SIS RECEIVERS (FROM SUMMER 2007, paKo v1.0.7)

    If a numerical value is entered for tempColdLoad or tempAmbientLoad,
    that value is used for calibration calculations.

    Instead of specifying a value one may enter the string L(OOKUP) for
    tempColdLoad and/or tempAmbientLoad.  This is shown in the pakoDisplay
    by the letter "L" instead of a number.

    In this case, during the execution of the observations, the NCS will
    use the "best-known" values for the corresponding load temperature(s).
    For tempColdLoad this is based on a lookup table, for tempAmbientLoad
    it is derived from a measurement of the physical temperature.

    The lookup table for tempColdLoad normally is valid for the standard
    calibration system with a closed-cycle cooling system.

    A * can be substituted for tempColdLoad, which means to leave the
    value for tempColdLoad unchanged from the previous RECEIVER command.

    IF THE OBSERVERS HAVE ANY DOUBT ABOUT THIS, THEY SHOULD ASK A RECEIVER
    ENGINEER FOR THE CORRECT VALUE AND ENTER IT EXPLICITLY.


    NOTE: FOR HERA The new logic is not yet available. However, for HERA
    "best-known" values are always used during the execution of the
    observations. This is the same logic as in pevious versions of paKo/NCS.


\end{verbatim}
\subsubsection{OPTIONS /TUNE}
\index{OPTIONS!/TUNE}
\begin{verbatim}
    /TUNE xOffsetT yOffsetT
    or
    /TUNE NO                  ! no tune subscan

    Tune subscan at the specified offsets, before any other subscans.

    Real      :: xOffsetT          ! x-offset for tune subscan
    Real      :: yOffsetT          ! y-offset for tune subscan

    NOTE: with the usage /TUNE xOffsetT yOffsetT, both parameters are required,
    but you can replace either parameter with * to leave it unchanged.

\end{verbatim}
\subsubsection{OPTIONS /TTUNE}
\index{OPTIONS!/TTUNE}
\begin{verbatim}
    /TTUNE tTune

    time per TUNE subscan

    Real       :: tTune             ! time

\end{verbatim}
\subsubsection{OPTIONS /VELOCITY}
\index{OPTIONS!/VELOCITY}
\begin{verbatim}
    /VELOCITY  referenceFrame velocity

    Specify reference frame and source radial velocity

    Character :: referenceFrame    ! reference system for velocity
    Real      :: velocity          ! in units [km/s]

    Choices for referenceFrame:
    "LSR"
    "barycentric"
    "heliocentric"

    <<TBD: not yet supported:    >>
    <<TBD: "3K"                  >>
    <<TBD: "galactocentric"      >>
    <<TBD: "body"                >>
    <<TBD: "geocentric"          >>
    <<TBD: "topocentric"         >>
    <<TBD: "null"                >>

    IMPORTANT NOTE ON VELOCITY:

    One should not use very large Doppler velocities (thousands of
    kilometers) to achieve red-shift corrections of frequencies. Instead
    one should enter the red-shifted frequencies in the line catalog (or
    with the RECEIVER command) and use Doppler velocity of 0.0.

    The alternative approach (with very large Doppler velocities) needs
    special methods and attention in the data processing, which are "*not*
    implemented in CLASS because it is better to observe in such a way
    that minimum modification to the data is done later on" (J. Pety).
    For a full discussion of this question see: Gordon et al. 1992, A&A,
    264, 337 in Sect. 6


\end{verbatim}
\subsubsection{OPTIONS /VERTICAL}
\index{OPTIONS!/VERTICAL}
\begin{verbatim}

    /VERTICAL [sb1 [sb2]]
    /VERTICAL n[one]

    EMIR subbands for Vertical polarization


    This option applies only to EMIR.

    Character   :: sb1, sb2   ! for EMIR: LO|LI|UI|UO

    This option selects which EMIR subband(s) of this polarization will be
    transmitted through IF cables 1 to 4.  Note that some backends, NBC,
    4MHz, WILMA, VESPA, can only be connected to IF cables 1 to 4, i.e.,
    only to the EMIR subbands selected with the RECEIVER command.

    For each EMIR band and polarization, at most 2 subbands can be
    transmitted through IF cables 1 to 4.  Which combinations of EMIR
    bands, polarizations, and subbands are possibble is determined by the
    hardware of the EMIR IF switching box.  See the EMIR documentation for
    details.

    If no subband is explicitly specified with this option, paKo will
    assume that for this polarization the same single subband SB is
    requested as specified for the main parameters (frequency, tuning) of
    the RECEIVER command for this EMIR band.


    /VERTICAL n[one] means that from this polarization no subband
    will be transported through IF cables 1 to 4.

\end{verbatim}
\subsubsection{OPTIONS /WIDTH}
\index{OPTIONS!/WIDTH}
\begin{verbatim}
    /WIDTH width

    Select receiver setup for WIDE or NARROW bandwidth mode.

    Character :: width             ! width. choices: WIDE|NARROW

    NOTE: Option /WIDTH NARROW changes the (local oscillator) setup of
    receivers HERA1 and HERA2 in such a way
    that a line in the center of the receiver bandwidth appears in the
    center of the bands of the Backends 1MHz (with 256 or 512 MHz
    bandwidth) and VESPA.

    Spectrometers with 1GHz bandwidth normally require /WIDTH WIDE.


\end{verbatim}
\subsubsection{OPTIONS /ZIGZAG}
\index{OPTIONS!/ZIGZAG}
\begin{verbatim}
    /ZIGZAG [yes|no]

    alternate direction between lines in a map

    Logical    :: doZigzag


\end{verbatim}
