Institituto Astrofísica de Canarias, 38200 La Laguna - SPAIN

Twofitlines is a tool developed within IRAF, optimized to be used with
data containing multiple spectra along the spatial axis of the detector.
A given spectral feature can be decomposed in one or several
Gaussian components.
The results are obtained in handy graphical and text formats.
The error in the fitted parameters is estimated by successive fits to
Montecarlo simulated spectra.
An extra capability allows to measure useful asymmetry parameters for
non-resolved spectral features.

- A given spectral feature can be modeled using one or more components (currently only Gaussian profiles are available),
- The fitting model should be easily and interactively configurable,
- It should keep memory of the best fitting model when moving across the spectra,
- The continuum can be modeled separately from the spectral features, which is especially important when measuring faint emission or absorption lines,
- Close spectral features could be modeled simultaneously. The variation of Gaussian parameters for the various lines can be constrained in different ways,
- It should be used in a similar way in both interactive and background modes.

- 1.
- Two minimization algorithms can be selected, Levenberg-Marquadt or Simplex;
- 2.
- The uncertainty of model parameters is determined by a number
of repeated fits to simulated data in the following way:
- i.
- An specified model with a given number of components is fit to the selected spectral region, obtaining the best fitting model parameters;
- ii.
- Random Gaussian noise is added to each pixel value as computed from the best fitting model. Two type of noises can be added: the noise amplitude is uniform along the spectrum, or based in Poisson statistics;
- iii.
- A new model is fitted to the simulated spectrum, taking as starting values those recently obtained. The new parameter models are saved temporarily. After a number of tries the error of each fitting parameter is computed as the standard deviation.

- 3.
- Output results in non-interactive mode can be saved in graphical and text formats for later inspection;
- 4.
- Initial values for a fit can be read from a database file. This file can be manually edited or directly created from a successful fit. This is very useful for non-interactive processing of large amount of data.

Heckman, T. M., Butcher, H. R., Miley, G. K., & van Breugel, W. J. M 1981, ApJ, 247, 403

Whittle, M. 1985, MNRAS, 213, 1

© Copyright 2000 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA

adass@cfht.hawaii.edu