IDL Library for Least-Squares Minimization Genetic Algorithm Fitting
MGFIT is an IDL Library developed to fit multiple Gaussian functions using a least-squares minimization technique and a random walk method. The initial seed values are guessed by using the MPFIT IDL Library (Markwardt 2009). It uses a genetic-type random walk method originally adopted from the early version of the Fortran program ALFA (Wesson 2016). It measures the continuum curve and subtract it before the flux measurements. The best-fit model residuals, together with the white noise of the spectrum, are used to calculate uncertainties of the fitted lines using the signal-dependent noise model of least-squares Gaussian fitting (Lenz & Ayres 1992).