Function: GAUEST Purpose: Searches for gaussian components in a profile. Category: MATH File: gauest.c Author: K.G. Begeman Use: INTEGER GAUEST( Y , Input REAL ARRAY WORK , Output REAL ARRAY N , Input INTEGER P , Output REAL ARRAY NP , Input INTEGER RMS , Input REAL CUTAMP , Input REAL CUTSIG , Input REAL Q ) Input INTEGER GAUEST Returns number of gaussians found. Y Data points on profile (dimension N). WORK Work array (dimension N). N Number of points in profile (dimension of Y and WORK). P Contains the estimated gaussian parameters on output. The dimension of P should be at least NP. Each gaussian takes three elements of P to store the parameters. First the amplitude, then the centre and third the dispersion. The dispersion is in units of pixels, to get the dispersion in physical units multiply by the grid separation. The centre is in units of pixel offset (relative to first pixel in Y). NP Maximum number of parameters which can be stored in P, i.e. the maximum number of gaussian components, multiplied by 3. RMS The r.m.s. nois level of the profile. CUTAMP Critical amplitude of gaussian. Gaussians below this amplitude will be discarded. CUTSIG Critical dispersion of gaussian. Q Smoothing parameter used in calculating the second derivative of the profile. Q must be greater than zero. Description: The routine uses first an automatic window method to define the signal region. Then the second derivative of the profile in the signal region is calculated by fitting a second degree polynomal. The smoothing parameter Q determines the number of points used for this (=2*Q+1). The gaussians can then be estimated as described by Schwarz, 1968, Bull.Astr.Inst.Netherlands, Volume 19, 405. Updates: Mar 12, 1991: KGB Document created. Apr 15, 2009: VOG Changed definition of NINT to one that uses floor() Nov 8, 2010: JPT Corrected documentation for arguments P and NP.