[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Peak finding

Simon de Vet <sdevet@is2.dal.ca> writes:
> I have a set of 3-D data, where a single peak should occur for each Z
> value. I wish to know where this peak is.
> Currently, I've been using a gaussian fit with 5 parameters, and using
> the centre of the gaussian as the peak location. This fails when the
> peak is very near the edge of the dataset, but the results in the centre
> are good. I can easily differentiate between good values and noise from
> IDL.
> However, I tried running a different dataset and the gaussian fit just
> hung completely. On experimentation, I discovered that the good data
> hung if I tried a gaussian fit with 4 parameters (which I'd prefer) or
> with 6 parameters.
> I'm looking for a simple, but stable, way of detecting where these peaks
> occur. I'd like to avoid functions that are dependant on only a few
> points (like simply using MAX). It doesn't have to work in all
> situations, but should be happy when both edges of the peak are present.

Hi Simon-- 

Would you be interested in trying my MPFIT2DPEAK function?  This
function is specialized for fitting 2D peaks [ which I assume is what
you have, since you say you have one peak for each Z value, hence one
peak located in the X-Y plane ].

This function uses an initial guess that is not dependent on a single
noisy point.  It finds the "peakiest" signal by examining all data
points above the mean.  The key is that it estimates the width of the
peak based on the estimated volume of the peak, which uses all of the
points on the surface.  I think this is more robust, but sure would
like to hear your experiences!


http://cow.physics.wisc.edu/~craigm/idl/idl.html     (under Fitting)

Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response