1 Language
              LAS\ Command Language Summary
    (+ indicates a NEW command and - an obsolete command)

     ACCUMULATE         Add R and T observation.
     AVERAGE            Average all the observations of the current index.
     BASE [arg]         Subtract a baseline.
     BOX                Draw a frame for data.
     CALIBRATE          [Re-]Calibrate a spectrum.
     CATALOG            Load a line catalog
    +CONSISTENCY        Check the consistency of the current index
     COPY               Write the current index into output file.
     DROP num [ver]     Take a scan out of the current index.
     DUMP               List some informations on the R spectrum.
     EXTRACT X1 X2 [U]  Extract a subsection of the R spectrum.
     FILE type name     Define the input/output files.
     FIND               Search the input file for observations.
     FITS               Write or read a fits file
     FOLD               Fold a Frequency Switched spectrum.
     GET [N]            Read a scan in the input file.
     HEADER             Display some header information on the R spectrum.
     IGNORE List        Ignore scans from the Input file.
     LIST [in|out]      List header information about an ensemble of scans.
    +LOAD               Build a 2D set of spectra from INDEX
     MODIFY             Edit and change the scan header.
     MULTIPLY fact      Multiply the R spectrum by fact.
     NEW_DATA           Wait until new data present in input file.
     PLOT               Plot the observation in R, with box and title.
    -RECORD             Obsolete
     SAVE [name]        Save the current parameters.
     SET                Enter a value for a parameter.
     SHOW Arg           Display some parameter.
     SPECTRUM [Yoff]    Plot the R observation.
     SWAP               Exchange the contents of the R and T buffers.
     TAG Qual List      Change the quality of scans in the Output file.
     TITLE              Write a header above the plotted frame.
     UPDATE             Update R in the output file.
     WRITE [Obs]        Write R in the output file.
1 ACCUMULATE
        LAS\ACCUMULATE  [/RESAMPLE  [NX  Xref  Xval  Xinc  Unit]]  [/NOCHECK
    [SOURCE|POSITION|LINE|SPECTROSCOPY|CALIBRATION]]
        LAS\ACCUMULATE /2010

    ACCUMULATE /2010 uses the old (obsolescent) averaging engine (as of year
    2010). No options are allowed in this mode.

    ACCUMULATE  is used to add a pair of spectra together. The T spectrum is
    added to the R spectrum using the current weighting  function  (see  SET
    WEIGHT).  On  return  R contains the sum spectrum, and T the observation
    previously in R. To add more than 2 spectra, you should build  an  index
    and  AVERAGE  it  in a single step instead (this will prevent cumulative
    resamplings, respect the respective weights, and preserve  at  best  the
    noise properties).

    The  spectra  are added channel by channel by default, if possible. Else
    the option /RESAMPLE must be invoked (see subtopic for details).

    ACCUMULATE checks the consistency between R and T, in particular the po-
    sitional  coincidence  and  calibration  homogeneity  according  to  SET
    [NO]MATCH and SET CALIBRATION respectively. The option  /NOCHECK  allows
    to  disable  some (using one or several names) or all (no name given) of
    these checks.

    For EQUAL weights, ACCUMULATE computes the sum of the two  spectra,  al-
    lowing  addition  of  an ensemble of spectra after division by the total
    number of spectra. For other weightings, ACCUMULATE computes the average
    of the two spectra.

    ACCUMULATE  also works on Continuum drift. The alignement may be Channel
    or Position in this case.
2 /RESAMPLE
        LAS\ACCUMULATE /RESAMPLE [NX Xref Xval Xinc Unit]

    Without this option, R and T will be added channel by channel. A consis-
    tency  test  will  check  that they both have the same X axes. SET ALIGN
    values are ignored in this case. Prefer  this  solution  when  possible,
    since it is faster and safer.

    With the /RESAMPLE option, the X axis of the output sum will be automat-
    ically computed according to the alignment mode (SET ALIGN). In particu-
    lar,  the  output  spectrum has the coarsest resolution of the two input
    spectra. Those are then internally resampled and added on this new axis.

    A  custom  output  X axis can be given with the syntax /RESAMPLE NX Xref
    Xval Xinc Unit. The input spectra are internally resampled and added  on
    this  axis.  See HELP RESAMPLE for possible uses and caveats. The output
    resolution can not be better than the coarsest resolution of  the  input
    spectra to avoid oversampling.

    Remember that if it is enabled, the resampling is time consuming and has
    non trivial effects on the spectra noise.
1 AVERAGE
        LAS\AVERAGE  [/RESAMPLE  [NX  Xref  Xval   Xinc   Unit]]   [/NOCHECK
    [SOURCE|POSITION|LINE|SPECTROSCOPY|CALIBRATION]]
        LAS\AVERAGE /2010 [/NOMATCH]

    AVERAGE  /2010  uses  the old (obsolescent) averaging engine (as of year
    2010). The only option allowed in this mode is /NOMATCH.

    Average all the spectra of the current index using the current weighting
    function  (see  SET WEIGHT). The spectra are added channel by channel by
    default, if possible. Else the option /RESAMPLE  must  be  invoked  (see
    subtopic for details).

    Bad  channels are handled according to SET BAD. A sum may be interrupted
    by <^C>, but the result is then undefined.

    The command checks the consistency of the index, in particular the posi-
    tional   coincidence   and  calibration  homogeneity  according  to  SET
    [NO]MATCH and SET CALIBRATION respectively. The option  /NOCHECK  allows
    to  disable  some (using one or several names) or all (no name given) of
    these checks.

    AVERAGE also works on Continuum drift. The alignement may be Channel  or
    Position in this case.
2 /RESAMPLE
        LAS\AVERAGE /RESAMPLE [NX Xref Xval Xinc Unit]

    Without this option, all the spectra will be added channel by channel. A
    consistency test will check that they both have the  same  X  axes.  SET
    ALIGN  values are ignored in this case. Prefer this solution when possi-
    ble, since it is faster and safer.

    With the /RESAMPLE option, the X axis of the output sum will be automat-
    ically computed according to the alignment mode (SET ALIGN). In particu-
    lar, the output spectrum has the coarsest resolution of the input  spec-
    tra. Those are then internally resampled and added on this new axis.

    A  custom  output  X axis can be given with the syntax /RESAMPLE NX Xref
    Xval Xinc Unit. The input spectra are internally resampled and added  on
    this  axis.  See HELP RESAMPLE for possible uses and caveats. The output
    resolution can not be better than the coarsest resolution of  the  input
    spectra to avoid oversampling.

    Remember that if it is enabled, the resampling is time consuming and has
    non trivial effects on the spectra noise.
