
1 COMMENT
         ANALYSE\COMMENT [TYPE|READ|WRITE|APPEND|EDIT|DELETE] ["comment"]

    This command READs, TYPEs or DELETEs an existing comment  section  (max.
    length:  1020  characters).   The  options  WRITE,  APPEND and EDIT will
    create a comment section if none is present; the options WRITE or APPEND
    expect  as  argument  the  comment  line  (eventually inclosed in double
    quotes (") when the comment is more than one word long).


1 CUBE
        ANALYSE\CUBE Filename [MATH_EXPRESSION] [/CHANNEL Cmin Cmax]  [/STEP
    Stepx Stepy]

    This command builds either a data-cube or a  2-dimensional  map  at  the
    GILDAS  format  from the current index of scans. It is up to the user to
    ensure that the current index concerns a  single  source  and  a  single
    line,  observed  with  a  unique  spectral  resolution, with all spectra
    centered at the same velocity.

    If 'MATH_EXPRESSION' is present in the command line,  ANALYSE\CUBE  will
    make  a  2-D  map  of  (the  result  of Math_expression applied for each
    spectrum), for each spectra position. This is particulary handy when one
    use  the  SIC  variables  and  functions  (see HELP CUBE Functions, HELP
    LAS\SET VARIABLE and try  the  command  SIC\EXAMINE  /FUNCTION)  in  the
    Math_expression. In that case, The data cube axis types will be
        RA or L
        DEC or B, depending on the type of offsets

    In the other case (i.e., a real data cube of channels values), The  data
    cube axis types will be
        Velocity or Channels or Rest or Image frequencies, depending on  the
    current X unit.
        RA or L
        DEC or B, depending on the type of offsets

    Option /CHANNEL can be used to limit the part of the spectra  that  will
    be included in the cube (no use if you plot a Math_expression).

    Option /STEP can always be used to force the step size of the cube.

    The resulting 2 or 3D data cube can then be processed as a  whole  using
    the  GILDAS  (Grenoble  Image  and  Line Data Analysis System) software.
    GILDAS includes tasks to transpose, reinterpolate, change the projection
    systems,  make  overlays with the IRAS point sources, contours and so on
    from data cubes. Call GRAPHIC at system level and then type EXPLAIN  for
    more information on GILDAS tasks.
2 FUNCTIONS
        The Following Functions have been defined:
        STDV(dummy) returns the integrated  area  (K.Km/s)  of  the  current
    spectrum
        TPEAK(dummy)  returns  the  Peak  temperature  (K)  of  the  current
    spectrum
        VPEAK(dummy) returns the Velocity at  Peak  (Km/s)  of  the  current
    spectrum
        TDV(v1,v2) returns the  integrated  area  (K.Km/s)  of  the  current
    spectrum between velocities V1 and V2
        TPEAKV(v1,v2) returns  the  Peak  temperature  (K)  of  the  current
    spectrum between velocities V1 and V2
        VPEAKV(v1,v2) returns the Velocity at Peak  (Km/s)  of  the  current
    spectrum between velocities V1 and V2
        To create a map of The integrated area of your spectra, type:
        CUBE filename STDV(0)

1 DISPLAY
        ANALYSE\DISPLAY

    Prints the results of the profile fit of R for the  current  method,  if
    any  result of course. For the Gauss (default) Method (see HELP METHOD),
    the command displays  (1)  the  Line  number,  (2)  the  Area,  (3)  the
    Position,  (4)  the  Width  and  (5)  the  Intensity  ,  each with their
    associated errors, and resulting RMS in the Base and Line windows.


1 DIVIDE
         ANALYSE\DIVIDE Threshold

    This command divides the spectrum in R by the spectrum in  T,  which  is
    left  unchanged. The two spectra must be on the same velocity scale (Use
    command RESAMPLE to do so). Threshold is a value to avoid  zero  divide.
    The output spectrum is blanked for channels where abs(T) < Threshold.

1 DRAW
         ANALYSE\DRAW [Action [Parameters]]

    This command executes the specified drawing action, or calls the graphic
    cursor  and  uses  the returned character from the cursor to execute the
    corresponding action. The mnemonic for the cursor characters are : .nf
           F for "FILL" To interpolate a bad channel
           K for "KILL" To flag a bad channel
           L for "LOWER" To flag line identifications, ...
           M for "MASK" To show active masks
           T for "TEXT" To annotate your spectrum
           U for "UPPER" Similar to LOWER
           W for "WINDOW" To show current line  windows  .fi  any  other  to
    display  the channel number, frequency, velocity and antenna temperature
    at the cursor position.  The explicit form does not call the cursor  and
    can be used in procedures.

2 FILL
         ANALYSE\DRAW FILL Nchan

    Interpolates the value of the specified bad channel  using  the  nearest
    valid  channels.  Channel Nchan must be blanked before.  In cursor mode,
    the channel number is retrieved from the cursor position.

2 KILL
         ANALYSE\DRAW KILL Nchan

    Deletes the specified channel, i.e. attributes the blanking value to it.
    In  cursor  mode,  the  channel  number  is  retrieved  from  the cursor
    position.

2 LOWER
         ANALYSE\DRAW LOWER Value "text"

    Draws a vertical line followed by the text  "text"  (written  vertically
    also)  at  abscissa  Value on lower axis. The line length is adjusted to
    approach closely the spectrum value at the corresponding abscissa.

2 MASK
         ANALYSE\DRAW MASK [level]

    Plots the active masks, with bars at  the  mask  positions  and  Y=Level
    (Default 0).

2 UPPER
         ANALYSE\DRAW UPPER Value "text"

    Draws a vertical line followed by the text  "text"  (written  vertically
    also)  at  abscissa Value on the upper axis. The line length is adjusted
    to approach closely the spectrum value at the corresponding abscissa.

2 TEXT
         ANALYSE\DRAW TEXT X Y "text" I

    Writes (horizontally) the string "text" at plot position (X,Y) in  paper
    units, with the centering code I for the string.

2 WINDOW
        ANALYSE\DRAW WINDOW [level]

    Plots the current line windows, with bars  at  the  mask  positions  and
    Y=Level (Default 0).

1 FFT
        ANALYSE\FFT [/REMOVE]

    FFT computes the  Fourier  Transform  of  R  and  plots  it.   R  and  T
    observations  are  unaffected.  There is no control over the plot units,
    and no associated coordinate system (i.e.  you  cannot  measure  periods
    with  the  cursor). You can edit the Fourier Transform using the cursor.
    Strike key K to mark the beginning of an area to delete, move the cursor
    to  the  end of the area to delete and strike key K again. Then strike E
    to exit, and Fourier components are interpolated  in  module  and  phase
    from the boundaries of deleted areas.

    Non  interactive  editing  is  also  possible  and  can  be  useful  for
    repetitive applications. The syntax is then FFT Start End [/REMOVE]

2 /REMOVE
        ANALYSE\FFT /REMOVE

    Remove existing fits of the current method before computing the  Fourier
    transform.  If the Fourier Transform is edited, fits are added back upon
    exit.

1 FILL
        LAS\FILL start end

    Linearly interpolates the spectrum between start and end values (current
    units, not necessary channels). Can be used to remove mesospheric lines,
    several adjacent bad channels...


1 FIT
        ANALYSE\FIT [N]

    Plot the current fitted profile.  The Nth line obtained  the  last  time
    GAUSS  was  executed, or recovered by DISPLAY, is plotted on the screen.
    If N is 0, the sum of all lines is plotted, and if N is not  given,  the
    last value of N is used.

1 GAUSS
        ANALYSE\GAUSS

    GAUSS performs a fit of a theoretical profile in the  R  spectrum  using
    initial values specified by the command LINES. The profile is determined
    by  the  METHOD  command  (GAUSS,  SHELL  or  NH3  lines  are  currently
    implemented,  and a special method, CONTINUUM, may be used for continuum
    data).

    If LINES is 0, an attempt to guess initial values for a single  line  is
    done  by computing the moments of the spectrum.  A first minimisation is
    performed using the Simplex technique; the results are improved and  the
    uncertainties  computed  using  the  Gradient  technique. GAUSS uses the
    masks defined by SET MASK. If GAUSS did not converge, the errors  quoted
    in  the  results  are meaningless, and you should use command ITERATE to
    try to do better.

    For CONTINUUM method, although a linear  baseline  is  fitted  with  the
    gaussian,   only   the   gaussian  parameters  are  displayed.   If  the
    observation was made using beam-switching method and the reference  beam
    appears  in  the  drifts,  a  two-component  gauss  fit  is  done  using
    separation specified in the data.

1 GREG
        ANALYSE\GREG Name [/FORMATTED]  [/READ [X n] [Y m]

    Writes in file Name the contents of current scan as a GILDAS  table,  or
    as a formatted file if the /FORMATTED option is present.

    If the /READ option is present, performs  the  reverse  operation:  load
    the  file  content  in  the  current  scan. Only available for formatted
    files; the equivalent capability for GILDAS tables is available  through
    a combination of DEFINE IMAGE and MODEL.

    For the table, the information stored is :
        1. Intensity
        2. Channel number
        3. Velocity
        4. Offset frequency
        5. Rest frequency
        6. Image frequency
        7. Fitted profiles if any - fit(i),i=0,nline - in column 7+i
    The output table can be put later in a formatted way using  GILDAS  task
    LIST in you need.

    The table may be used as input to GreG to produce fancy plots, or by the
    GILDAS software for other applications. In particular, SIC variables can
    be used to subtract any  of  the  fits  from  the  spectrum  to  produce
    residuals  if  needed.  For plots, note that you can produce essentially
    the same within CLASS, except  under  very  special  circumstances,  and
    moreover that only CLASS can handle the different X-unit simultaneously.

    For the formatted list, less information is written (and it takes longer
    to write it of course) :
        1. Current X unit in column 1
        2. Intensity in column 2
        3. Fitted profiles - (fit(i),i=0,nline) - in column 3+i

        For the /READ option, columns are X 1 Y 2 by default but can be
        changed. If X 0 is given as zero, then only Y is read and X is
        filled with channel numbers. Only very coarse header information
        is filled in. A lot of complementary header editing will often
        be needed.



1 GRID
        ANALYSE\GRID [Filename] [NEW|APPEND] [MATH_EXPRESSION]
        [/CHANNEL [C|V|F|I] min max]
        [/IMAGE [BEAM beam] [LAM nx rx vx ix]  [BETA  ny  ry  vy  iy]  [LIKE
    tempfile]]
        [/PLOT [where]] [/SMOOTH fx fy]

    This command builds a GILDAS table containing the following values
       Column 1   X offset (in radians)
       Column 2   Y Offset (in radians)
       Column 3   Weight of the data
       and
        Columns 4 to... : values of the specified Spectral channel(s)
       or
        Column 4: Result of the mathematical expression
    from the current index of scans. IT IS UP TO THE USER to ENSURE that the
    current  index concerns a SINGLE SOURCE and a SINGLE LINE, observed with
    a UNIQUE SPECTRAL RESOLUTION, with ALL  spectra  centered  at  the  SAME
    VELOCITY.   Option  /IMAGE  is used to grid the data into a (2-d or) 3-d
    cube, option /PLOT to plot a map of channel-averaged data.

    If "Filename" is not present the data is appended to the  current  table
    (the  one  opened by the last GRID command). If "APPEND" is given as the
    second argument the table Filename is opened and data is appended to it;
    otherwise  "NEW"  may  be  specified  to  open  a new table; this is the
    default.

    If "MATH_EXPRESSION" is present in  the  command  line,  Column  4  will
    contain  the result of Math_expression applied for each spectrum.   This
    is particulary handy when one use the SIC variables and  functions  (see
    HELP   CUBE  Functions,  HELP  LAS\SET  VARIABLE  and  try  the  command
    SIC\EXAMINE /FUNCTION) in the Math_expression.

    Option /CHANNEL can be used to limit the part of the spectra  that  will
    be included in the table (not used if you treat a Math_expression).

    The resulting table can then be processed as a whole  using  the  GILDAS
    (Grenoble  Image and Line Data Analysis System) software.  With /IMAGE a
    data cube is created from this table. GILDAS includes tasks  to  do  the
    same job with more flexibility (GRID_SG and GRID_EXTEND), and transpose,
    reinterpolate, change the projection systems,  make  overlays  with  the
    IRAS  point sources, contours and so on from data cubes. Call GRAPHIC at
    system level and then type EXPLAIN for more information on GILDAS tasks.

2 /CHANNEL
        GRID /CHANNEL [CHANNEL|VELO|FREQ|IMAGE] min max

    Select the channels to be used for the tabulation and gridding  process.
    This  fixes the third dimension of the final data cube. Use CHANNEL (the
    default) to give min and max in channels numbers, or one  of  the  other
    units: Velocity, Frequency, ir Image frequency.

2 /IMAGE
        GRID /IMAGE [BEAM beam] [LAM nx rx vx ix] [BETA ny ry vy  iy]  [LIKE
    tempfile]

        Grid the tabulated data in a data cube (or a 2-d image if  only  one
    channel is processed, or a mathematical expression). The cube coordinate
    axes are normally defaulted from the position of the  spectra,  assuming
    that  the  angular  resolution  was  'beam'  (in  current angle units; a
    recommended default is taken for  30m  telescope  data);  otherwise  the
    LAMBDA  and/or  BETA  axes  may be forced by giving the number of pixels
    (nx,ny), the reference  pixel  (rx,ry),  the  coordinate  value  at  the
    reference  pixel  (vx,vy)  ,  and  the pixel size (ix,iy, all in current
    angle units). Finally both coordinate axes may be taken from a  template
    image (LIKE tempfile).

    In the APPEND mode, none of the /IMAGE arguments should  be  given,  the
    current  image  (from  the previous GRID/IMAGE command) is incrementally
    recomputed, adding the new data.  This  is  intended  for  a  real  time
    display while observing.

2 /PLOT
        GRID /PLOT  [WHERE]
        To be used only with /IMAGE. An image of  the  average  of  all  the
    channels is plotted. WHERE plots GreG markers at the observed positions.

2 /SMOOTH
        GRID /SMOOTH fx [fy]
        To be used only with /IMAGE. Smoothes the image by 'fx' and 'fy'.

1 ITERATE
        ANALYSE\ITERATE

    ITERATE tries the GRADIENT technique to improve the last results of  the
    profile  fit.  Do not expect spectacular results if the absolute minimum
    is far away ! Typically, this command should be used if the previous fit
    did  not  converge,  but seems close enough.  If you are using the GAUSS
    method, be cautious not to change the X unit in the mean time.

1 KEEP
        ANALYSE\KEEP

    Save profile fit results in the output  file.   KEEP  is  equivalent  to
    UPDATE,  but  only profile fit results are saved; KEEP is subject to the
    same restrictions as UPDATE.

1 Language
                        ANALYSE\ Language Summary
    COMMENT         : Manipulates the COMMENT section of spectra
    CUBE file [fnct]: Creates a 2 or 3-D data cube for processing by GILDAS.
    DISPLAY         : Prints the results of the profile fit of R.
    DIVIDE          : Divides R spectrum by T spectrum.
    DRAW            : Calls the cursor or plot comments.
    FILL start end  : Linearly interpolates the spectrum between start and end.
    FFT             : Computes and edit Fourier Transform of R.
    FIT [N]         : Plots the current fitted profile.
    GAUSS           : Performs a profile fit.
    GREG [name]     : Makes a TABLE or formatted file from current scan
    GRID file [fnct]: Creates a data table or image for processing by GILDAS.
    ITERATE         : Iterates the profile fit.
    KEEP            : Saves Gaussian fit results in the output file.
    LINES [N]       : Enters the initial values for the profile fit.
    METHOD Arg      : Selects the line profile for fits.
    MAP [M|W]       : Plots a map of spectra (or only their location).
    MEMORIZE Arg    : Memorize the current observation.
    MODEL Var       : Generates a CLASS spectrum from a 1D variable.
    NOISE [S [NEW]] : Generates gaussian noise
    PRINT [Arg]     : Prints values in a formatted file, or a table.
    POPUP           : Zoom a spectrum from a STAMP or MAP plot.
    RESIDUAL [n]    : Computes the residuals of the profile fit.
    RESAMPLE Arg    : Resamples a spectrum on a specified grid
    REDUCE          : Reduces a SKYDIP
    RETRIEVE Arg    : Retrieve an observation from the memories.
    SMOOTH [Arg...] : Smoothes the spectrum in R
    STRIP File      : Creates an image for Position-Velocity plots.
    STAMP           : Displays all spectra in index on one plot.
2 NEWS

        Version 4.1
      - Commands MODEL to generate spectra from SIC variables. 06-Nov-1989
      - Commands MEMORIZE and RETRIEVE to temporarily save  spectra.  8-Apr-
        1988

    Version 4.0
      - Support of method HFS in fits. 1-Feb-1988
      - Support of table format in command PRINT.  10-Jan-1988
      - Command REDUCE for skydips. 1-Dec-1987
      - Support for continuum in GAUSS, ITERATE,  FIT,  DISPLAY,  PRINT  and
        GREG. 1-Oct-1987
      - STRIP command now uses the  GILDAS format. 25-Aug-1986
      - Commands RESAMPLE and DIVIDE added.
      - TABLE format in command GREG. 1-Jul-1986
      - CUBE command for general processing (contour maps, velocity-position
        plots and so on) via the GILDAS software. 20-Jun-1986
1 LINES
        ANALYSE\LINES [N] [/NOCURSOR] [/INPUT File_Name]

    Enter the initial values for the profile fit.   If  argument  "AUTO"  is
    given  instead  of  a number, then the number of lines found in the last
    read spectrum will be used for ITERATE command.

    If N is not specified, then the last value for N is used.  If  N  is  0,
    GAUSS  will  attempt  to  guess  initial  values  for  a  single line by
    computing the moments of the spectrum.  If N is not 0, LINES prompts for
    the initial values for line parameters. These values should be separated
    by spaces and can be entered as SIC expressions as follows:
         Code, Value,     Code, Value,     Code, Value,     Code, Value
      for GAUSS method
         -Temperature-     -Position-        -Width-
      for SHELL method
         -Area (K.MHz)-    -Position-      -Width (MHz)-    -Horn/Center-
      for NH3 method
         -Temperature-     -Position-      -Width (km/s)-     -Opacity-

    The code is an integer interpreted as follows :
            0       adjustable parameter
            1       fixed parameter
            2       adjustable parameter (head of group)
            3       parameter fixed with respect to parameter coded 2 or 4
            4       fixed parameter (head of group)
    Codes 2 3 and 4 are used to fit dependent lines (e.g. HCN, for which the
    displacements  are  4.842  and -7.064 km/s, or -1.431 and 2.088 MHz, and
    line ratios 1:0.6:0.2). Codes 0 and 1 only are allowed for  NH3  method.
    The  value for a parameter with code 3 should be either the ratio to the
    head of group value (for both intensity and width), or the  offset  from
    head of group (for the position).

    If the cursor is on, you will have to define the  boundaries  of  the  N
    lines.  The  program  then  computes  the moments of the spectra between
    these boundaries as input values. You cannot change the  codes  in  this
    way  which  is  meaningfull  ONLY  FOR  FREE and INDEPENDENT lines. This
    cursor selection is not used if you specify the /NOCURSOR option.

    Guesses can be read from  an  input  file  using  the  /INPUT  File_Name
    option. "Free" format is used to read in this input file. The first line
    must contain the number of  lines,  others  are  as  the  input  at  the
    keyboard.

    Command LINES is not supported for method CONTINUUM.
1 MAP
        ANALYSE\MAP [Match|Where] [/CELL Size_X [Size_Y]] [/GRID] [/NOLABEL]
    [/NUMBER]

    Makes a map of spectra. Used in conjonction with the keyword W  (Where),
    MAP  will plot the location of spectra in the current index.  Otherwise,
    MAP computes the offset limits for the spectra  in  the  current  index,
    automatically  adjusts  the  size of a spectrum depending in the current
    box size, then draws the spectra at the position  corresponding  to  the
    offsets, and finally draws the axes with labels.  The only constraint of
    MAP in this mode is that the X and Y limits must be fixed  so  that  the
    spectra share a common scale.

    Argument MATCH can be given to force matching the X to Y ratio, which is
    otherwise  adjusted  so  as  to  make the largest possible drawing.  The
    options control presentation details.

    The actual graphic output is delayed until the end of the index has been
    reached.  This  process  may be slow on some inplementations and graphic
    terminals when the number of spectra is large. The MAP  command  can  be
    interrupted by typing Control-C.

2 /GRID
        ANALYSE\MAP/GRID

    A grid is plotted to separate the spectra.

2 /CELL
        ANALYSE\MAP/CELL Size_X [Size_Y]

    If the option /CELL is given, the cell size of the grid is taken  to  be
    Size_X  by Size_Y (default Size_X) current angular units. Spectra always
    fill the cells.

2 /NOLABEL
        ANALYSE\MAP/NOLABEL

    If the option /NOLABEL is present, the coordinates are not  written  but
    ticks  are  still  present.  Tick can be suppressed by specifying a tick
    size of zero in command SET TICK.

2 /NUMBER
        ANALYSE\MAP/NUMBER

    If the option /NUMBER is present, the observation number is written  for
    each spectrum in the upper left corner.

1 MEMORIZE
        ANALYSE\MEMORIZE [Name]

    If a Name is specified, put a copy  of  the  current  observation  in  a
    "memory"  called  Name.  The  observation  can  later be retrieved using
    command RETRIEVE. If no Name is specified, list  the  currently  defined
    memories. Up to ten memories can be defined at a time.

    MEMORY Name/DELETE can be used to delete the "memory" area.
1 METHOD
        ANALYSE\METHOD Arg [Parameters ...]

    Select the line profile for fits. Five type of profiles are available.
      - GAUSS     Select gaussian profiles.
        Up to 5 Gaussian, dependent  or  independent  can  be  fitted  in  a
        spectrum,  according  to  command lines. Variables are Area Velocity
        and Width (FWHM).
      - SHELL     Horn-type profiles for Circumstellar Shells.
        Variables are 1) Area, 2) Position, 3) Full Width at zero level, and
        4)  Horn-to-center  ratio (-1 for parabolic optically thick lines, 0
        for flat-topped lines, Infinity for perfectly double peaked  lines).
        Profiles  are  symmetric. Up to 5 dependent or independent lines may
        be fitted. Area units are K.MHz.
      - NH3(1,1) or NH3(2,2) or NH3(3,3)
        Compute ammonia line profiles,  with  the  assumptions  of  gaussian
        velocity  distribution  and equal excitation temperatures. Variables
        are 1) Main group  opacity  times  (  Excitation  temperature  minus
        Background  temperature),  2)  Velocity, 3) Width, and 4) Main group
        opacity.  Up to 3 independent lines may be fitted,  but  it  may  be
        slow...
      - HFS FileName    for HyperFine Structure
        This is very similar to the  NH3  method,  but  the  coefficient  to
        describe the hyperfine structure are read in the file FileName.  The
        first line of  this  file  must  contain  the  number  of  hyperfine
        components   (<  40).   The  other  lines  must  contain,  for  each
        component, the velocity  offset  and  the  relative  intensity.  The
        parameters are the same as for NH3 method.
      - CONTINUUM       for Continuum drifts.
        Fit a single gaussian and a linear baseline at the same  time,  with
        automatic   determination  of  the  parameters.  Uses  beam-switched
        information for  two-component  fitting  if  required.  The  command
        METHOD  CONTINUUM  accept additional arguments, which can be used to
        customize the fit.

    METHOD CONTINUUM [Width [Area_Ratio [Width_Ratio]]]
    where
      - Width is the width of the beam in arc seconds. By default, Width  is
        a free parameter.
      - Area_Ratio is the reference to main beam area ratio, used for  beam-
        switch observing. By default, Area_Ratio is 1.
      - Width_Ratio is the reference to main  beam  width  ratio,  used  for
        beam-switch observing. By default, Width_Ratio is 1.
    A * can be used instead of a numerical value  for  each  parameter,  and
    indicates that the parameter is free.

    Note that in command LINES, one enters the peak line antenna temperature
    instead  of  the first variable in the guesses, except for SHELL method.
    Command LINES has no effect for CONTINUUM.

    CONTINUUM and GAUSS methods only are relevant for continuum data,  while
    GAUSS, SHELL, NH3 and HFS methods can be used for spectroscopic data.

