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

Home » Public Forums » archive » MPFIT parameter errors -0.00000
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: MPFIT parameter errors -0.00000 [message #76049 is a reply to message #75989] Thu, 12 May 2011 10:14 Go to previous messageGo to previous message
Eoj is currently offline  Eoj
Messages: 7
Registered: June 2010
Junior Member
On May 12, 10:31 am, Craig Markwardt <craig.markwa...@gmail.com>
wrote:
> On May 9, 4:35 pm, JoeM <josephmeir...@gmail.com> wrote:
>
>
>
>
>
>> Hello,
>
>>     I was wondering about something strange that seems to be going on
>> with MPFIT in IDL. MPFIT seems to be working and producing a fine
>> looking fit, but the errors on some of the parameters are identically
>> -0.00000. These parameters are not limited or tied to anything at the
>> moment, so they should be producing some parameter error. Output is
>> attached below, MPFIT is ending with a "2" status. Any idea what is
>> going on here? This only seems to happen for a specific data file, for
>> other fits it seems to be working fine.
>
>> Cheers,
>> Joe
>
>> IDL>
>> % MPFIT: WARNING: data is DOUBLE but parameters are FLOAT
>> % MPFIT:          (converting parameters to DOUBLE)
>> Iter      1   CHI-SQUARE =       148.65044          DOF = 99
>>     P(0) =          2.70126E+16
>>     P(1) =          2.02481E+16
>>     P(2) =              32.2569
>>     P(3) =              37.7481
>>     P(4) =          0.000100000
>>     P(5) =              71.0903
>>     P(6) =             0.273900
>>     P(7) =             0.273900
>>     P(8) =              930.748
>>     P(9) =              930.748
>> Iter      1   CHI-SQUARE =       148.65044          DOF = 99
>>     P(0) =          2.70126E+16
>>     P(1) =          2.02481E+16
>>     P(2) =              32.2569
>>     P(3) =              37.7481
>>     P(4) =          0.000100000
>>     P(5) =              71.0903
>>     P(6) =             0.273900
>>     P(7) =             0.273900
>>     P(8) =              930.748
>>     P(9) =              930.748
>
>>       STATUS
>>       2
>
>>       PERROR
>>      -0.00000     -0.00000     0.492911      1.38439      0.00000
>> 0.930223      0.00000
>>       0.00000      0.00000      0.00000
>
> You might find helpful information in the FAQ, in particular...
> http://www.physics.wisc.edu/~craigm/idl/fitqa.html#parstep
>
> It looks like you have a dynamic range problem, given that they cover
> a range of 1e20!!!  Consider re-writing your user function so that the
> parameter values are roughly the same magnitude, and also vary by
> about the same magnitude.  (Which may mean in your case to fit an
> offset to a large value instead of the large value itself.)
>
> Also, this error message,> % MPFIT: WARNING: data is DOUBLE but parameters are FLOAT
>> % MPFIT:          (converting parameters to DOUBLE)
>
> is ominous.  You should strive to maintain consistent numerical
> system, either all single precision or all double precision.
>
> These suggestions will be true, no matter which fitting software you
> use.
>
> Happy fitting,
> Craig Markwardt

Thanks Mark, I'm just puzzled by the fact that the same code seems to
work beautifully on another data set, and just not this one in
particular. MPFIT does converge on the solution, which I can check in
various ways, so it is running correctly.

Will change my floats to doubles though, and convert those huge
numbers to logs to decrease the dynamic range and see if that does
something.

Joe
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Significant Change in Object Programming
Next Topic: Conditional Curve Fitting with multiple Gaussian Components using MPFIT

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

Current Time: Fri Oct 10 06:16:17 PDT 2025

Total time taken to generate the page: 1.19848 seconds