# @(#)alice.hlp	19.1  (ESO)  02/25/03  13:43:05 

~CONTEXT
  This context allow interactive manipulation of spectral data.

  Flux integration, rebinning, filtering and fitting are some facilites
that you can see here.


  When you load a 2D spectrum ( or a many rows mean 2D spectrum) this
will be plotted on a small control window and on a MIDAS graphic window.
  A graphical tool set  is given for each window.

  The selected spectrum area is plotted on the MIDAS graphic window and
showed on the small control window.  

  There are three temporary files that store some information :

    TMPalice.tbl    : integration output (Midas table format).
    TMPalice.stat   : multi-gaussian fitting statistics (Ascii file).
    TMPalice.prg    : "Label / Cursor" output (Ascii file).

  These files can be saved using the "Save TMP files" option from the
"Utils" top menu.


     Top menu description
     --------------------

 File ---   Open    : read an image ( .bdf), the line number is assigned
		      in the main form.
	    Save As : name for the output spectrum ( .bdf) 
            Save    : save the current spectrum with the previous given
	              name in the "Save As" option.

 Frame --   Cut X   : change the x limits in the MIDAS graphic window. You
		      must use the left button cursor twice. Exit with
		      any other button.
            Cut Y   : like "Cut X" but for y limits.
	    Unzoom  : Return to original cuts ( from the small control window).  
	    Redraw  : redraw the current selected spectrum area.

 Continuum- Begin   : define the continuum.  Use the graphics cursor to mark
	              the regions of the spectrum where the continuum will be
		      defined.  You may define as many regions as you want.
		      Pairs of positions are required.  Click at the beginning
	              and end of each pair. A magenta arrow should appear at the
		      continuum level where the cursor was set.  Exit with the 
		      middle mouse button. The continuum fit will be drawn.
             Add    : add more points to the continuum definition.  Use the
		      cursor as in the case of "begin".  Notice that begin erases
                      any previous definitions.
             Plot   : plot the fit.  Useful if the fit degree is changed.
             Fit    : Load the new Y values from the spectrum and draw the new
                      continuum fit.


 Filter -    Smooth : apply the mean filter over the current spectrum 
		      using the defined window size in the "Window :" field. 
             Median : like smooth but with a median filter.

 Label --    Label Axis : change the default axis labels.

	     Label / Cursor : put any string on the graphic window. You
		      can select font, angle and size and then use the cursor
		      for fix it. Select the position with the first button
		      and confirm with the second one.
             Load label file : load a previous saved file (TMPalice.prg).
	     Clear labels : clear all the labels from the MIDAS graphic window

 Utils --    Get Cursor : get the x and y values from the graphic window.
	     Save TMP files : save the Alice temporary files .

 Option -    Plote Mode : change the spectrum plot mode. Currently there are
                      two modes : straight line and like-histogram.

 Help ---    On Context : this message.
	     On Help    : how use the help.

 Quit ---    Bye : exit alice without confirmation !!

~HELP
You can get an extended help for each button of the interface by pressing
the right mouse button when the cursor is over the interface button.

~GAUSS
Open the multi-gaussian fitting interface.

~REBIN
Open the interface for the spectrum rebinning 


~INTEGRATE
This button allows to integrate the flux of a spectral feature above or
below the continuum.  A gaussian fit is performed to determine the
wavelength of the feature.  The wings of the feature must be defined
by clicking with the graphics cursor at both sides of the line.
A "arrow" should appear at the positions selected.  Exit with the middle
mouse button. The gaussian fit will be plotted and the line parameters 
displayed in the MIDAS window as follows:

CENTER : position of the line determined by the gaussian fit.
FWHM   : also determined from gaussian fit.
Flux   : total flux of the line determined adding the pixels.  The
         gaussian fit is not used for this parameter.
Contin : flux of the continuum at the position of the line centre.
EQWT   : equivalent width of the feature (negative for abs. lines).
Error  : estimate of the error in the line flux determined based on the
         rms of the continuum fit and the equivalent width of the line.
         The estimate is valid only if t e photon counting errors are much
         larger than the readout noise.

The line parameters are stored in a MIDAS table file called TMPalice.tbl.
If the file exists, the measurements will be appended at the end of the file.
Notice that the file will be erased when you exit from SPECTRA.

~CUTX
Cut the spectrum displayed in the main window in the x direction, displaying 
the result in the Midas graphic window. The middle button finishes the process.

~CUTY
Cut the spectrum displayed in the main window in the y direction, displaying
the result in the Midas graphic window. The middle button finishes the process.

~MOVE
Move the current box over the spectrum displayed in the main windo, displaying
the result in the Midas graphic window. The middle but ton finishes the process.

~UNZOOM
The current box covers the whole spectrum.

~CLEAR
Clear the "Initial guess" and "Fit values" field.

~EXECUTE
 Execute the multi-gaussian fitting using the number of components given.

 If there are no enough initial guesses, these must be given with the
graphical cursor (3 for each gaussian component):

  The first and second clicks are used as fwhm input ( only x values) .
  The third click will provide the central x value and the amplitude
  ( y value over the continuum). 

 You must use the left button  to enter the coordinates. Any other button 
exit.
