comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Gauss2DFit question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Gauss2DFit question [message #19929 is a reply to message #19927] Tue, 09 May 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"K. Bowman" <k-bowman@null.tamu.edu> writes:
> I'm trying to use the library routine GAUSS2DFIT to fit some smooth,
> blobby functions. My experience so far has been ... ah ... suboptimal.
> It does not converge quickly or well.
>
> Example (modified from the example in the manual):
>
...
> yfit = GAUSS2DFIT(z, b, /TILT) ;Fit the function
...

I hope you try MPFIT2DPEAK, which is a drop-in replacement for
GAUSS2DFIT, but is based on the MINPACK-1 family of more robust
fitting routines at my website. The only change I make was to the
function name, otherwise the invocation is the same:

yfit = MPFIT2DPEAK(z,b,/tilt)

MPFIT2DPEAK also has some other cool peak-like functions, and has all
the standard MPFIT-family bells and whistles. Of course you will need
to download MPFIT & MPFIT2DFUN, the service routines that make it go.

http://cow.physics.wisc.edu/~craigm/idl/idl.html

These are the results I got, much closer to what you probably want:

Should be: 5.0000 10.0000 21.3333 10.0000 64.0000 60.0000 0.7854
Is: : 5.0089 10.0095 21.3838 9.9872 64.0621 59.9459 0.7790

Alas, it took a little longer, but my philosophy is slower and right
is better than faster and wrong.

I should also mention that determining the parameters of a peak can be
pretty hard to do automatically, especially when noise is present. I
believe the approach implemented in MPFIT2DPEAK is actually quite a
bit more robust than that of GAUSS2DFIT, but still, it cannot be
perfect.

If you can, I strongly recommend supplying starting values that match
your problem. For example, if you know where the peak is roughly, or
the width of the peak, that can really help the peak finding process.

Good luck!

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interpolating over faults
Next Topic: Gauss2DFit question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:56:43 PDT 2025

Total time taken to generate the page: 0.96736 seconds