1 MODEL
        ANALYSE\MODEL variable [X_variable]

    Generates a CLASS spectrum from a 1D SIC  variable.  Note  that  the  1D
    variable  can be (and frequently is) a subset of a higher dimensionality
    variable. This command is typically used either to generate  test  data,
    or  more  frequently  to  transfer data from a GILDAS image (or cube) to
    CLASS.

    A second variable, if present, is  interpreted  as  an  associated  axis
    scale  for  a presumably non linear frequency axis, as can occur for non
    resampled data from AOS  backends  (or  optical  spectra).  Please  note
    however that non linear axes are a largely untested feature in CLASS.
1 NOISE
        ANALYSE\NOISE [S [NEW]]

    Generates and draws a spectrum with only gaussian noise of rms S, to  be
    compared  with  actual  receiver  noise.   S  defaults to the rms of the
    current spectrum.  If argument NEW  is  present,  the  spectrum  is  not
    plotted  but  the  R  buffer is copied in T, and the generated noise put
    into the R buffer.

1 POPUP
        ANALYSE\POPUP Number
      or
        ANALYSE\POPUP OffX OffY

    POPUP Number will display a separate window containing a  complete  plot
    of  an  observation  specified  by  number,  if  it  has been previously
    displayed by a command STAMP or MAP.

    POPUP OffX OffY will display a separate  window  containing  a  complete
    plot  of  an  observation with offsets matching OffX and OffY, which has
    been  previously  displayed  by  a  command  MAP.  If  more   than   one
    observations  have  the  same  offsets,  only  the  first  one  will  be
    displayed.

    In both cases, POPUP assumes that the index has not been modified  since
    the last STAMP or MAP command.

    POP with argument will active the  cursor  to  select  interactively  th
    eobservation  to  be  displayed. Point the cursor to its spectrum in the
    MAP or STAMP display and press P or click the mouse second  button.  Use
    the  third  button or E to exit the cursor mode. The first button or any
    key will display the offsets or observation number.

