header graphic
************************

Gauss-Hermite Fourier Fitting Software

************************




**********************************************************************
* The Gauss-Hermite Fourier Fitting Software for                     *
* extracting stellar kinematics from galaxy spectra.                 *
**********************************************************************


***************************
PART I: GENERAL INFORMATION
***************************


Authors
-------
 
* Roeland P. van der Marel, 
    1991-1993 : program development, 
                inclusions of velocity profile shape fitting
    1994-1997 : minor modifications and installation on Sun Ultra 170
    address   : Space Telescope Science Institute
                Research Programs Office (RPO)
                3700 San Martin Drive
                Baltimore, MD 21218
                Tel : (+1) 410 338 4931
                Fax : (+1) 410 338 4596
                e-mail   : marel@stsci.edu
                homepage : http://sol.stsci.edu/~marel/
 
* Marijn Franx
    1988-1991 : algorithm development for Gaussian velocity profile fitting,
                initial fortran implementation
    address   : Kapteyn Laboratorium  
                Zernike Gebouw
                Landleven 12
                9747 AD Groningen
                The Netherlands 
                Tel : (+31) 50 3634067
                Fax : (+31) 50 3636100
                e-mail   : franx@astro.rug.nl


Summary of the method
---------------------
 
The line-of-sight velocity profile of the stars in a galaxy is
inferred from an observed galaxy spectrum, by fitting the spectrum
with the convolution of a template spectrum and a velocity profile
that is parameterized as a Gauss-Hermite series. The best-fitting
parameters are determined by chi-squared minimization in Fourier
space.


References
----------
 
The method and various applications are discussed at length in the following
papers:

   - Franx, Illingworth & Heckman, 1989, ApJ, 344, 613
   - van der Marel & Franx 1993, ApJ, 407, 525

The latter can be retrieved from the homepage of R. van der Marel.
 

Acknowledgments
---------------
 
If you have found this software useful for your research, we would
appreciate an acknowledgment to `use of the Gauss-Hermite Fourier
Fitting Software developed by R.P. van der Marel and M. Franx'.


Bug Reports
-----------
 
Please send bug reports and important comments or questions to
marel@stsci.edu
 
 
Caveats
-------
 
This software comes without guarantee and on an `as is' basis. It is
not being actively maintained or upgraded.
 
All original testing of the code was done on a UNIX Sparc 2
workstation with the SunOS operating system in the period
1991-1993. In 1997 I ensured that the code would run on a Sun Ultra
170 workstation with the solaris operating system. However, no further
detailed testing of the code was performed on this operating system.
 
It is not guaranteed that the software will work without problems on
other platforms, with different operating systems and different
compilers. However, the code is close to standard fortran, so if any,
only minor revisions will be necessary.
 
The programs read and write files in either IRAF (.imh) or FITS format. 

  > BEWARE OF USING THE FITS OPTIONS: SEE BELOW. THESE ARE NOT WELL
  > TESTED AND MIGHT YIELD LOW PRECISION OR INCORRECT RESULTS.

Use of the IRAF format requires linking of the code to standard IRAF 
libraries.

To make plots of the results with the programs prog/plotout and
prog/plotlp, you will need to link these programs to the standard MONGO
(copyright: John L. Tonry) library. If you don't have access to MONGO,
you can easily plot the results using other packages, but you will
have to figure out how to do this yourself (should not be a major
hassle).
 
I will consider all requests for use of this software. However, I do
not allow people who have received the software from me to distribute
it to third parties. Anyone who uses this software is encouraged to
send me an email with their address, so that I can send the reports of
bugs and revisions.
 
The determination of stellar kinematics, and in particular
line-of-sight velocity profiles, from galaxy spectra can be very
tricky. Proper care should be given to details such as the continuum
subtraction, low-frequency filtering and template matching. Using this
software as a black-box in a quick-and-dirty manner will almost
certainly lead to erroneous results.


Directory structure
-------------------

The directory structure of the software is as follows:
  
  prog     : source of the main programs
  bin      : executables of the main programs
  lib      : object libraries
  sub      : subroutines used by many of the programs
  fft_nrec : Fourier transform subroutines from Numerical Recipes
  unix     : unix specific subroutines
  fits     : subroutines for reading FITS files
  iraf     : subroutines for reading IRAF files
  examp    : examples of the use of the programs


