Function: GAUESTD Purpose: Searches for gaussian components in a profile. Category: MATH File: gauestd.c Author: K.G. Begeman Use: INTEGER GAUESTD( Y , Input DOUBLE PRECISION ARRAY WORK , Output DOUBLE PRECISION ARRAY N , Input INTEGER P , Output DOUBLE PRECISION ARRAY NP , Input INTEGER RMS , Input DOUBLE PRECISION CUTAMP , Input DOUBLE PRECISION CUTSIG , Input DOUBLE PRECISION Q ) Input INTEGER GAUESTD 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. noise 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: Double precision version of gauest, using the entire profile as signal region. 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. Jul 08, 1999: VOG Double precision version. Window method removed. Nov 8, 2010: JPT Corrected documentation for arguments P and NP.