1 PRINT
        ANALYSE\PRINT [Arg] [/OUTPUT File] [/TABLE File]

    PRINT enables one to list some parameters in a GreG  compatible  format.
    Arg is an optional argument to precise what to print :
      - FIT       Results of profile fits in current method (default)
        The information written is (1) the  observation  number,  (2,3)  the
        offsets in current angle units, (4,5,...) fit results of the current
        method in the same order  as  in  DISPLAY  command.  For  the  Gauss
        Method,  this  order  is:  (4)  Line  Area, (5) its incertainty  (6)
        Position (7) incert. (8) Width (9) incert. (10) Intensity  (11) Base
        RMS (12) Line RMS.


      - AREA      Integrated area computed by BASE
        The information written is (1) the  observation  number,  (2,3)  the
        offsets in current angle units, (4,5) Area and rms noise.
      - AREA v1 v2 v3 ...  Area in velocity ranges v1 to v2 and  v2  to  v3,
        ... etc.
        The information written is (1) the  observation  number,  (2,3)  the
        offsets in current angle units, (4,5,...) the areas.
      - CHANNEL List   list of channels (in the same format as the  FOR-NEXT
        loop).  Up  to 15 channels at a time may be listed.  The information
        written is (1) the observation number, (2,3) the offsets in  current
        angle units, (4,5,...) the channels value.
      - MOMENT m1 m2 ...   Moments of the observations (area, mean velocity,
        width)  in  the  intervals  [m1,m2]  [m3,m4] etc... Current units is
        used.  The information written is (1) the observation number,  (2,3)
        the  offsets  in current angle units, (4,5,6) area, position, width,
        (7,8,9) etc...

      - POINTING     Results of CONTINUUM method fits printed  in  a  format
        adapted to pointing constants measurements.  The information written
        is (1,2) The observation and  scan  number,  (3)  a  code  for  scan
        direction,  (4,5)  Azimuth  and  Elevation  in  degrees, (6) Time in
        hours, (7,8) Collimation and error along drift direction, (9,10) the
        antenna  number  and  station code, (11,12) Width and error, (13,14)
        Intensity and rms noise, (15) Source name.

      - FLUX         Results of CONTINUUM method fits printed  in  a  format
        adapted  to flux measurements.  The information written is (1,2) The
        observation and scan number, (3) a code for  scan  direction,  (4,5)
        Azimuth  and Elevation in degrees, (6) Time in hours, (7,8) Position
        and error along drift direction, (9)  the  antenna  number,  (10,11)
        Width  and  error,  (12,13) Intensity and rms noise, (14) Image gain
        ratio, (15,16) Signal and Image frequencies, (17) Source name,  (18)
        Observing date.


    /OUTPUT File    Write the results in a formatted file named File instead
    of  on  the  screen. The file is suited for later processing by GreG, in
    particular for contour maps.

    /TABLE File     Write the results in a table named File. This table  can
    also  be  accessed  by  GreG,  in  a much faster (50 times)   way than a
    formatted file. Tables can also handle many more columns than  formatted
    files,  and  they  are  not  limited  in  precision  by  the formatting.
    Mathematical operations can be  done  directly  on  the  table  columns.
    However the FIT results cannot be written to a table.