1 BASE
        LAS\BASE [Deg] [/PLOT [Ipen]] [/INDEX] [/OBS] [/CONTINUUM [Flux]]
        LAS\BASE SINUS Amplitude Period Phase [/PLOT [Ipen]]
        LAS\BASE LAST [/PLOT [Ipen]]

    When working on single spectra, BASE copies R  into  T,  then  subtracts
    from  R a polynomial baseline of degree Deg, or a sinusoidal baseline if
    the first argument is SINUS. Zones defined by the SET WINDOW command are
    not  used to fit the baseline. The T content may be recovered with SWAP.

    BASE SINUS Amplitude Period Phase
    (Phase is in the same unit as the period, usually km/s or MHz)  Subtract
    a  sinusoid.  Minimization will be done including also a linear baseline
    in addition to the sinusoid.

    BASE LAST
    Use the last determined baseline instead of computing a new one. It  can
    be  useful  to find a baseline from one backend and apply it to another.
    This also applies for sinusoidal baselines. 0th and 1st order  polynomi-
    als, and sinus fit are extrapolated if the R spectrum extends beyond the
    LAST spectrum limits. 2nd order (and higher) polynomials are not extrap-
    olated and the edge values are used beyond the LAST spectrum limits.

    BASE /PLOT
    Plot this baseline after the minimization, using the Ipen-th pen proper-
    ties. The pencil 2 (red at startup) is used by default.

    BASE /INDEX
    Subtracts a baseline to all records that have been loaded.  This  option
    is  not  needed if SET ACTION INDEX. /PLOT and /INDEX options are incom-
    patibles.

    BASE /OBS
    indicate that the baseline is to be fitted to the current R  buffer  ob-
    servations.  This  option  is not needed if the action level is OBS (de-
    fault). /OBS and /INDEX are incompatible.

    BASE /CONTINUUM [Flux]

    1) Divide the spectrum by the baseline (rather than subtracting it), and
    then 2) multiply by the average flux. This is useful to keep the contin-
    uum level, when continuum is present and variations of atmospheric emis-
    sion  are  properly subtracted out by fast enough switching.  This is of
    course the case for correlation spectra (e.g. coming from an interferom-
    eter). The continuum level will be adjusted to the value of the argument
    `Flux', if present; e.g. /CONTINUUM 1.0 will produce a spectrum of line-
    to-continuum ratio. BASE /CONTINUUM does not work with BASE LAST or BASE
    SINUS.
1 BOX
        LAS\BOX [Arg1] [Arg2] [Arg3] [Arg4] [/UNIT  Type  [UPPER]]  [/INDEX]
    [/OBS]

    BOX  draws  a frame for the spectra. The units and limits are determined
    according to the options of the SET command (SET MODE ; SET  UNIT),  and
    the box size governed by SET BOX.

    Arg1(2)  modify the labelling of the lower (left) axis
             = P for parallel   labels (default for X axis)
             = O for orthogonal labels (default for Y axis)
             = N for no labels
    Arg3     indicates that the ticks are In or Out ofthe box
    Arg4     controls the labelling of the upper X axis and
             may have the same values as Arg1 or 2 (P, O, N).

    The default is BOX P O I

    /UNIT
        If  present, it modifies (with no permanent action) the units of the
        X axis, or only of the upper X axis if UPPER is specified. Type  may
        be  also IMAGE to get image-side-band frequency units. For Continuum
        data, the /UNIT command has no effect, but the unit is controlled by
        the  SET  ANGLE  command.  /INDEX produces a box suited for 2D color
        plot with a wedge (the Y-left axis gives the number of spectra).

    /OBS
        Plot a box for a single spectrum.

    /INDEX
        Plot a box suited for 2D display: Y axis is the  temperature  scale,
        and  Z  axis  is the observation number. All three axis (X, Y and Z)
        may be defined by using the SET MODE command.
1 CALIBRATE
        LAS\CALIBRATE [KEY val] [KEY val] ...
          No arguments: Display the calibration parameters.
          Called with a list of arguments in the form "KEY value", where KEY
    stands for BEAM_EFF, FORWARD_EFF, GAIN_IMAGE, H2O, P_AMB, T_AMB, T_CHOP-
    PER or T_COLD, and value is the corresponding value for, respectively, a
    (new)  Beam  efficiency, Forward efficiency, Image/Signal gain ratio, mm
    of water vapor, ambient temperature,  hot  load  (chopper)  temperature,
    cold load temperature, will recompute the calibration, update the header
    and rescale the spectrum accordingly.
1 CATALOG
        LAS\CATALOG [Filename]

    Read an ASCII file of lines (frequency in GHz and  name)  into  the  SIC
    structure  named  CLASS%LINE. When the filename is missing, CATALOG uses
    by default the ASTRO line catalog. Each row of the  line  file  contains
    the description of a line as follows:

       115.271204      12CO-1-0

    Comment lines start with the exclamation mark (!).

    The structure has 3 members:
       CLASS%LINE%N        [     integer] number of lines read
       CLASS%LINE%FRES[N]  [      double] line frequency in MHz
       CLASS%LINE%NAME[N]  [character*12] line name
1 CONSISTENCY
        LAS\CONSISTENCY [/NOCHECK [keyword1] [keyword2] ... ]

    Check the consistency of the current index according to particular head-
    er parameters. By default, check for SOURCE, POSITION, OFFSET, LINE  and
    SPECTROSCOPY  consistency.  CALIBRATION is checked if SET CALIBRATION is
    active (see HELP CALIBRATION for  details).  The  position  OFFSETs  are
    checked if SET MATCH is ON (use SET NOMATCH to deactivate it).

    The  consistency  is  automatically  tested  with some commands (AVERAGE
    /NEW, ACCUMULATE /NEW, STITCH, LOAD, TABLE).

    /NOCHECK
        Without keyword, this option disables all six checks.  With  a  key-
        word,  disable the relevant checks. Current keywords are SOURCE, PO-
        SITION, OFFSET, LINE, SPECTROSCOPY and CALIBRATION.
1 COPY
        LAS\COPY [/SORTED]

    Write all the observations in current index into output file. For  effi-
    ciency  reasons,  COPY refuses to copy a sorted index (SET SORT is other
    than NONE), but user can enforce the copy with the /SORTED option.
1 DROP
        LAS\DROP Obs [Ver]

    Removes an Observation from the current index. The version  number  must
    be  specified if it is not the last in the input file, even if it is the
    last version in the current index.  This commands has an effect only  on
    the current index, i.e. until a new index is built with a FIND.
1 DUMP
        LAS\DUMP Argument [Buffer]
        LAS\DUMP /SECTION [Name] [R|T|P]

    With  no  argument,  lists the content of all present header sections of
    the current R buffer. Arguments are:
      ADDRESSES    Lists addresses
      DATA [R|T|P] Lists in addition the data values of buffer R, T or P
      FILE         Lists information about the input and output files
      INDEX        Lists information about the current index
      MEMORY       Lists the memory usage of the Class buffers
      OTF          Lists OTF informations
      PLOT         Lists current plot definition

    /SECTION [Name] [R|T|P]
        Lists parameters of a given section. Default is all for R buffer.
1 EXTRACT
        LAS\EXTRACT [X1 X2 [Unit]] [/INDEX]

    In its default mode, EXTRACT copies R into T, extracts a  subsection  of
    R,  and save the result in R. If the option /INDEX is present, or if SET
    ACTION is INDEX, a subsection of each observation in the  index  is  ex-
    tracted and saved in the output file.

    Without  arguments,  the  cursor is invoked (if available) to define the
    subsection range. If the arguments X1 and X2 are present, the subsection
    is  defined  by  this range, in the given Unit (if any) or by default in
    the current X axis unit (SET UNIT). X2 can be indifferently  greater  or
    lower  than  X1,  and  Unit  is a single character in the four C)hannel,
    V)elocity, F)requency or I)mage. Note that if Unit is F or I, the number
    of extracted channels can vary for two similar observations (same setup)
    because of different Doppler factors.

    If the range overlaps the input spectrum limits, a warning is raised and
    the  missing  data is filled with the blanking value. Requesting a range
    off the input spectrum is an error. The command FIND /FREQUENCY can help
    you  to  build  an  index  with spectra overlapping one frequency or one
    range of frequencies.

    On return, the observation header is consistently updated: the reference
    channel  is  shifted  and  number  of channels updated. The PLOT section
    (which remembers the previous plotting limits) is  disabled  because  it
    probably does not makes sense for the extracted data array.

    Only regularly sampled X axes are supported.
1 FILE
        LAS\FILE Mode Name [SINGLE|MULTIPLE] [/CONVERT] [/OVERWRITE]

    Selects the input and output files.
    FILE IN name        open an existing file as input
    FILE OUT name       open an existing file as output
    FILE BOTH name      select the same file for input and output.
    FILE UPDATE name    open a file for Updates only.
    FILE OUT name Type  creates a new output file, of the specified type
                        Option /OVERWRITE will force overwriting an existing file
    FILE OUT name Type /CONVERT   converts an existing output file to
                                  the specified type

    Files have two different Types: SINGLE or MULTIPLE.

    File  of  type MULTIPLE allows to have several version of the same spec-
    trum (same ObservationNumber). This type is  the  "historical"  one  for
    CLASS. It can be opened in all modes.
    For file of type SINGLE, the ObservationNumber is a unique identifier of
    the spectrum: only one version exists. As a consequence a file  of  this
    type  cannot  in  general  be  opened both IN and OUT. Such files can be
    opened in mode UPDATE, which allows spectra to  be  modified  in  place,
    typically  via  a TAG or UPDATE command after a MODIFY. Command WRITE is
    not allowed in this mode.

    This new type has been introduced to simplify and  speed  up  On-The-Fly
    processing.


    The default extension is .30m but can can be specified using command SET
    EXTENSION.
1 FIND
        LAS\FIND [APPEND|NEW_DATA|UPDATE] [/ALL] [/LINE name] [/FREQUENCY f1
    f2] [/NUMBER n1 n2] [/SCAN s1 s2] [/OFFSET o1 o2] [/SOURCE name] [/RANGE
    w e s n] [QUALITY q] [/TELESCOPE name] [/SUBSCAN s1 s2] [/ENTRY]  [/SEC-
    TION name]

    FIND performs a search in the input file to build a new index, according
    to selection criteria defined by the SET command. These criteria may  be
    temporarily modified by the following options:
    /ALL             all versions of each scan are searched for
                     (if not present: only the last version)
    /LINE name       search by line name
    /FREQUENCY f1 f2 search by signal or image frequency value or range
    /NUMBER n1 n2    search for the specified range of observation numbers
    /ENTRY  n1 n2    search for the specified range of entry numbers
    /SCAN s1 s2      search for the specified range of scan numbers
    /SUBSCAN s1 s2   search for the specified range of subscan numbers
    /OBSERVED d1 d2  search for these dates (JJ-MMM-YYYY)
    /OFFSET a1 a2    search for these offsets
    /QUALITY q       search for the data of quality better than Q
    /RANGE w e s n   search for the specified range of offsets
    /SOURCE name     search by source name
    /TELESCOPE name  search for the telescope used
    /SECTION name    search for observations which have this section defined

    FIND  does  not  return an error if the index is empty, but the variable
    FOUND is set to 0. FOUND is always set to the number of observations  in
    the index.
2 APPEND
        LAS\FIND APPEND [/OPT1 ...]

    FIND  by default resets the current index. Found observations may be ap-
    pended to the current index by specifying the argument  APPEND.  A  com-
    pression occurs to avoid duplication of observations in the index.
2 NEW_DATA
        LAS\FIND NEW_DATA [/OPT1 ...]

    Argument  NEW_DATA  can  be used to find the new (and only new) observa-
    tions (if any) present in the input file. FIND options or equivalent SET
    tunings  apply.  If  no  new observations are present, the current index
    will be empty.

    FIND NEW_DATA does not wait for new data, but you can  use  the  command
    NEW_DATA to do so.

    This possibility is intended for sites where data acquisition is done in
    CLASS format (Pico Veleta, Plateau de Bure) to use CLASS as an automated
    quick look facility.
2 UPDATE
        LAS\FIND UPDATE [/OPT1 ...]

    The  input  index  will  first be appended with the new observations (if
    any) present in the input file. This saves time because a (much) smaller
    part of the input file is actually read. The current index is then reset
    and recomputed from the input index (i.e.  with  old  and  new  observa-
    tions), as usual.

    FIND  UPDATE  does  not  wait  for new data, but you can use the command
    NEW_DATA to do so.

    This keyword can be omitted if the SET FIND mode is UPDATE.
1 FITS
        LAS\FITS READ  File[.fits]
        LAS\FITS WRITE File[.fits]  /MODE   SPECTRUM|INDEX   [/BITS   Nbits]
    [/CHECK]

    Either  READ  the File.fits FITS file to the CLASS internal data format.
    Please note that not all FITS files may be read by CLASS, and some head-
    er  information  might  be incomplete when doing so. Alternatively, FITS
    cubes can be converted to the Gildas Data Format  by  the  command  VEC-
    TOR\FITS, and then imported as a Class index by the command ANALYSE\LMV.

    Or WRITE the File.fits FITS file from the CLASS  internal  data  format.
    /MODE is a mandatory option which can take the following values as argu-
    ment:
      SPECTRUM a simple FITS file is written from the  current  spectrum  in
               memory  is  written.  The  number of bits per intensity value
               used when writing the FITS file may be controlled through the
               /BITS  optional argument. It can be: 16 or I*2 (2 bytes inte-
               ger), 32 or I*4 (4 bytes integer) or -32 or R*4 (4 bytes  re-
               al). Default is 32.
      INDEX    a  FITS  BINTABLE  is written from all the spectra in current
               index. The USER MUST make sure that  all  index  spectra  are
               consistent  (same  source,  same  line, same frequency setup,
               ...). The intensity values (and irregularly  sampled  X  axis
               values, if any) are always written as 4 bytes real.
    The  default  mode  and number of bits can also be specified through the
    commands:
      SET FITS MODE SPECTRUM|INDEX
      SET FITS BITS Nbits
    The option /CHECK will print the FITS HEADER on the terminal.
1 FOLD
        LAS\FOLD

    Folds a frequency-switched spectrum.
1 GET
        LAS\GET [N [version]|FIRST|LAST|NEXT|PREVIOUS|ZERO]

    GET copies R into T, and loads the Observation number N in R.  The  cur-
    rent  index  initialized by FIND is first explored, then, if needed, the
    whole input file. If N is absent, the previous (last  read)  Observation
    is recovered.

    Instead of an observation number, several keywords can also be used:
      - FIRST:    the first Observation of the current index is loaded,
      - LAST:     the last Observation of the current index is loaded,
      - NEXT:     the next Observation in the current index is loaded,
      - PREVIOUS: the previous Observation in the current index is loaded,
      - ZERO:     the  internal  Observation  counter is reset to 0, so that
                  next GET NEXT will get  the  first  observation.  In  this
                  unique case, R and T are not modified.
1 HEADER
        LAS\HEADER

    Displays  some  header information on the R Observation. The FULL format
    is used, with the informations selected in command SET  FORMAT  written.
    The lines written contain (in output order, but not all lines are neces-
    sarily present)
    - General information line:
        Scan number and version
        Source name
        Line name
        Telescope name
        Date of observation
        Date of last reduction
    - Position information line
        RA or l        right ascension or longitude (or azimuth)
        DEC or b       declination or latitude (or elevation)
        Epoch          if equatorial coordinates are used
        Offsets        (in current units)
        coordinate     Eq, Ga, Az
    - Quality information line:
        Quality of calibration (as defined by a SET QUALITY)
        Tau      opacity at zenith
        Tsys     system temperature (outside atmosphere).
        Time     total integration time on source (minutes)
        El       elevation of source
    - Spectral information lines (2):
        N        number of channel
        I0       reference channel (real)
        V0       velocity at reference channel
        Dv       velocity resolution (signed)
        F0       rest frequency at reference channel
        Df       frequency resolution (signed)
        Fi       image frequency at reference channel
    - Calibration information line:
        B_ef    Beam efficiency of telescope
        F_ef    Forward efficiency of telescope
        G_im    Gain in image band
    - Atmospheric information lines (2):
        H2O      millimeter of precipitable water vapor
        Pamb     ambient pressure
        Tamb     ambient (receiver cabin) temperature
        Tchop    Chopper temperature
        Tcold    Cold load temperature
        Tatm     Atmospheric temperature in the signal band
        Tau      Zenith opacity in the signal band
        Tatm_i  Atmospheric temperature in the image band
        Tau_i   Zenith opacity in the signal band
    - Continuum Drift information lines (2) :
        N        Number of points
        I0       Reference point
        A0       Angle offset at reference point
        Da       Angular spacing between points (signed).
        F0       Observing frequency
        Df       Band pass
        Pos. Ang. : Position angle of the drift.
    followed by the list of Scan numbers added in the observation.
1 IGNORE
        LAS\IGNORE List_of_Observations [/SCAN iscan]

    This command can be used to declared the specified list of  Observations
    (from the INPUT file) to be ignored in all FIND operations.  They effec-
    tively become invisible to CLASS (except in a LIST IN command), until  a
    FILE  IN  command is typed again. The input file is not physically modi-
    fied however. The list of observation may have the same  format  as  the
    index list of a FOR command.

    /SCAN iscan
        Ignore all observations with scan number 'iscan'.
1 LIST
        LAS\LIST  [IN|OUT]  [/BRIEF]  [/LONG]  [/SCAN] [/OUTPUT File] [/TOC]
    [/VARIABLE VarName]

    List header information about an ensemble of Observations.  LIST is used
    for a quick look to Observation headers, in a more or less detailed for-
    mat. IN or OUT keyword specifies the file to be listed.  If absent,  the
    current index is listed. A medium-sized format is used by default.
    LIST IN       List the whole input file (all versions, see FIND /ALL)
    LIST OUT      List the whole output file (all versions)
    /BRIEF        Brief format
    /LONG         Long format
    /SCAN         Scan based compact format
    /SCAN /BRIEF  Scan numbers followed by the number of spectra in each scan
    /TOC          Display the table of contents. See subtopic for details.
    /OUTPUT File  Send the list to a file

    Some options are particularly well suited for large ensemble of spectra:
    /SCAN displays the index on a scan number basis  (defined  by  a  unique
    SOURCE, LINE, TELESCOPE and SCAN number), /SCAN /BRIEF gives the list of
    scan numbers with their total number of spectra. /SCAN and /LONG options
    are incompatible.
2 /TOC
        LAS\LIST [IN|OUT] /TOC [Attr1 Attr2 ... AttrN] [/VARIABLE VarName]

    LIST /TOC displays the Table Of Contents of the current index, or of the
    input (LIST IN) or output file (LIST OUT). A summary  of  the  different
    values of each attribute is made, plus a final summary of all the combi-
    nations (setups). The attributes can be:
        - SOURCE
        - LINE
        - TELESCOPE
        - OFF1
        - OFF2
        - ENTRY
        - NUMBER
        - BLOCK
        - VERSION
        - KIND
        - QUALITY
        - SCAN
        - SUBSCAN
    By default, SOURCE, LINE and TELESCOPE are used.

    The table of contents is also saved in  a  SIC,  user-defined  structure
    thanks  to  the  option  /VARIABLE (default is TOC%). The content of the
    structure is updated after each call to the command LIST /TOC. One  must
    take  care  that subsequent calls to FIND can lead to values in TOC% in-
    consistant with the current index.
1 LOAD
        LAS\LOAD [/NOCHECK keyword1 [keyword2 [keyword3] ...]]

    Pack the whole current index in a 2D array. By default, check  the  con-
    sistency  of  the index (see CONSISTENCY). The option /NOCHECK allows to
    ignore some inconsistency, according to the optional keywords.   Current
    keywords are SOURCE, POSITION, LINE and SPECTROSCOPY.
1 MODIFY
        LAS\MODIFY Item [Values...]

    This  is a general purpose command to edit and change the current obser-
    vation header. Some actions are merely presentation "details", others do
    affect the information in the observation. Among these, RECENTER, WIDTH,
    IMAGE and SWITCH_MODE are typically used only when the software did  not
    agree with the hardware when the spectra was taken (i.e. when the infor-
    mation in the observation header is wrong). They  should  be  used  with
    caution.

    MODIFY actions are limited. You should use the SIC\ command LET to modi-
    fy header variables which are not available within  the  MODIFY  command
    (Caution: this is the rope to hang you).
2 BLANKING
        LAS\MODIFY  BLANKING  New0  Change the blanking value in both header
    and data. This may be required before you can build a  consistent  strip
    or  cube,  specially  if  the  spectra were initially loaded from a FITS
    tape.
2 BANDS
        LAS\MODIFY BANDS

    Exchange signal and image bands. This allows line fitting on image  band
    for  example.  Currently,  the spectrum is not rescaled even if the band
    ratio is not 1.
2 BEAM_EFF
        LAS\MODIFY BEAM_EFF Value
        LAS\MODIFY BEAM_EFF /RUZE B0 Sigma

    Change the beam efficiency.

    The first syntax allows to define the new beam efficiency from a  single
    value  for  the  whole spectrum. If the beam efficiency previously had a
    non zero value, the spectrum intensities and affected header  parameters
    are  rescaled  according  to the old and new values. Otherwise, only the
    beam efficiency is set to the new value.

    The second syntax allows to use the Ruze's equation, which is more suit-
    able for large band spectra:
        Beeff(lambda) = B0*exp(-(4*pi*Sigma/lambda)**2)
    B0  is the scaling factor with no units (between 0 and 1), and Sigma the
    width factor in microns.
    If the beam efficiency previously had a non zero value, a rescale factor
    is evaluated for each channel and is applied to the intensities, the new
    beam efficiency is set to the one at the center of the spectrum, and the
    affected  header  parameters  are  rescaled according to this new value.
    Otherwise, only the beam efficiency is set to this new value.
2 DOPPLER
        LAS\MODIFY DOPPLER [SIGN|*|Value]

    Change the Doppler factor according to the CLASS convention (-V/c). With
    no  argument,  checks  whether  the  header value is consistent with the
    CLASS value computed according to the date and observatory. The checking
    precision  corresponds  to  0.6  m/s  in  V.  A  logical  SIC  variable,
    DOPPLER_PB, is set to true if the values disagree.  If  an  argument  is
    present:

      SIGN   change the sign of the Doppler factor but do not recompute it,
      *      compute  and update the Doppler factor according to the observ-
             ing date-time and the observatory position (this  position  can
             be customized with SET OBSERVATORY),
      Value  set the Doppler factor to <Value>
2 FREQUENCY
        LAS\MODIFY FREQUENCY Rfreq

    Compute  the velocity scale corresponding to a new rest frequency Rfreq.
    The sky frequency scale is not modified.
2 IMAGE
        LAS\MODIFY IMAGE Rimage

    Change the image frequency (in MHz).
2 LINENAME
        LAS\MODIFY LINENAME "New Name"

    Modify the line name (for bookeeping).
2 OFFSETS
        LAS\MODIFY OFFSETS O1 O2

    Change the offsets. This may be required when you average  spectra  from
    different offsets, because the resulting "position" is meaningless (usu-
    ally the position of the first observation added).
2 POSITION
        LAS\MODIFY POSITION Lambda Beta

    Change the central position for the  source  to  (lambda_0,beta_0).  The
    offsets  are also modified, as to be consistent with the new central po-
    sition. This command is usefull when different parts of one  source  are
    mapped relative to several reference positions. Only RADIO projection is
    handled.

    If the coordinate system is EQuatorial:
          lambda = lambda_0 x 12 /pi
          beta   = beta_0   x 180/pi
    If the coordinate system is GALactic:
          lambda = lambda_0 x 180/pi
          beta   = beta_0   x 180/pi
2 RECENTER
        LAS\MODIFY RECENTER Rrchan

    Change the reference channel in order to change the velocity,  frequency
    and  image  frequency scales. The sky frequency scale is also altered in
    this command.
2 SOURCE
        LAS\MODIFY SOURCE source_name

    Modify the source name.
2 SYSTEM
        LAS\MODIFY SYSTEM System

    Force the System in which the center of projection (central position  of
    the source) is defined. Valid systems are GALACTIC, EQUATORIAL, HORIZON-
    TAL and UNKNOWN. This command is typically used for "foreign" data  when
    the  SYSTEM information has not been decoded correctly by the conversion
    package. No correction is applied on spectrum position.
2 TELESCOPE
        LAS\MODIFY TELESCOPE Name

    Change the telescope name, for instance from IRAM-30M to 30M-MRT.
2 VELOCITY
        LAS\MODIFY VELOCITY Rvoff

    Compute the image and rest frequencies corresponding to a  new  velocity
    (in km/s). The sky frequency scale is unchanged by this command.
2 WIDTH
        LAS\MODIFY WIDTH Rfres

    Change the frequency resolution (in MHz).
2 SWITCH_MODE
        LAS\MODIFY  SWITCH_MODE  Switching_mode Nphase Off_1 Time_1 Weight_1
    Off_n Time_n Weight_n

    Change the description of the switching mode. This command is  typically
    used  for "foreign" data when this information has not been decoded cor-
    rectly by the conversion package.

    For each phase, one should specify:
      - the offset for the phase (in MHz for frequency switching, in current
        angular unit otherwise).
      - the duration of the phase (in seconds)
      - the weight given to phase (arbitrary units)
1 MULTIPLY
        LAS\MULTIPLY Fact

    Multiply  the  R  Observation by Fact. MULTIPLY leaves the T Observation
    unaffected. Note that Tsys is also multiplied  by  the  same  (absolute)
    factor to keep proper weights. If only the data is to be multiplied, use
    the SIC\LET command on array RY:
        SIC\LET RY Fact*RY
1 NEW_DATA
        [LAS\]NEW_DATA [Interval]

    Waits until new observations have been written to the  input  file,  and
    then  return.  No modification of the input or current index is done. It
    is then expected to use FIND NEW_DATA|UPDATE to rebuild the indexes with
    these new observations (see corresponding HELP for details).

    The waiting time between 2 check can be customized as first argument (in
    seconds, default 5).
1 PLOT
        LAS\PLOT [/INDEX] [/OBS]

    PLOT /OBS
        Display the Observation in R. It is equivalent to the following  se-
        quence of commands:
            CLEAR    BOX    SPECTRUM    TITLE
        The  type of PLOT can be specified by SET PLOT. The limits for the X
        and Y axes are set by SET MODE X and SET MODE Y.

    PLOT /INDEX
        Equivalent to the following sequence of commands:
            CLEAR    BOX /INDEX   SPECTRUM /INDEX    TITLE /INDEX
        Plot a 2-dimensional image (built with the LOAD command) with veloc-
        ity/frequency  for  the X axis, index number for the Y-axis, and in-
        tensity being rendered as grey/color scale. Use SET MODE Y to choose
        the  color lower and upper limits. Entering command POPUP after PLOT
        /INDEX enables displaying a single spectrum,  selected  by  clicking
        with  the  middle button of the mouse. Use SET MODE Z to control the
        second dimension of the plot (e.g. number of entries).

    Default is /OBS. The default can be modified with SET ACTION.
1 RECORD
        LAS\RECORD k

    Obsolete.
1 SAVE
        LAS\SAVE Name

    SAVE creates a procedure file of name "Name.CLASS", containing  all  the
    current  parameters  of  the  program.  This file may be executed at any
    time using the @ command: just type "@ name" after the LAS>  prompt,  or
    pass   "@ name"   as   a   parameter  when  invoking  CLASS  (by  typing
    "CLASS @ name").  This file is composed of standard CLASS commands,  and
    may be edited with any text editor.
1 SET
        LAS\SET something [value1 [value2 [...]]] [/NOCURSOR]

    This  command  is used to set a value for a CLASS parameter. If no argu-
    ment is given, the default value for the parameter will be restored.
2 ACTION
        LAS\SET ACTION I[ndex] O[bservation]

    Defines the default action level: current index or  current  observation
    (R buffer). Default is OBServation.
2 ALIGN
        LAS\SET ALIGN Type Range

    Defines  the way the spectra to be added are aligned (Type) and combined
    (Range). Possible combinations are:
    Type: C[hannel]      for spectra and drift
          V[elocity]     for spectra only
          F[requency]    for spectra only
          P[osition]     for drift only
    Range: I[ntersect] or C[omposite]
    Default is SET TYPE C I. Note: This means that continuum drifts in oppo-
    site directions are not properly added: ALIGN Position must be specified
    for that.
2 ANGLE
        LAS\SET ANGLE Unit

    Specify the angle unit for offsets. Unit is one of: RAD[ian],  DEG[ree],
    MIN[ute  of arc], SEC[ond of arc], MAS[milli second of arc].  Default is
    SECond. The ANGLE unit is also used to display Continuum drifts.
2 BAD
        LAS\SET BAD Check

    Specify the way the commands which have to mix channels  behave  in  the
    case of bad channels. There are two families of such commands:
      -  resampling (part of) commands: RESAMPLE, and optionally ACCUMULATE,
        AVERAGE, and STITCH if resampling is needed,
      - addition (part of) commands: ACCUMULATE, AVERAGE, and STITCH.

    Check may be OR or AND. Default is OR, i.e. the output channel is bad if
    any  of  the input channels is bad. AND indicates to use all the non-bad
    channels (if any) to compute the output channel.
2 BASELINE
        LAS\SET BASELINE arg

    Specify the degree of polynomial baselines to be subtracted. Default  is
    1.
2 BOX
        LAS\SET BOX L[andscape] P[ortrait] D[efault]

    Calls  the  GREG1\SET  PLOT and GREG1\SET VIEWPORT commands with default
    values suited for CLASS plots. If no keyword, restore the  default  box:
    SET  VIEW  0.1  0.95  0.15  0.70. The box size can be modified using the
    GREG1\ command directly as for instance
        LAS> g\set view 0.2 0.3 0.2 0.3
2 CALIBRATION
        LAS\SET CALIBRATION [Beam_Tol [Gain_Tol]] or OFF

    Specify the tolerance on the Beam efficiency (Beam_Tol) and  gain  image
    ratio (Gain_Tol), on turn or calibration checking. A value of 0 means no
    check. The default values are 0.02 and 0 respectively.

    These values are used by the command CONSISTENCY (and the other commands
    using it implicitely) to verify that the calibration is consistant. They
    are also used by command WRITE which writes the  corresponding  informa-
    tion  in the output file only if Beam_Tol is non zero. Note that because
    the beam efficiency is less than 1, you could use Beam_Tol=1 to suppress
    the calibration checking but still write the information.
2 CURSOR
        LAS\SET CURSOR Arg

    SET  CURSOR  IS OBSOLETE. Cursor availability is detected automatically,
    and can be deactived if needed for some commands by a /NOCURSOR  option.

    Activates  or deactivates the use of cursor for the commands SET WINDOW,
    SET MASK, SET MODE and LINES, according to the value of Arg: ON or  OFF.
    Default is OFF.
2 DEFAULT
        LAS\SET DEFAULT

    Restore  all  parameters  to their default value. The default values for
    individual parameters are documented under the corresponding subtopic.
2 DISPLAY
        The following SET Parameter commands affect data display:
    LAS\SET ACTION action_level
    LAS\SET FORMAT Type
    LAS\SET LEVEL interactive_min_value logfile_min_value (obsolete)
    LAS\SET MODE A [Type]
    LAS\SET PLOT type
    LAS\SET SYSTEM Type [Equinox]
    LAS\SET UNIT Lower [Upper]
    LAS\SET VARIABLE Section_Name [Keyword]
    LAS\SET VELOCITY L[sr]H[eliocentric]A[utomatic]
2 EXTENSION
        LAS\SET EXTENSION Ext

    Defines the default extension for input and  output  files.  Default  is
    '.30m'.
2 FIND
        LAS\SET FIND UPDATE|NOUPDATE

    FIND  will  check or not for new entries in the input file (see FIND UP-
    DATE). Default is no implicit update (NOUPDATE).
2 FORMAT
        LAS\SET FORMAT Type

    Set the format of the title of observations plotted. The same format  is
    used  by  the  LIST command. The format may be BRIEF (Observation number
    and version, Source name, Line name, Telescope name  and  position  off-
    sets),  LONG  or FULL which is similar to the long format, but also dis-
    plays the list of original Scans. The default is LONG.  FULL  format  is
    always used for command HEADER.

    Other  keywords  can  be specified to indicate which type of information
    should be written for the LONG and FULL formats. This is done by command
        LAS\SET  FORMAT Keyword [ON] [OFF] (ON to write the information cor-
    responding to the specified keyword, OFF to ignore it). The keywords are
      -  POSITION  for  position of the source, offsets, type of coordinates
        and Epoch
      - QUALITY for the Opacity, System temperature, Elevation,  Integration
        time.
      -  SPECTRAL for the number of channel, reference channel, velocity and
        resolution, signal and image frequency and resolution.
      - CALIBRATION for the beam and forward efficiencies and the gain image
        ratio.
      -  ATMOSPHERE  for the water vapor content, pressure, temperatures and
        opacities in signal and image bands.
      - CONTINUUM for continuum drift information
      - ORIGIN for the list of added scans.
    The default is Position - Quality - Spectral  for  spectra,  Position  -
    Quality  - Continuum for drifts. A line of general information is always
    written in any case.
2 FREQUENCY
        LAS\SET FREQUENCY Freq1|* [Freq2|*] [SIGNAL|IMAGE]

    Add a selection by frequency for the command  FIND.  This  criterion  is
    suited only for spectroscopic data.

      - SET FREQUENCY Freq1
          select all observations which frequency range intersects the given
          frequency,
      - SET FREQUENCY Freq1 Freq2
          select all observations which frequency range intersects at  least
          partially the given range,
      - SET FREQUENCY * Freq2
          select all observations which frequency range is at least partial-
          ly under Freq2,
      - SET FREQUENCY Freq1 *
          select all observations which frequency range is at least partial-
          ly above Freq1,
      - SET FREQUENCY *
          select  all  observations i.e. disable the selection by frequency.
          This is the default.

    An optional keyword can be added after the values  to  indicate  whether
    the  selection  should  be performed by SIGNAL or IMAGE frequencies. De-
    fault is SIGNAL.

    Users should be aware that this selection  criterion  requires  to  read
    more  informations in the observation header, and thus has a computation
    cost which can become important for large datasets.
2 LEVEL
        LAS\SET LEVEL interactive_min_value logfile_min_value

    SET LEVEL IS OBSOLETE AND HAS NO EFFECT ANYMORE.
    It can be mimicked with the SIC MESSAGE command (see HELP for  details).
    To  alter  the  verbosity  of  CLASS commands to terminal and to message
    file, one should modify the message filters of the CLASS package.

    For example:
       LAS90> SIC MESSAGE CLASS S=FEW ! Change the on-screen CLASS filter
       LAS90> SIC MESSAGE CLASS       ! Print the two CLASS filters
       class    on-screen  active   filter: FEW------
       class    to-mesfile active   filter: FEWRI--CU
    This keeps only the most important messages (Fatal,  Errors,  and  Warn-
    ings)  to  the  terminal, whereas Results, Informations and Commands are
    also printed in the message file by default.
2 LINE
        LAS\SET LINE Name

    FIND will select all observations according to the specified line  name.
    Default  is  *.  Wildcards are accepted at any position in the line name
    (e.g. NAM*, N*ME or N*M*): they match 0 or more characters.
2 MASK
        LAS\SET MASK [ml1 ml2 [...]] [/VAR array]

    Defines a mask for the Gaussian fits by its  boundaries.  If  available,
    the  cursor  will  be  used  to specify missing arguments, unless option
    /NOCURSOR is present. When using the cursor, enter:  N  (or  Left  mouse
    button) to enter a value, C (or Middle button) to cancel the last entry,
    H for help, E (or Right button) for exit.  The boundaries are in current
    unit.  Default  is no mask. The boundaries are in current unit. See DRAW
    MASK to display the mask(s).

    SET MASK /VAR mask_array
      Define the masks from rank 1 array  mask_array[1+2*NMASK].  The  array
      must be of the following form:
        mask_array[1]=NMASK      number of masks
        mask_array[2*i:2*i+1]    boundaries of mask num. 'i'
2 MAP
        LAS\SET MAP [Clear|Normal]

    Will Clear (or Not) the screen before processing a MAP command. However,
    a "MAP Where" command does not clear the screen even in a  "LAS\SET  MAP
    Clear" mode.
2 MATCH
        LAS\SET MATCH Tol

    Turn  on the checking of position-matching in CONSISTENCY (and the other
    commands using it). Tol is the position tolerance in current units.  The
    default is SET MATCH 2 (arcsec). The tolerance is also used in FIND, MAP
    and a few other commands such as CUBE.
2 MODE
        LAS\SET MODE  X | Y | Z | ALL  [mode]

    Select the scale mode for axis X, Y or Z, or all. The mode can be:
      AUTO    : limits as found in the observation header (DEFAULT),
      TOTAL   : all data plotted,
      CURRENT : fix the current values in use (whatever if they were
                Automatic, Total, or already Fixed), so that the next
                spectra plotted will reuse the same
      [void]: i)  limits are entered explicitly by the user
                        LAS\set mode x x1 x2
              ii) limits are entered interactively when no mode is
                  given (if the cursor is available)

    For 2D data (built with the LOAD command), SET MODE Y defines the  color
    range.  The  second dimension range (e.g. observation number) is defined
    with SET MODE Z.
2 NOMATCH
        LAS\SET NOMATCH

    Turn off checking of position-matching in  CONSISTENCY  (and  the  other
    commands  using  it).  This  does not change the tolerance for the other
    functions like FIND and MAP.
2 NUMBER
        LAS\SET NUMBER n1 n2

    FIND will select all Observations with numbers between n1  and  n2.  De-
    fault is * *.
2 OBSERVATORY
        LAS\SET OBSERVATORY *
        LAS\SET OBSERVATORY Name Longitude Latitude Altitude

    If OBSERVATORY is *, Class will guess the observatory from the TELESCOPE
    name. This is the default.

    If an observatory name is provided with its  longitude,  latitude  (both
    sexagesimal  strings) and altitude (in kilometers), Class will use those
    values independently of the TELESCOPE name. This is useful in particular
    for observatories unknown by Class.
2 OBSERVED
        LAS\SET OBSERVED d1 d2

    FIND  will  select  all Observations with observing dates between d1 and
    d2.  Dates are specified as DD-MMM-YYYY (i.e. 14-JUL-1789).  Default  is
    * *.
2 OFFSETS
        LAS\SET OFFSETS o1 o2

    FIND will select all observations with offsets within the specified tol-
    erance (SET MATCH) of o1 and o2. See also SET  RANGE.   Default  is  * *
    (select all offsets).
2 PLOT
        LAS\SET PLOT type level

    Set the plotting type and level. Level is I[ndex] or S[can]. If level is
    S, then type is N[ormal] or H[istogram]. Normal is considered to be  50%
    faster  plot,  but Histogram gives a better reading of the channel posi-
    tions and values. Default is Histogram.
2 POSANGLE
        LAS\SET POSANGLE amin amax

    Specify the position angle range (continnum drifts only) for  subsequent
    searches.
2 PROCESSING
        The  following  SET  Parameter  commands control data processing op-
    tions:
    LAS\SET ALIGN Type Range
    LAS\SET BAD Check
    LAS\SET BASE arg
    LAS\SET CALIBRATION [Beam_Tol [Gain_Tol]] or OFF
    LAS\SET MASK [ml1 ml2 [...]] [/VAR array]
    LAS\SET MATCH Tol
    LAS\SET NOMATCH
    LAS\SET TYPE CONTINUUM or LINE or SKYDIP
    LAS\SET VARIABLE Section_Name [Keyword]
    LAS\SET VELOCITY L[sr]H[eliocentric]A[utomatic]
    LAS\SET WEIGHT type
    LAS\SET WINDOW [wl1 wu1 [wl2 wu2 [...]]] -
                   [/POLYGON [N] [filename1...filenameN] [/VAR array]]
2 QUALITY
        LAS\SET QUALITY q

    FIND will select only observations of quality better than Q  (i.e.  less
    than  Q). When originally written, unless the real time acquisition sys-
    tem detected a severe problem, all observations have quality 0, a priori
    the  best.  The  quality flag of an observation can be changed using the
    TAG command. See HELP TAG for the recommended quality scale.
2 RANGE
        LAS\SET RANGE West East South North

    FIND will select all observations with offsets in the  specified  range.
    Default is * * * *.
2 REDUCED
        LAS\SET REDUCED d1 d2

    FIND  will  select  all observations with reduction dates between d1 and
    d2.  Dates are specified as DD-MMM-YYYY (i.e. 14-JUL-1789).  Default  is
    * *.
2 SELECTION
        The following SET Parameter commands affect data selection in FIND:
    LAS\SET ANGLE Unit
    LAS\SET LINE Name
    LAS\SET FREQUENCY Freq
    LAS\SET MATCH Tol
    LAS\SET NOMATCH
    LAS\SET NUMBER n1 n2
    LAS\SET OBSERVED d1 d2
    LAS\SET OFFSETS o1 o2
    LAS\SET POSANGLE amin amax
    LAS\SET QUALITY q
    LAS\SET RANGE West East South North
    LAS\SET REDUCED d1 d2
    LAS\SET SCAN s1 s2
    LAS\SET SOURCE name
    LAS\SET SYSTEM Type [Equinox]
    LAS\SET TELESCOPE Name
    LAS\SET TYPE CONTINUUM or LINE or SKYDIP
2 SCAN
        LAS\SET SCAN s1 s2

    FIND  will  select all observations with Scan numbers between s1 and s2.
    The Scan number, attributed by the on-line  acquisition  system  may  be
    different from the observation number which is used by CLASS to refer to
    the observations. Default is * *.
2 SUBSCAN
        LAS\SET SUBSCAN s1 s2

    FIND will select all observations with subscan numbers  between  s1  and
    s2.  The  subscan number reflects the record number during an On-The-Fly
    acquisition. Default is * *.
2 SORT
        LAS\SET SORT keyword

    Defines the sorting when building the INDEX with FIND. The sorting is in
    ascending order. Default sorting is recovered with SET SORT NONE.

    Keyword is one of:
          BETA  KIND  LAMBDA  LINE NUMBER NONE OBSERVED QUALITY SCAN SUBSCAN
          SOURCE TELESCOPE VERSION
2 SOURCE
        LAS\SET SOURCE Name

    FIND will select all scans according to the specified source name.   De-
    fault  is  *.  Wildcards are accepted at any position in the source name
    (e.g. NAM*, N*ME or N*M*): they match 0 or more characters.
2 SYSTEM
        LAS\SET SYSTEM Type [Equinox]

    Specify the coordinate system to be used by the  current  R  observation
    and  next ones loaded in memory. Type may be E[quatorial] followed by an
    epoch, G[alactic], or A[utomatic]. Default is Auto, i.e. uses  the  type
    found  in the data file. If the equinox of Equatorial coordinates is not
    specified, the previous value is used. The initial default  is  2000.00.
    Coordinates and offsets are automatically converted to the specified co-
    ordinate system and precessed to the specified epoch if needed.
2 TELESCOPE
        LAS\SET TELESCOPE Name

    FIND will select all scans according to the  specified  telescope  name.
    Default  is  *.  Wildcards are accepted at any position in the telescope
    name (e.g. NAM*, N*ME or N*M*): they match 0 or more characters.
2 TYPE
        LAS\SET TYPE CONTINUUM or LINE or SKYDIP

    Defines on which type of data the program is working.
      - LINE (or SPECTROSCOPY) (the default when entering LAS) selects Spec-
        tral  Line  data only, and the program prompt is LAS> (Line Analysis
        System).
      - CONTINUUM selects continuum drifts results  only,  and  the  program
        prompt changes to CAS> (Continuum Analysis System).
      - SKYDIP selects only skydips, and the prompt changes to SAS>
    In  CONTINUUM  mode, a continuum drift is treated as a spectrum would be
    in LINE mode. You can add drifts, subtract baseline,  make  gauss  fits,
    change  plotting  scales  etc...  The  current  angular units is used in
    plots. SKYDIP mode has very limited capabiblities: only  command  REDUCE
    may be used to analyse the SKYDIP results.
2 UNIT
        LAS\SET UNIT Lower [Upper]

    Specify  the  unit  to  be  used for the lower and upper X axis. Allowed
    units are C[hannel], F[requency], [Image] and V[elocity]. Default is Ve-
    locity. For Continuum drifts, this unit is ignored, but the angular unit
    specified by SET ANGLE is used.
2 VARIABLE
        LAS\SET VARIABLE Section_Name [Keyword]

    Declare SIC variables corresponding to section of the header  of  the  R
    observation.  The  header sections are POSITION, SPECTRO, BASE, HISTORY,
    PLOT, FSWITCH, CALIBRATION, SKYDIP, GAUSS, SHELL, NH3 (or  HFS),  DRIFT,
    BEAM,  and  CONTINUUM. Defining these SIC variables allows to access the
    header for mathematical computations using SIC facilities. All variables
    are declared as readonly, unless Keyword WRITE is specified as third ar-
    gument.  If Keyword OFF is specified, the  corresponding  SIC  variables
    are  deleted  (to  save space since the total number of SIC variables is
    limited).

    The SIC variables have the name of the corresponding FORTRAN  variables.
    They are defined below:

                  SECTIONS Information about present sections
    LOGICAL       R%HEAD%PRESEC(ISEC)  [   ] List of present sections
    Codes for ISEC can be found in CLASS%CODE%SEC%.

                  GENERAL General parameters, always present:
    INTEGER*8     R%HEAD%GEN%NUM    [     ] Observation number
    INTEGER*4     R%HEAD%GEN%VER    [     ] Version number
    CHARACTER*12  R%HEAD%GEN%TELES  [     ] Telescope name
    CHARACTER*12  R%HEAD%GEN%CDOBS  [  day] Date of observation
    CHARACTER*12  R%HEAD%GEN%CDRED  [  day] Date of reduction
    INTEGER*4     R%HEAD%GEN%TYPEC  [ code] Type of coordinates
    INTEGER*4     R%HEAD%GEN%KIND   [ code] Type of data
    INTEGER*4     R%HEAD%GEN%QUAL   [ code] Quality of data
    INTEGER*8     R%HEAD%GEN%SCAN   [     ] Scan number
    REAL*8        R%HEAD%GEN%UT     [  rad] UT of observation
    REAL*8        R%HEAD%GEN%ST     [  rad] LST of observation
    REAL*4        R%HEAD%GEN%AZ     [  rad] Azimuth
    REAL*4        R%HEAD%GEN%EL     [  rad] Elevation
    REAL*4        R%HEAD%GEN%TAU    [neper] Opacity
    REAL*4        R%HEAD%GEN%TSYS   [    K] System temperature
    REAL*4        R%HEAD%GEN%TIME   [    s] Integration time
    INTEGER*4     R%HEAD%GEN%XUNIT  [ code] X unit, if X coordinate section is present
    Codes  for  TYPEC, KIND, QUAL and XUNIT can be found in SIC%CODE%COORD%,
    SIC%CODE%KIND%, CLASS%CODE%QUAL% and SIC%CODE%XUNIT% respectively.

                         POSITION Position information:
    CHARACTER*12  R%HEAD%POS%SOURC  [    ] Source name
    REAL*4        R%HEAD%POS%EPOCH  [code] Epoch of coordinates
    REAL*8        R%HEAD%POS%LAM    [ rad] Lambda
    REAL*8        R%HEAD%POS%BET    [ rad] Beta
    REAL*4        R%HEAD%POS%LAMOF  [ rad] Offset in Lambda
    REAL*4        R%HEAD%POS%BETOF  [ rad] Offset in Beta
    INTEGER*4     R%HEAD%POS%PROJ   [code] Projection system
    REAL*8        R%HEAD%POS%SL0P   [ rad] Lambda of descriptive system
    REAL*8        R%HEAD%POS%SB0P   [ rad] Beta of descriptive system
    REAL*8        R%HEAD%POS%SK0P   [ rad] Angle of descriptive system
    Codes for PROJ can be found in SIC%CODE%PROJ%.

                SPECTRO Spectroscopic information (for spectra)
    CHARACTER*12  R%HEAD%SPE%LINE     [    ] Line name
    REAL*8        R%HEAD%SPE%RESTF    [ MHz] Rest frequency
    REAL*8        R%HEAD%SPE%IMAGE    [ MHz] Image frequency
    INTEGER*4     R%HEAD%SPE%NCHAN    [    ] Number of channels
    REAL*8        R%HEAD%SPE%RCHAN    [    ] Reference channels
    REAL*8        R%HEAD%SPE%FRES     [ MHz] Frequency resolution
    REAL*8        R%HEAD%SPE%FOFF     [km/s] Frequency offset
    REAL*8        R%HEAD%SPE%VRES     [km/s] Velocity resolution
    REAL*8        R%HEAD%SPE%VOFF     [km/s] Velocity at reference channel
    REAL*4        R%HEAD%SPE%BAD      [    ] Blanking value
    INTEGER*4     R%HEAD%SPE%VTYPE    [code] Type of velocity
    REAL*8        R%HEAD%SPE%DOPPLER  [    ] Doppler factor = -V/c (CLASS convention)
    Codes for VTYPE can be found in SIC%CODE%VELO%.

               BASE Baseline information (for spectra of drifts)
    PARAMETER     MWIND=100
    INTEGER*4     R%HEAD%BAS%DEG            [      ] Degree of last baseline
    REAL*4        R%HEAD%BAS%SIGFI          [     K] Sigma
    REAL*4        R%HEAD%BAS%AIRE           [K.km/s] Area under windows
    INTEGER*4     R%HEAD%BAS%NWIND          [      ] Number of line windows
    REAL*4        R%HEAD%BAS%W1(MWIND)      [  km/s] Lower limits of windows
    REAL*4        R%HEAD%BAS%W2(MWIND)      [  km/s] Upper limits of windows
    REAL*4        R%HEAD%BAS%SINUS(3)       [      ] Sinus baseline result
    REAL*4        WINDOW(FOUND,1+2*RNWIND)  [  km/s] 2D plots: window for each record

                  HISTORY Scan numbers of initial observations
    PARAMETER     MSEQ=100
    INTEGER*4     R%HEAD%HIS%NSEQ         [   ] Number of sequences
    INTEGER*4     R%HEAD%HIS%START(MSEQ)  [   ] Start scan number of seq.
    INTEGER*4     R%HEAD%HIS%END(MSEQ)    [   ] End   scan number of seq.

                         PLOT Default plotting limits.
    REAL*4        R%HEAD%PLO%AMIN   [   ] Min Y value plotted
    REAL*4        R%HEAD%PLO%AMAX   [   ] Max Y value plotted
    REAL*4        R%HEAD%PLO%VMIN   [   ] Min X value plotted
    REAL*4        R%HEAD%PLO%VMAX   [   ] Max X value plotted

             FSWITCH Frequency switching information (for spectra)
    PARAMETER     MXPHAS=8
    INTEGER*4     R%HEAD%FSW%NPHAS           [    ] Number of phases
    INTEGER*4     R%HEAD%FSW%SWMOD           [code] Switching mode (frequency, position...)
    REAL*8        R%HEAD%FSW%DECAL(MXPHAS)   [ MHz] Frequency offsets
    REAL*4        R%HEAD%FSW%DUREE(MXPHAS)   [   s] Time per phase
    REAL*4        R%HEAD%FSW%POIDS(MXPHAS)   [    ] Weight of each phase
    REAL*4        R%HEAD%FSW%LDECAL(MXPHAS)  [ rad] Lambda offsets
    REAL*4        R%HEAD%FSW%BDECAL(MXPHAS)  [ rad] Beta offsets of each phase
    Codes for SWMOD can be found in SIC%CODE%SWITCH%.

                       CALIBRATION Calibration parameters
    REAL*4        R%HEAD%CAL%BEEFF     [     ] Beam efficiency
    REAL*4        R%HEAD%CAL%FOEFF     [     ] Forward efficiency
    REAL*4        R%HEAD%CAL%GAINI     [     ] Image/Signal gain ratio
    REAL*4        R%HEAD%CAL%H2OMM     [   mm] water vapor
    REAL*4        R%HEAD%CAL%PAMB      [  hPa] Ambient pressure
    REAL*4        R%HEAD%CAL%TAMB      [    K] Ambient temperature
    REAL*4        R%HEAD%CAL%TATMS     [    K] Atmosphere temp. signal band
    REAL*4        R%HEAD%CAL%TCHOP     [    K] Chopper temperature
    REAL*4        R%HEAD%CAL%TCOLD     [    K] Cold load temperature
    REAL*4        R%HEAD%CAL%TAUS      [neper] Opacity signal band
    REAL*4        R%HEAD%CAL%TAUI      [neper] Opacity image band
    REAL*4        R%HEAD%CAL%TATMI     [    K] Atmosphere temp. image band
    REAL*4        R%HEAD%CAL%TREC      [    K] Receiver temperature
    INTEGER*4     R%HEAD%CAL%CMODE     [ code] Calibration mode
    REAL*4        R%HEAD%CAL%ATFAC     [    K] Applied calibration factor (Tcal)
    REAL*4        R%HEAD%CAL%ALTI      [    m] Site elevation
    REAL*4        R%HEAD%CAL%COUNT(3)  [count] Power of Atm., Chopp., Cold
    REAL*4        R%HEAD%CAL%LCALOF    [  rad] Longitude offset for sky measurement
    REAL*4        R%HEAD%CAL%BCALOF    [  rad] Latitude offset for sky measurement
    REAL*8        R%HEAD%CAL%GEOLONG   [  rad] Geographic longitude of observatory
    REAL*8        R%HEAD%CAL%GEOLAT    [  rad] Geographic latitude of observatory
    Codes for CMODE can be found in CLASS%CODE%CALIB%.

              SKYDIP For Skydips observations. No associated data.
    PARAMETER     MSKY=10
    REAL*8        R%HEAD%SKY%SREST        [MHz] Rest frequency
    REAL*8        R%HEAD%SKY%SIMAG        [MHz] Image frequency
    INTEGER*4     R%HEAD%SKY%NSKY         [   ] Number of points on sky
    INTEGER*4     R%HEAD%SKY%NCHOP        [   ]    -   -    -    -  chopper
    INTEGER*4     R%HEAD%SKY%NCOLD        [   ]    -   -    -    -  cold load
    REAL*4        R%HEAD%SKY%ELEV(MSKY)   [rad] Elevations
    REAL*4        R%HEAD%SKY%EMISS(MSKY)  [  ?] Power on sky
    REAL*4        R%HEAD%SKY%CHOPP(MSKY)  [  ?] Power on chopper
    REAL*4        R%HEAD%SKY%COLD(MSKY)   [  ?] Power on cold load

                GAUSS Gauss fit results (for spectra or drifts)
    PARAMETER     MXGAUS=5
    INTEGER*4     R%HEAD%GAU%NLINE           [            ] Number of components
    REAL*4        R%HEAD%GAU%SIGBA           [   Int. unit] Sigma on base
    REAL*4        R%HEAD%GAU%SIGRA           [   Int. unit] Sigma on line
    REAL*4        R%HEAD%GAU%NFIT(3*MXGAUS)  [area,v0,fwhm] Fit results
    REAL*4        R%HEAD%GAU%NERR(3*MXGAUS)  [area,v0,fwhm] Errors

            SHELL "Stellar shell" profile fit results (for spectra)
    PARAMETER     MSHELLFIT=20
    INTEGER*4     R%HEAD%SHE%LSHEL             [   ] Number of components
    REAL*4        R%HEAD%SHE%BSHEL             [   ] Sigma on base
    REAL*4        R%HEAD%SHE%RSHEL             [   ] Sigma on line
    REAL*4        R%HEAD%SHE%NSHEL(MSHELLFIT)  [   ] Fit results
    REAL*4        R%HEAD%SHE%ESHEL(MSHELLFIT)  [   ] Errors

           NH3 "Ammoniac and Hyperfine Structure" profile fit results
                             (for spectra, ex: NH3, HCN)
    PARAMETER     MHFSFIT=12
    INTEGER*4     R%HEAD%NH3%LNH3           [   ] Number of components
    REAL*4        R%HEAD%NH3%BNH3           [   ] Sigma on base
    REAL*4        R%HEAD%NH3%RNH3           [   ] Sigma on line
    REAL*4        R%HEAD%NH3%NNH3(MHFSFIT)  [   ] Fit results
    REAL*4        R%HEAD%NH3%ENH3(MHFSFIT)  [   ] Errors

            ABS "Hyperfine Structure" ABSORPTION profile fit results
                             (for spectra, ex: NH3, HCN)
    PARAMETER     MABSFIT=16
    INTEGER*4     R%HEAD%ABS%LABS           [   ] Number of components
    REAL*4        R%HEAD%ABS%BABS           [   ] Sigma on base
    REAL*4        R%HEAD%ABS%RABS           [   ] Sigma on line
    REAL*4        R%HEAD%ABS%NABS(MABSFIT)  [   ] Fit results
    REAL*4        R%HEAD%ABS%EABS(MABSFIT)  [   ] Errors

                 DRIFT Continuum drift description (for drifts)
    REAL*8        R%HEAD%DRI%FREQ   [ MHz] Rest frequency
    REAL*4        R%HEAD%DRI%WIDTH  [ MHz] Bandwidth
    INTEGER*4     R%HEAD%DRI%NPOIN  [    ] Number of data points
    REAL*4        R%HEAD%DRI%RPOIN  [    ] Reference point
    REAL*4        R%HEAD%DRI%TREF   [   ?] Time at reference
    REAL*4        R%HEAD%DRI%AREF   [rad?] Angular offset at ref.
    REAL*4        R%HEAD%DRI%APOS   [rad?] Position angle of drift
    REAL*4        R%HEAD%DRI%TRES   [   ?] Time resolution
    REAL*4        R%HEAD%DRI%ARES   [rad?] Angular resolution
    REAL*4        R%HEAD%DRI%CBAD   [    ] Blanking value
    INTEGER*4     R%HEAD%DRI%CTYPE  [code] Type of offsets
    REAL*8        R%HEAD%DRI%CIMAG  [ MHz] Image frequency
    REAL*4        R%HEAD%DRI%COLLA  [    ] Collimation error Az
    REAL*4        R%HEAD%DRI%COLLE  [    ] Collimation error El
    Codes for CTYPE can be found in SIC%CODE%COORD%.

             BEAM Beam-switching parameters (for spectra or drifts)
    REAL*4        R%HEAD%BEA%CAZIM  [ rad] Azimuth of observation
    REAL*4        R%HEAD%BEA%CELEV  [ rad] Elevation of observation
    REAL*4        R%HEAD%BEA%SPACE  [ rad] Beam spacing
    REAL*4        R%HEAD%BEA%BPOS   [ rad] Position angle of beams
    INTEGER*4     R%HEAD%BEA%BTYPE  [code] System for angle
    Codes for BTYPE can be found in SIC%CODE%COORD%.

        CONTINUUM Double gaussian and baseline fit results (for drifts)
    PARAMETER     MPOIFIT=8
    INTEGER*4     R%HEAD%POI%LCONT           [   ] Number of components
    REAL*4        R%HEAD%POI%BCONT           [   ] Sigma on base
    REAL*4        R%HEAD%POI%RCONT           [   ] Sigma on line
    REAL*4        R%HEAD%POI%NCONT(MPOIFIT)  [   ] Results
    REAL*4        R%HEAD%POI%ECONT(MPOIFIT)  [   ] Errors
2 VELOCITY
        LAS\SET VELOCITY Mode

    Specify the velocity kind to be used by the current  R  observation  and
    next ones loaded in memory. Mode can be
      - L[sr]   Forces the velocity axis values to Lsr values
      - H[elio] Forces the velocity axis values to Heliocentric values
      - A[uto]  The velocity type is taken from the header of the spectrum
    Default mode is Auto.
2 VIRTUAL
        LAS\SET VIRTUAL ON|OFF
        LAS\SET VIRTUAL CHECK|NOCHECK

    First  command  enables  or  disables  the  buffering of spectra read in
    CLASS. Default is ON.

    A bug in this buffer handling was present from May2006 to  Nov2008.  See
    the news for Dec08 release at http://www.iram.fr/IRAMFR/GILDAS/ for more
    details. Since occurence was small and is difficult to predict, the sec-
    ond  command  enables  or disables an error which is raised when the bug
    would have been encoutered. This is intended to help users to decide  if
    they  should  rerun  or not the processing of their data with the latest
    CLASS releases where the bug is fixed. Default is NOCHECK.
2 WEIGHT
        LAS\SET WEIGHT Type

    Define the weighting to be used for summations. Choices are:
      T[ime], for Time*abs(Fres)/(Tsys**2) (spectrum) or
                  Time*abs(Width)/(Tsys**2) (continuum),
      S[igma], for 1/Sigma**2,
      E[qual], for equal weights.

    The default is TIME. Sigma is not recommended unless  you  just  made  a
    baseline  fit before. Equal weight behaves differently in AVERAGE/STITCH
    and ACCUMULATE (which produces the sum).
2 WINDOW
        LAS\SET WINDOW [wl1 wu1 [wl2 wu2 [...]]] [/VAR array]
                    [/POLYGON [N] [filename1...filenameN]]
                    [/NOCURSOR]

    Defines one or several line windows to be avoided by BASE when fitting a
    baseline. If available, the cursor will be used to specify missing argu-
    ments, unless option /NOCURSOR is present. When using the cursor, enter:
    N  (or Left mouse button) to enter a value, C (or Middle button) to can-
    cel the last entry, H for help, E  (or  Right  button)  for  exit.   The
    boundaries are in current unit. There is no default.

    SET WINDOW /POLYGON [N] [filename1...filenameN]
      Define  the  spectral window(s) through polygon(s). N is the number of
      polygons. If filenames are present, polygons are red from these files.
      If  not,  they are defined interactively with the cursor, and saves in
      files 'i'.pol, where 'i' is the number of the polygon.

    SET WINDOW /VAR win_array
      Define the window from rank 1 array  win_array[1+2*NWIND].  The  array
      must be of the following form:
        win_array[1]=NWIND      number of windows
        win_array[2*i:2*i+1]    boundaries of window num. 'i'
1 SHOW
        LAS\SHOW Arg

    Display  some  parameter defined by SET. Arg can be "ALL" to display all
    parameters specified by SET. See SET command. SHOW command is not stored
    in the stack of commands.
1 SPECTRUM
        LAS\SPECTRUM [Yoff] [/INDEX] [/OBS] [/PEN Ipen]

    /OBS
        Plots  the  spectrum in the R buffer in the units and scales defined
        by SET UNIT and SET MODE. Yoff (default 0) is  a  constant  Y-offset
        added to the plotted values (useful to compare two spectra). The op-
        tion /PEN allows to use a custom pen.

    /INDEX
        Plots the 2D array from the last LOAD command.

    Without option, the behavior depends on SET ACTION (see  PLOT).  Default
    is OBS.
1 STITCH
        LAS\STITCH  [/RESAMPLE NX Xref Xval Xinc Unit] [/NOCHECK [SOURCE|PO-
    SITION|LINE|SPECTROSCOPY|CALIBRATION]] [/IMAGE]

    Stitch (i.e. make the union of) all the spectra of the current index us-
    ing the current weighting function (see SET WEIGHT). The command behaves
    like AVERAGE /RESAMPLE except it ignores the SET ALIGN status  and  com-
    poses the spectra on the signal frequency axis. Use the option /IMAGE to
    compose them on the image frequency axis.

    Bad channels are handled according to SET BAD. A sum may be  interrupted
    by <^C>, but the result is then undefined.

    The command checks the consistency of the index, in particular the posi-
    tional  coincidence  and  calibration  homogeneity  according   to   SET
    [NO]MATCH  and  SET CALIBRATION respectively. The option /NOCHECK allows
    to disable some (using one or several names) or all (no name  given)  of
    these checks.
2 /RESAMPLE
        LAS\STITCH [/RESAMPLE NX Xref Xval Xinc Unit]

    Without  this option, the X axis of the output sum will be automatically
    computed as the composition of all the input frequency axes. The  output
    spectrum  has  the  coarsest  resolution of the input spectra. Those are
    then internally resampled and added on this new axis.

    A custom output X axis can be given with the option  /RESAMPLE  NX  Xref
    Xval  Xinc Unit. The input spectra are internally resampled and added on
    this axis. See HELP RESAMPLE for possible uses and caveats.  The  output
    resolution  can  not be better than the coarsest resolution of the input
    spectra to avoid oversampling.
1 SWAP
        LAS\SWAP

    Exchange the contents of the R and T buffers.
1 TAG
        LAS\TAG Quality_Code List_of_Observations

    Attributes a quality to a given list of Observations. Quality_Code is an
    integer in the range 0-9, and the recommended quality scale is
          0 Unknown
          1 Excellent
          2 Good
          3 Fair
          4 Average
          5 Poor
          6 Bad
          7 Awful
          8 Should never exist
          9 Reserved for deleted Observations
    The  operation  is  immediate and occurs in the OUTPUT file for all ver-
    sions of all Observations specified in the list. If no  list  is  given,
    the  R memory is attributed the specified quality. A FIND operation will
    only select Observations of quality better than (i.e. less or equal  to)
    the quality specified by the SET QUALITY command, or in the /QUALITY op-
    tion.
1 TITLE
        LAS\TITLE [/BRIEF] [/LONG] [/FULL] [/INDEX] [/OBS]

    /OBS
        Writes the header of the Observation currently in R above the  plot-
        ted  data.  The format used is the one selected by SET FORMAT, which
        may be temporarily overridden by the options.

    /INDEX
        Writes the content of the loaded index in a compact form:  Range  of
        scan numbers, of spectrum, of observing dates and of offsets. It may
        be combined the other options (/LONG and /FULL  give  the  same  re-
        sult).

    Without  option,  the behaviour is fixed by SET ACTION level. Default is
    OBS.
1 UPDATE
        LAS\UPDATE

    Update the LAST version of the observation in the R buffer in the output
    file.  You  can  update only the last version. The update OVERWRITES the
    observation. This command MUST BE USED WITH CAUTION; in case of  complex
    manipulations  of  observations, you may get confused and erase precious
    data.

    If more space is needed (e.g., the new version has more header  informa-
    tion),  an  error  is  returned.  You MUST then WRITE the observation to
    avoid loss of information.

    The only typical case where it may be used is in the following sequence:
        GET Number
        MINIMIZE or MODIFY
        UPDATE
1 WRITE
        LAS\WRITE [ObsNum]

    Writes  the  observation in the R buffer onto the output file. If a ver-
    sion of this observation is already in the file, a new  version  of  the
    observation is created. A new observation number can be specified as ar-
    gument. If the implicit (R%HEAD%GEN%NUM) or explicit  (argument  ObsNum)
    value  is  0, automatic numbering is used i.e. a new (unused yet) number
    is chosen (in pratice highest number in use plus one).

    The behaviour depends on the "File Type" (see FILE command):
    - for files of type MULTIPLE, a new version of the spectrum  is  written
      if the ObsNum already exists in the file.
    - for  files  of type SINGLE, the ObservationNumber is automatically set
      to the next one available in the file. If an ObsNum  is  specified  in
      the  command,  WRITE checks if it already exists. If so, it returns an
      error; if not, it sets the specified ObsNum to the written spectrum.
    - for both, the version value (R%HEAD%GEN%VER)  is  always  incremented,
      assuming something has changed in R between the time it has been load-
      ed in memory (or last written) and the current write.
    On return of the command, R%HEAD%GEN%NUM and R%HEAD%GEN%VER are  set  to
    the values which have been used.

    The  information  written depends on the operations done on the observa-
    tion. Existing fit results are written. The calibration  information  is
    written  only  if  the  calibration is checked (see SET CALIBRATION com-
    mand).

    In the case of (old) on-the-fly data, WRITE automatically splits the da-
    ta  into records with entry numbers starting at 1 unless the observation
    number of the first record is given explicitly.
1 ENDOFHELP