Installation 
------------

To install the software edit the file setup.com. All site dependent
environment variables should be made to point at the correct directories
and libraries. Then issue the UNIX command

   prompt> source install.com

This will construct all executables and put them in the directory bin.

There are 4 main programs:

   four.f    : This program reads an input galaxy and star spectrum,
               and extracts the stellar kinematics. There are two different
               executables: iraffour.e and fitsfour.e. The former reads
               its input data in IRAF (.imh) format, the latter in
               (bitpix=16 or 32) FITS format. Apart from this, the
               executables are identical. 

   direc.f   : The program four.f can generate a direct access archive 
               (.arch) file which contains residuals of the fits, Fourier 
               transforms of individual spectra, etc. The program direc 
               has two different executables: irafdirec.e and fitsdirec.e.
               These translate a .arch file into an IRAF or FITS file,
               respectively.

   plotout.f : The program plotout.f plots the stellar kinematical results 
               of four.f (the .out* file[s]) using MONGO. The executable is
               called plotout.e.

   plotlp.f  : The program plotlp.f plots the Gauss-Hermite 
               line-of-sight velocity profile fits to the galaxy spectra 
               using MONGO. The executable is called plotlp.e.

If you have trouble linking to the IRAF libraries on your system, you
should delete the lines
        make iraffour.i
        make irafdirec.i
from the file prog/makefile before doing the installation. You 
will still be able to compile and use the programs fitsfour.e and
fitsdirec.e. THIS IS SOMETHING WE DO NOT RECOMMEND: SEE BELOW.

If you have trouble linking to the MONGO libraries on your system, then
delete the lines
        make plotout.i
        make plotlp.i
from the file prog/makefile before doing the installation. You
should be able to view the output of the Gauss-Hermite Fourier
Fitting Software (the .out* file[s]) with some other software package,
such as supermongo or pgplot.

The output of the program direc can be viewed with any available
astronomical software package, such as IRAF, MIDAS, FIGARO etc.

Once the programs have been installed and the executables created, the
environment variables in setup.com are not needed anymore. However, they
are required every time any of the programs is recompiled. Users who
will be modifying the programs regularly may wish to add the command
   source ....path..../setup.com
to their .cshrc file (where ....path.... should be the path to the directory
that contains the file setup.com). 


Examples
--------

The directory examp contains example galaxy and star spectra, as well as
examples of the use of the programs. To run the examples issue the UNIX command
        
   prompt> source examples.com

To understand the examples read the comments in the file examples.com.


Known Bugs:
-----------

* Beware of FITS files

  The software comes with two options: to read and write IRAF (.imh)
  files, or FITS files. I myself have only tested the code with IRAF
  files. The parts of the software that read and write the FITS files
  date from the mid-1980's. Even though they still appear to work, they
  have some severe limitations: The program four.f reads only FITS data
  in BITPIX = 16 or 32 format, and the program direc.f writes only FITS
  data in BITPIX = 16 format. Such FITS files have (very) low precision
  if the range of the data values is large. This can easily happen in a
  galaxy spectrum, where there is much more light near the galaxy center
  than further out. It certainly happens in the .arch files that direc.f
  reads.

  If your spectra are in a FITS format with higher precision than BITPIX =
  16 or 32, we recommend that you transform it to IRAF format (use the
  task dataio.rfits in IRAF), and use the executable iraffour.e. This
  yields much better results than transforming it to BITPIX = 16 or 32
  and using the executable fitsfour.e.

  If you wish to transform a .arch output file to FITS format we
  recommend that you first transform it to IRAF format using the
  executable irafdirec.e. You can then transform it to FITS format using
  the task dataio.wfits in IRAF. The executable fitsdirec.e generally
  doesn't work properly. The output FITS file is basically rubbish
  (because it has to little precision to represent what it is supposed
  to represent).


* The maximum array sizes are hardwired in the fortran code. 
  The software will produce nonsense when run on images with more
  than 4096 columns. 


* It has been reported that the .arch file does not contain proper results
  if both of the variables archiv and verbose (see below) are set to .true..
  If you wish to use the .arch file, I advise to set verbose to .false.


********************************
PART II: MANUAL FOR USING four.f
********************************


Introduction
------------

