** Make sure you have already followed all the instructions at
   www.ucolick.org/~graves/install_notes.txt.

** Enter IDL by typing:
   
   idl

** To measure Lick indices in your spectra, type:

   lick_ew, 'input_list'

where 'input_list' is the filename for a file containing a list 
of the input fits-format spectra.

The default usage assumes velocity dispersion = 0 for all objects, 
Lick/IDS resolution, vacuum wavelengths, and log-linear wavelength 
dispersion for the spectra (ala SDSS).  The code will measure all 
Lick indices, including smoothing the spectra to Lick/IDS resolution, 
or applying sigma-corrections if the spectra are at resolution 
(including velocity dispersion) even higher than the Lick/IDS system 
(usually true for massive galaxies).  The output is a file containing 
the sigma-corrected index measurements.  If error spectra are provided, 
a second output file containing the errors on the measured indices 
is also created. Default is for error spectra as rms error.

There are several options you can specify when you run the code.

velocity_dispersion = x, where x is either (a) a string that gives the name
		      of an input file which contains the velocity
		      dispersion (in km/s) for each spectrum or (b) a single
		      value which will be used as the velocity
		      dispersion for all input spectra.  If no
		      velocity dispersion is specified, LICKEW assumes
		      velocity dispersion = 0 (probably okay for
		      globular clusters).

resolution = x, where x is either (a) a string that gives the name of
	     an input file which contains the resolution of the
	     instrument used to obtain the spectra for each input
	     spectrum, or (b) a single value which will be used as the
	     resolution for all input spectra (ie. they were all
	     observed on the same instrument). Default is resolution
	     measured in FWHM Angstroms.  The flag /PIX can be used to
	     specify resolution in FWHM pixels.  At this time, only a
	     constant resolution (either in Angstroms or in pixels)
	     can be used across the spectrum.

error_list = 'listname', where 'listname' is the filename for a file 
	     containing a list of input error spectra to measure errors in the Lick 
	     indices.  The list in the file must contain the same number of fits 
	     files as the list of input spectra.

err_exten = x.  (alternative to error_list)
	    If the error spectra are stored in the same FITS files as
	    the spectra, but in a separate FITS extension, set err_exten to the
	    extension number for the error spectra

err_nslice = x. (alternative to error_list)
	     If the error spectra are stored in the same FITS files
	     and THE SAME EXTENSION as the data, but in another
	     dimension of the array, use err_nslice to specify which
	     array slice the error is in.

outfile = 'filename', where 'filename' is the name of the file in 
	  which to store the measured Lick indices.  If none is specified, 
	  LICKEW names the output file 'input_list'_index.  If a list of 
	  error spectra is provided, the output error measurements for the 
	  Lick indices are stores as 'outfile'_err. 



There are several flags which can be set.

/PLOT allows you to watch the index fitting process.  Click in 
      the small window to advance to the next index.  To stop plotting 
      and just measure the indices (much faster!), right-click in the 
      small window.

/AIR allows you to specify that the input spectra are in air wavelengths 
     (default is in vacuum wavelengths!)

/LINEAR allows you to specify linear wavelength binning (default is 
	log-linear)

/PIX specifies that the resolution is in FWHM pixels, instead of the 
     default FWHM Angstroms.

/SN specifies that the error spectra are actually S/N spectra
       (default is rms error).

/SILENT minimizes the text output to the command line while the
	program runs. 


Examples:

To run the code on some of the GC spectra from Ricardo's library of 
integrated GC spectra, (www.noao.edu/ggclib) you would make a file
which contains a list of all the spectra.  The S/N spectra are the
fourth "band", ie. NSLICE=4 of the spectrum array.  In IDL, you would
run: 

     lick_ew, 'list', velocity_dispersion = 'veldisp_file', resolution = 3.1, $
     err_nslice=4, outfile='gc_indices.txt', /air, $
     /linear, /sn, /plot

The GC's have such small velocity dispersions, they can be 
approximated as velocity_disperion = 0.  The resolution is 3.1
Angstroms FWHM.   The spectra have linear wavelengths binning, they
are in air  wavelengths, and the error spectra on your website are in
signal- to-noise rather than flux error units.  

To run the code on a set of three SDSS galaxies, you might type:

   lick_ew, 'galaxy_list', velocity_disperion = 'vdisp_list', $
   resolution = 2.39, err_nslice=3, $
   outfile = 'galaxy_indices.txt', /plot, /pix

because SDSS has log-linear wavelength binning, measures in vacuum 
wavelengths, and has constant resolution in pixels 
(2.39 pix = 70 km/s with their log-linear wavelength dispersion).