DS_FITGAUSS_PROFILE(3)

EXPERIMENTAL_FUNC
ds_fitgauss_profile - Fit a gaussian to a 1-dimensional profile.

SYNOPSIS
#include <karma_ds.h>

flag ds_fitgauss_profile

(CONST float *array, CONST uaddr *offsets, unsigned int num_points, double background, flag inverted, double xcentre, double *peak_height, double *fwhm, double *sum)

DESCRIPTION
This routine will fit a gaussian to a 1-dimensional profile. The algorithm uses a non-linear least squares method.

array
    The 1-dimensional array of data.

offsets
    The array of byte offsets for the array data.

num_points
    The length of the array.

background
    The background sky level.

inverted
    If TRUE the object values are inverted (i.e. is negative) else the object is positive.

xcentre
    The centre of the profile. If this is 0 it is assumed the profile is radial (i.e. the centre is at 0).

peak_height
    The height of the fitted peak above the background is written here.

fwhm
    The Full Width Half Maximum of the fit is written here.

sum The sum of the fitted profile above the background is written here.

RETURN VALUE
TRUE on success, else FALSE.

Multi-threading Level
Unsafe.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/