>  Docs Center  >  Libraries  >  Markwardt  >  GAUSS1
Libraries

GAUSS1

GAUSS1

Name


  GAUSS1

Author


  Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
  craigm@lheamail.gsfc.nasa.gov

Purpose


  Compute Gaussian curve given the mean, sigma and area.

Major Topics


  Curve and Surface Fitting

Calling Sequence


  YVALS = GAUSS1(XVALS, [MEAN, SIGMA, AREA], SKEW=skew)

Description



  This routine computes the values of a Gaussian function whose
  X-values, mean, sigma, and total area are given. It is meant to be
  a demonstration for curve-fitting.
  XVALS can be an array of X-values, in which case the returned
  Y-values are an array as well. The second parameter to GAUSS1
  should be an array containing the MEAN, SIGMA, and total AREA, in
  that order.

Inputs


  X - Array of X-values.
  [MEAN, SIGMA, AREA] - the mean, sigma and total area of the
                        desired Gaussian curve.

Input Keyword Parameters



  SKEW - You may specify a skew value. Default is no skew.
  PEAK - if set then AREA is interpreted as the peak value rather
          than the area under the peak.

Returns



  Returns the array of Y-values.

Example



  p = [2.2D, 1.4D, 3000.D]
  x = dindgen(200)*0.1 - 10.
  y = gauss1(x, p)
  Computes the values of the Gaussian at equispaced intervals
  (spacing is 0.1). The gaussian has a mean of 2.2, standard
  deviation of 1.4, and total area of 3000.

References


Modification History


  Written, Jul 1998, CM
  Correct bug in normalization, CM, 01 Nov 1999
  Optimized for speed, CM, 02 Nov 1999
  Added copyright notice, 25 Mar 2001, CM
  Added PEAK keyword, 30 Sep 2001, CM



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us