This manual describes the use of the Gauss-Hermite Fourier Fitting
program (source: prog/four.f; executables: bin/iraffour.e or
bin/fitsfour.e) which extracts line strengths, radial velocities,
velocity dispersions, and the Gauss-Hermite velocity profile
coefficients from galaxy spectra.


1. Method
---------

The basic assumption is that the galaxy spectrum is the convolution of
a suitable template spectrum and a certain line-of-sight velocity
profile (VP). 

The template spectrum should be of similar type as the averaged light
of the galaxy population. In practice K0 III templates work reasonably
well for elliptical galaxies. To obtain accurate results for the VP
deviations from a Gaussian it is often better to adopt a more general
approach. For example, one might adopt a weighted mix of stellar
spectra of different spectral types that optimizes the fit to the
galaxy spectrum (see e.g.: Rix & White 1992; van der Marel 1994).

The velocity profile is expanded in a so-called Gauss-Hermite series
(van der Marel & Franx 1993; see also Gerhard 1993 for a related but
different approach). The lowest order term of the series is a
Gaussian. The higher order terms are orthogonal to this Gaussian. The
lowest order anti-symmetric deviations from a Gaussian are quantified
by the Gauss-Hermite moments h3 and h5, the lowest order symmetric
deviations by h4 and h6. The Gauss-Hermite expansion is useful for
various reasons: (i) it is a straightforward extension of the
conventional assumption of Gaussian VPs; (ii) it yields a set of well
defined uncorrelated parameters; (iii) these parameters can be
measured with accuracy from real data with reliable error bars. Other
than that, there is nothing magical about the expansion. It should be
possible to implement alternative parameterizations in the program
(like sums of Gaussians), but this has not currently been done. The
program was not designed to determine VPs in an unparameterized manner.

The basic problem (where o stands for convolution)
   Galaxy = Template o VP
can be solved in many different ways to obtain the best fitting VP 
(e.g., Franx & Illingworth 1988; Bender 1990; Rix & White 1992; 
van der Marel & Franx 1993; Kuijken & Merrifield 1993; Saha & Williams 1994;
van der Marel 1994). In the Fourier Fitting method we minimize the 
chi_squared defined by:
   chi_squared = SUM_pixels  [ Gal - (Temp o VP) ]^2
To speed up the calculations this chi_squared is evaluated in the Fourier 
domain, which is mathematically equivalent to minimizing it in the pixel 
domain, as a result of Parseval's theorem. 

In various papers, results obtained with our Gauss-Hermite Fourier Fitting
Software have been compared to the results of other methods:

   van der Marel et al 1994: 
     comparison with the Rix & White (1992) method which minimizes chi_squared
     in pixel space.

   van der Marel 1994      : comparison with the van der Marel (1994) method
     which also minimizes chi_squared in pixel space, but in a completely 
     different way using independent software.

   Bender et al 1994       : comparison with the Bender (1990) Fourier
     Correlation Quotient Software.

Agreement was found to be excellent in all cases. This appears to indicate
that: (i) our software contains no major bugs; and (ii) that the Gauss-Hermite
moments can be determined accurately from data of sufficient quality.

Template spectra cannot generally be expected to fit the galaxy
continuum. Fitting the continuum requires a full stellar population
synthesis. To date, no method has been developed to simultaneously do
a stellar population synthesis and a stellar kinematical analysis. Hence,
all existing methods for VP analysis essentially solve
   Galaxy = [Template o VP] + arbitrary continuum terms
as a fudge to correct for this. 

In our Gauss-Hermite Fourier Fitting Method, the continuum is affected
by two operations:
  
  (i) Before anything else a best-fitting polynomial continuum is subtracted 
      from both the galaxy and template spectra. This is always necessary
      in methods that use Fourier transforms (e.g., Brault & White 1971).
      The order of the polynomial is set by the user (NPOLY; see below).

  (ii) When the chi_squared is evaluated over Fourier space, low frequencies
      can be ignored. The low frequency limit is set by the user (LOWF;
      see below). 

If the polynomial order is chosen sufficiently large, additional
Fourier filtering is inconsequential. After continuum subtraction both
the galaxy and template spectrum have negligible power at low
frequencies, hence these frequencies do not contribute at all to the
chi_squared. So in this case one can use LOWF=1. If on the other hand
one uses a relatively small value for the polynomial order, additional
Fourier filtering might be necessary to avoid that one interprets
continuum differences between galaxy and template in terms of stellar
kinematics.