1 REDUCE
        ANALYSE\REDUCE

    This command reduces a SKYDIP observation, by fitting the  sky  emission
    using  atmospheric  parameters  written in the observation, and displays
    the results : Water vapor content and Telescope Forward Efficiency
1 RESAMPLE
        ANALYSE\RESAMPLE NX Xref Xval Xinc UNIT [shape] [width] [/NOFFT]

    This command resamples a  given  spectrum  on  a  specified  grid.   The
    arguments are:
      NX    the number of channels desired
      Xref  the new reference channel
      Xval  the value at the reference channel
      Xinc  the new channel separation
      UNIT  either VELOCITY or FREQUENCY to indicate the units used for Xval
        and Xinc.
      SHAPE  (optional)  a  keyword  for  the  frequency  response  of   the
        synthesized channels:
          - TBOX means a rectangular function in the delay  domain,  as  for
            unsmoothed   correlator   channels   (sin(pi.x)/(pi.x)   in  the
            frequency domain)
          - TPAR means a parabolic function in  the  delay  domain,  as  for
            smoothed correlator channels (smoothing function used at Plateau
            de Bure)
          - FBOX means a rectangular function in the  frequency  domain  (as
            for filterbank channels)
          - FTRIANGLE means a triangular function in  the  frequency  domain
            (as  for  filterbank  channels, Hanning smoothed) By default the
            shape of the output channels is the same as  the  shape  of  the
            input channels.
      WIDTH (optional) the width of the output  channels  in  units  of  the
        channel separation. The default (and minimum value) is 1.
    The resampling is done in the delay domain, and  the  data  are  Fourier
    transformed, unless the option /NOFFT is used.  The Fourier transform is
    divided by the transform of the input channel shape,  then  extrapolated
    by  zeroes  (if  interpolation  in  the  frequency  domain is required),
    multiplied by the transform of the desired channel  shape,  and  finally
    transformed back to frequency domain.

    The output channel separation usually needs to be slightly  rounded  (to
    enable use of the FFT, the input spectrum must contain a round number of
    output channels). To obtain  an  exact  channel  separation,  the  NOFFT
    option is necessary.

    The WIDTH parameter is used to provide an oversampled output spectrum if
    needed.

    The shape of the input channels is derived from the backend number  read
    in  the  telescope  name  for IRAM-30m spectra: TBox for autocorrelator,
    FBOX for other (filter) backends. Otherwise, rectangular filter channels
    are assumed.

    Resample may be used on on-the-fly scans too.
