Kapteyn Institute Kapteyn Package

Module profiles

Author: Hans Terlouw <gipsy@astro.rug.nl>

Function

profiles.gauest(x, y, rms, cutamp, cutsig, q[, ncomp=200, smode=0, flat=False])
Function to search for gaussian components in a profile.
Parameters:
  • x – a one-dimensional NumPy array (or slice) containing the profile’s x-coordinates.
  • y – a one-dimensional NumPy array (or slice) containing the profile’s values.
  • 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. It must be greater than zero.
  • ncomp – maximum number of gaussian components to be found. It should be \(\geq 1\).
  • smode – order in which gaussian components are delivered. 0: decreasing amplitude, 1: decreasing dispersion, 2: decreasing flux.
  • flat – True if a ‘flat’ result shoud be returned. See below.
Returns:

a list with up to ncomp tuples of which each tuple contains the amplitude, the centre and the dispersion of the gaussian, in that order. If the argument flat is True, a ‘flat’ list with ncomp * 3 numbers is returned which may directly be used as initial estimates for kmpfit.Fitter.

In this function 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 (\(2q+1\)). The gaussians are then estimated as described by [Schwarz1968].

See also

Tutorial chapter “Automatic initial estimates for profiles with multi component Gaussians.”

Reference

[Schwarz1968]Schwarz, U.J., 1968. Analysis of an Observed Function into Components, using its Second Derivative, Communication from the Netherlands Foundation for Radio Astronomy and the Kapteyn Astronomical Laboratory at Groningen, 19 405. (local copy)

Table Of Contents

Please cite the Kapteyn Package if you use it in the preparation of a publication. These citations help us to justify the resources spent on this software.