A kinematical analysis of a galaxy spectrum requires suffcient S/N.
Our program starts at the center of the galaxy. It then proceeds in
one direction along the slit, and adds galaxy spectra until a certain
user specified S/N is reached (determined by the parameter NPHOT; see
below). If requested, no rebinning is applied within a certain radius
(RADNOBIN; see below) from the center. The program stops adding
spectra at a certain fraction (SKYFAC; see below) of the sky level
(provided that you have included the sky spectrum in one of the rows
[SKYROW; see below] of the galaxy spectrum), or when the frame ends.
It then proceeds in the same way at the opposite side of the galaxy
center.

Obvious emission lines or ill-subtracted sky lines must be masked in
the analysis to obtain correct results for the stellar
kinematics. This is not trivial in a Fourier space method, because the
values of all pixels are required to take a Fourier Transform.
Masking is therefore done in an iterative way (to apply masking one
must set the parameters ONCE to .FALSE.; see below). First the galaxy
spectrum is analyzed without applying any masking. When all radii have
been analyzed, the program reads from a file which regions are to be
masked. If requested (by answering 1 to the question `Interpolate over
lines in .tmp file (0/1) ?' on the command line), it then replaces the
data in these regions with the best fit it has just obtained. It then
reanalyzes these `interpolated' galaxy spectra. This procedure is
iterated until all effects of the emission or sky lines are
erased. The user specifies the number of iterations.


2. Running the executables
--------------------------

The executables ask for only two things on the command line: The name
of the galaxy spectrum and the name of the template spectrum. The
template spectrum is assumed to be one-dimensional. The galaxy
spectrum is assumed to be two-dimensional, with the spectra along the
rows of the frame. It is assumed that the spectra are completely
reduced, sky-subtracted, and most importantly: rebinned
logarithmically in wavelength. The rebinning and number of pixels etc.
should be the same for the galaxy and template spectra.

!!!   If the input spectra do not conform to these conventions, 
!!!   the software will produce erroneous or no output.

The spectra should be present in the directory from which the
executable is run.  In addition, two files should be
present that set parameters for the program. 

  - a parameter file with the same name as the galaxy spectrum but
        with extension ".par" (e.g., galaxyname.par). This parameter
        file is used typically for parameters that depend only on the
        input galaxy spectrum, and not on the Fourier analysis. 
        Examples are the parameters ALAM and BLAM (see below), that specify
        the wavelengths of the first and last pixel in the spectra.
        [Note: the software does not read or interpret any of the IRAF or
        FITS header information].

  - a parameter file "override.par". This parameter
        file is used typically for parameters that specify the details
        of the Fourier analysis. Examples are the parameters LOWF and LUPF
        (see below), that specify the lowest and highest frequency to include
        in the chi_squared calculation.

Both are Fortran namelist files. The files are normal ascii files, and
can be edited with the standard editors. Together the two parameter
files must contain all the parameters required by the program. There
are no default values. If a parameter is defined in both files, the
value in override.par is the one adopted by the program. Since all
parameters are FORTRAN variables, they can be given in either
lowercase or uppercase font. Here they are listed in uppercase, for
typographical clarity only.

If masking of certain regions is required, an additional input file
should be present with the same name as the galaxy spectrum but with
extension ".lin" (e.g., galaxyname.lin). This file lists the regions
that are to be masked.


3. Input parameters
-------------------

The following parameters must be set in the ".par" files. They may occur
in any order. It does not matter in which of the two files a given parameter
occurs. 


description of the input data
-----------------------------

ALAM 	[real]    : wavelength (in Angstrom) of pixel 1 in the spectra
BLAM	[real]    : wavelength of the last pixel in the spectra
SCALE	[real]    : scale along slit (arcsec/pixel)
CPF	[real]    : Counts per Photon : e.g. for 
                    a CCD equal to (1./(the number of electrons per ADU))
NOISE	[real]    : read-out noise in electrons per pixel
SKYROW	[integer] : row number where skyspectrum is stored. If no skyspectrum 
                    is stored, put this equal to 0.

initial guesses
---------------

LS0     [real]    : initial line strength guess
RV0	[real]    : initial guess for the velocity difference between galaxy
                    and template (approximately the systemic velocity)
SIG0    [real]    : initial velocity dispersion guess. If SIG0=0.0 and
                    SIGVARY=.FALSE., then the method reduces to the
                    crosscorrelation method.

binning in the spatial direction
--------------------------------

CENT	[real]    : position of the galaxy center in pixels (does not have to 
                    be an integer number)
NPHOT	[real]    : minimum number of photons in a spectrum that is to be
                    analyzed. Spectra are binned in the spatial direction
                    until this value is reached. If NPHOT=0.0, then the 
                    binning limits given in BINLIM will be used.
BINLIM	[integer] : array with the binlimits used for binning the galaxy 
                    spectra. A list of integers separated by spaces should 
                    be given.
DIRECT	[logical] : if true, the binlimits given in BINLIM will be used 
                    directly. If false, the binlimits are taken with respect to
                    the center (CENT)
RADNOBIN [real]   : no rebinning is applied in the inner RADNOBIN arcsec from
                    the center (CENT)

which data to use in the spatial direction
------------------------------------------

LOLIM	[integer] : lowest row to use in the galaxy spectrum
UPLIM	[integer] : highest row to use in the galaxy spectrum
SKYFAC	[real]    : maximum contribution of sky in galaxy spectrum. Not used if
                    no skyspectrum is stored.

which data to use in the wavelength direction
---------------------------------------------

NDATA   [integer] : the number of pixels that will be used in doing
                    the fit. This must be equal to or smaller than the 
                    actual number of pixels in the input frames.
ICOLG	[integer] : Number of pixels to skip in the galaxy spectrum. Hence,
                    the first pixel included in the fit is ICOLG+1, the last
                    is ICOLG+NDATA.
ICOLS	[integer] : Number of pixels to skip in the stellar spectrum. Should
                    generally be chosen equal to ICOLG.
NBIN	[integer] : the number of bins to use in the program. This must be a 
                    power of two and must be larger than the actual number of 
                    pixels that is fit to (NDATA).

preparation of the spectra
--------------------------

NPOLY   [integer] : polynomial degree to use in the continuum 
                    subtraction stage.
HAN	[real]    : The spectra are tapered to zero at the ends before
                    taking Fourier Transforms. HAN is the Hanning tapering 
                    factor. Should be set to 0.1 in nearly all cases

doing the fitting
-----------------

SIGVARY [logical] : if true, allow the velocity dispersion to change during 
                    the fit, otherwise the velocity dispersion is kept 
                    constant to its initial value SIG0.
GALSHIFT [logical]: If true, shift the galaxy spectrum (using the value RV0)
                    before doing the fit, otherwise shift the star spectrum.
LUPF	[integer] : Highest Fourier frequency used in evaluating the
                    chi_squared.
LOWF	[integer] : Value characterizing the filtering at low frequencies. 
                    The filter that is applied is an inverted cosine-bell,
                    i.e., zero for frequencies <= LOWF, and then smoothly 
                    rising to unity at 2*LOWF.
NFITMODE [integer]: If 1, fit Gaussian line profiles. 
                    If 2, fit a Gauss-Hermite series.
NORDER  [integer] : order of the Gauss-Hermite series (should be <= 6)

interpolating over emission lines
---------------------------------

ONCE    [logical] : If false the program will allow masking of emission lines,
                    as described above. Use with care !

output
------

ARCHIV	[logical] : if true, intermediate spectra will be stored in 
                    galaxyname.arch. This file can become quite huge.
VERBOSE [logical] : if true, print out all intermediate results on the screen, 
                    and also write them to the file galaxyname.lis
RESID   [integer] : If 1 write relative residuals of the fit to the .arch file,
                    If 2 write the absolute residuals.
INPIXELS [logical]: If true, give the final results in pixels rather than in
                    km/s.


4. Example input files
----------------------


example of file galaxyname.par
                --------------
 $par  
   cpf     = 0.4167
   noise   = 22.517
   scale   = 0.3576
   alam    = 4215.0
   blam    = 4615.0
   cent    = 145.0
   skyrow  = 290
   lolim   = 1 
   uplim   = 289
   nbin    = 2048
   ndata   = 1054
   ls0     = 1.0
   rv0     = 1125.0 
   sig0    = 250.0
 $end


example of file override.par
                ------------
 $par
   sigvary  = .true.
   archiv   = .true.
   direct   = .false.
   verbose  = .false.
   galshift = .true.
   inpixels = .false.
   once     = .true.
   han      = 1.0E-01 
   skyfac   = 1.0
   resid    = 2
   icolg    = 0
   icols    = 0
   nbin     = 1024
   ndata    = 950
   nphot    = 5.0E6
   lowf     = 1
   lupf     = 336
   npoly    = 6
   nfitmode = 2
   norder   = 4
   radnobin = 1.0
 $end


example of file galaxyname.lin
                --------------

Number of emission lines, sky lines     <-- Should be the first line of the file
   3   4
Position and width of emission lines
  50  10
 150  20
 250  30
Position and width of sky lines
 600  10
 700  10
 800  10
 900  10
End                                     <-- Should be the last line of the file


In the .lin file it is important not to deviate from the indicated syntax.
Note that the position of the lines is measured with respect to pixel
numbers ICOLG and ICOLS (see above) in the original input spectra. In cases of
doubt, set VERBOSE=.TRUE. and ARCHIVE=.TRUE., and examine the results.


5. Output files
---------------

On output, the program creates a number of files. Each has the same
name as the input galaxy spectrum, but a different extension.
  - ".out*"  : one or two files that contain the results of the program
               in tabular format. The results can be plotted with the programs
               plotout and plotlp (see above).
  - ".lis"   : file with a verbose listing of how the programs progress. 
               Generally this file contains the same information as printed
               on the screen during run time. If the parameter VERBOSE
               is set to .TRUE. (see below), then many intermediate results
               will be included. 
  - ".arch"  : If the parameter ARCHIVE is set to .TRUE. (see below) this
               file will contain all the analyzed spectra, their Fourier 
               transforms, the fitted continua, etc. (see below) stored as 
               direct access real*4 file. This file can be converted to
               IRAF or FITS using the program direc (see above). 


6. Output error flags
---------------------

The best fitting VP is found using a Levenberg-Marquardt scheme (see
e.g.  Numerical Recipes, Press et al. 1986). In some cases this
algorithm might not converge as it should. If this occurs, the program
adds a certain integer (lets call it ierr) to the returned value for
`dgam', the error in the line strength gamma. The true value of the
line strength error is generally between 0 and 1. Hence, one can
recover from dgam both the error in the line strength and the value of
ierr as follows:
   ierr                     = INT(dgam)
   error in line strength   = dgam - INT(dgam)

The quantity ierr may have the following values:
   0      : The program has converged as it should
   8      : The program has not converged within niter iterations
            (the value of niter is defined in prog/four.f).
   6 or 7 : The convergence criterion has been satisfied in less than
            niter iterations. However, when (as a check) the linearized 
            least-squares problem for chi_squared is solved in the minimum 
            that was found, the algorithm tends to walk away from this 
            minimum again.
            
If a value of 6, 7 or 8 is returned, this is nearly always the result
of too little S/N in the galaxy spectra, resulting in a noisy
chi_squared surface. The Levenberg-Marquardt scheme assumes that the
chi_squared surface is a paraboloid near its minimum. If the
chi_squared surface is too noisy, what typically happens is that the
algorithm keeps wandering near the chi_squared minimum, without ever
properly converging. If an error flag of 6, 7 or 8 is returned, the
values returned by the program are often still very close to the true
minimum.

If convergence is not achieved at several positions in the galaxy, it
might be a good idea to rebin the galaxy spectra to higher S/N (using
the parameter NPHOT, see above).


7. The .arch file
-----------------

If the parameter ARCHIV (see above) is set to .TRUE., a file 
galaxyname.arch is written that contains for each position in the
galaxy the following spectra:

  row 1 : The input galaxy spectrum.
      2 : The continuum fit to the normalized galaxy spectrum, 
          Hanning tapered to zero at the ends.
      3 : The Fourier Power Spectrum of row 2.
      4 : The galaxy spectrum, normalized, continuum subtracted,
          and Hanning tapered to zero at the ends.
      5 : The Fourier Power Spectrum of row 4.
      6 : The galaxy spectrum, normalized, continuum subtracted,
          Hanning tapered to zero at the ends, and Fourier filtered
          according to the values of the parameters LOWF and LUPF 
          (see above).

  row 7-12 : As row 1-6, but now for the template spectrum.

  row 13 : The Fourier Quotient (i.e, the ratio of Fourier Power Spectrum of 
          the galaxy spectrum [row 4] and the Fourier Power Spectrum of the 
          template spectrum [row 10]). The Quotient is taken after 
          applying the Fourier filtering.

  row 14 : The cross-correlation function of the galaxy and the
          template spectrum.

  row 15 : The Fourier Power Spectrum of the residuals of the fit to the
          galaxy spectrum. There is zero power in the frequencies that were
          filterered out before doing the fitting.

  row 16 : The residuals of the fit to the galaxy spectrum in pixel space, 
          either relative (i.e., with the same vertical scale as row 6) or
          absolute (i.e., with the same vertical scale as row 1), depending
          on the value of the parameter RESID (see above). These residuals
          are always Hanning tapered to zero at the ends. In addition, they
          only contain those frequencies that were actually fit, and not
          the low and high frequencies that were filtered out.

The results for all positions in the galaxy are written to the .arch
file consecutively. Hence, rows 1-16 apply to the first galaxy
position that was analyzed, rows 17-32 to the second galaxy position
etc.

The .arch file is written in a `direct access' format. It can be transformed 
to IRAF or FITS format using the program direc (see above).  

The number of columns in each row of the .arch file is equal to the 
parameter NBIN (see above). Note however, that those rows that refer
to pixel space (e.g., 1, 2, 4, 6, ....) contain only NDATA (see above)
columns with actual information. The rows that contain Fourier Power Spectra
contain NBIN/2 columns of actual information (there are also NBIN/2
columns with information on the Fourier Phases, but these are not written
to the .arch file).


8. Estimates of line strength, mean velocity and velocity dispersion
--------------------------------------------------------------------

The Gauss-Hermite Fourier Fitting program calculates the parameters
gamma, V and sigma that determine the best-fitting Gaussian VP to the
data. These are not necessarily the best possible estimates of the
true normalization, mean and dispersion of the VP. If Gauss-Hermite
moments h3, ... are determined, these can be used to try to obtain
better estimates for these quantities. The program implements one way
to do this. The results are called gamtl, vtl and sigtl. These are
obtained by calculating the lowest order moments of the Gauss-Hermite
series that best fits the data. The wings of this series are often
slightly negative or oscillatory. In this calculation the VP is
therefore set to zero beyond its first zero crossing on either side of
the mean velocity.

We urge users to interpret the quantities gamtl, vtl and sigtl only
with very great care. The true moments of the VP depend sensitively on
the VP wings. These are poorly determined observationally, because of
the continuum subtraction that is involved. Hence, it is not quite
clear what the quantities gamtl, vtl and sigtl are really measuring.
The values gamma, V and sigma that determine the best-fitting Gaussian
VP are always well determined. Therefore, from an observational point
of view these are much better quantities to work with.


9. References:
--------------

Bender R., 1990, A&A, 229, 441
Bender R., Saglia R.P., Gerhard O.E., 1994, MNRAS, 269, 785
Brault J.W., White O.R., 1971, A&A, 13, 64
Franx M., Illingworth G.D., 1988, ApJ, 327, L55
Gerhard O.E., 1993, MNRAS, 265, 213
Kuijken K., Merrifield M.R., 1993, MNRAS, 264, 712
Press W.H., Flannery P., Teukolsky S.A., Vetterling W.T., 1986,
   Numerical Recipes, Cambridge University Press, Cambridge
Rix H.W., White S.D.M., 1992, MNRAS, 254, 389
Saha P., Williams T.B., 1994, AJ, 107, 1295
van der Marel R.P., Franx M., 1993, ApJ, 407, 525
van der Marel R.P., 1994, MNRAS, 270, 271
van der Marel R.P., Rix H.W., Carter D., Franx M., White, S.D.M,
   de Zeeuw P.T., 1994, MNRAS, 271, 99



                                    Roeland van der Marel.



Home Return to my home page.

Last modified December 8, 1998.
Roeland van der Marel, marel@stsci.edu.
Copyright © 1998 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.