1 RESIDUAL
        ANALYSE\RESIDUAL [n]

    Compute and draw the residuals of the profile fit.   Copies  R  into  T,
    then  subtract the line profile number N from the spectrum in R. If N is
    0, the sum of all components is subtracted.

1 RETRIEVE
        ANALYSE\RETRIEVE Name

    Retrieve the  observation  in  memory  "Name"  and  copy  it  in  the  R
    observation.

1 SMOOTH
        ANALYSE\SMOOTH [Arg...]

    SMOOTH copies R into T, then degrades the frequency/velocity  resolution
    of R. The arguments are used to specify the method :
      - HANNING      HANNING smoothing is used (default), in which  the  new
        spectrum has twice less channels and twice less resolution.
      - AUTO         uses a cross-validation smoothing with automatic choice
        of  smoothing parameter.  To be used with caution. Noise in adjacent
        channels must be independant, otherwise the algorithm flatly refuses
        to  do  any  smoothing  at  all  (but needs a long computing time to
        realise that...).
      - GAUSS Width  convolves (by multiplication in the Fourier plane) by a
        gaussian of specified width in current units.
      - BOX Ncan     averages Ncan adjacent channels to produce  a  spectrum
        with Ncan less resolution and channels.
      - NOISE Flux Nc  for  each  channel,  sums  at  most  Nc  neighbouring
        channels  until  a  total  flux  Flux  is  reached  in the sum. Then
        attributes the average value (sum  divided  by  number  of  channels
        added)  to  the  channel.  This  smoothing  is non-uniform, strictly
        positive, and has an obvious tendency to produce wings...

