Re: gaussfit question [message #17545] |
Fri, 29 October 1999 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mirko (mirko.loehmann@student.uni-magdeburg.de) writes:
> I have a 2D dataset representing a surface (intensity plot of x-ray
> scattering data)
> and i like to fit these data with GAUSS2DFIT() function which does not work.
> So I tried to fit one line of the dataset wit GAUSSFIT which does not
> work either.
>
> This it is confusing to me because other math computer programs
> have no problem with this simple curve.
> Is there something I have to consider?
>
> Cheers
>
> Mirko
>
> IDL> y=[52.0,52.7,56.0,60.9,65.40,71.40, 75.20,
> 80.80,86.1,89.8,88.3,94.8,94.9,100.5,100.1,103.9,105.3,106.2 ,107.3,
> 108.2,106.1,105.7,107.8,102.2,
> 101.3,97.2,92.1,87.4,87.0,82.5,77.4,69.9,67.7, 62.1, 58.9, 53.4,53.8]
> IDL> x=findgen(37)
> IDL> yfit=gaussfit(x,y,a)
> % Compiled module: GAUSSFIT.
> % Compiled module: POLY_FIT.
> % Compiled module: CURVEFIT.
> % Program caused arithmetic error: Floating underflow
I don't see anything here to indicate that GAUSSFIT
didn't *work*. I see it produced a value very near
zero, which is hard to store on a computer, and so
produced a warning. (Which I very much wish RSI would
turn off. No other single thing causes so much
unnecessary anguish as this warning message!)
Why don't you continue on a bit and see if you
get the result you expect.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: gaussfit question [message #17550 is a reply to message #17545] |
Fri, 29 October 1999 00:00  |
Mirko Vukovic
Messages: 124 Registered: January 1996
|
Senior Member |
|
|
In article <3819a9eb@loriot.cs.uni-magdeburg.de>,
"mirko" <mirko.loehmann@student.uni-magdeburg.de> wrote:
> Hi!
>
> I have a 2D dataset representing a surface (intensity plot of x-ray
> scattering data)
> and i like to fit these data with GAUSS2DFIT() function which does not
work.
> So I tried to fit one line of the dataset wit GAUSSFIT which does
not
> work either.
>
> This it is confusing to me because other math computer programs
> have no problem with this simple curve.
> Is there something I have to consider?
>
> Cheers
>
> Mirko
>
> IDL> y=[52.0,52.7,56.0,60.9,65.40,71.40, 75.20,
> 80.80,86.1,89.8,88.3,94.8,94.9,100.5,100.1,103.9,105.3,106.2 ,107.3,
> 108.2,106.1,105.7,107.8,102.2,
> 101.3,97.2,92.1,87.4,87.0,82.5,77.4,69.9,67.7, 62.1, 58.9, 53.4,53.8]
> IDL> x=findgen(37)
> IDL> yfit=gaussfit(x,y,a)
> % Compiled module: GAUSSFIT.
> % Compiled module: POLY_FIT.
> % Compiled module: CURVEFIT.
> % Program caused arithmetic error: Floating underflow
>
>
Maybe the exponent in the gaussian is overflowing. How about
normalizing X
the data to the mean and standard deviation first?
(The other) Mirko
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|