1 STAMP
        ANALYSE\STAMP NX [NY] [/NUMBER]

    This command is intended to have a quick look at all the observations in
    the  index.  It  makes  a  plot  of  all  the observations in the index,
    arranged in a "map" of NX by NY observations.  (If  the  index  contains
    many  observations,  they  will  be  very  small,  hence the name of the
    command). The option /NUMBER writes the number of  each  observation  in
    the  upper left part of its box. The command does not require that X and
    Y scales be fixed.

    Command POPUP allows a selective zooming of any observation displayed by
    command STAMP.

1 STRIP
        ANALYSE\STRIP File

    STRIP creates a GILDAS 2-D image which can be used later  by  GILDAS  to
    produce  Velocity-Position plots using command RGMAP. STRIP works on the
    current index, and checks that it defines a true strip along one of  the
    main  directions  ;  that  means you should have build the current index
    with FIND/OFFSET Value * or FIND/OFFSET * Value.  The current X unit  is
    used. The name of the output file must be given.

    If you want to produce a strip not along one of the main directions, you
    will  have  to  change  the offsets of your spectra using command MODIFY
    OFFSETS, and writing the modified spectra in a new output file.

    STRIP can also produce a  GILDAS  2-D  image  from  a  set  of  parallel
    continuum  drifts. The drifts must have the same steps, and be regularly
    spaced.  The index must define a coherent map.

1 END















