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

Home » Public Forums » archive » IDL beginner-MPFIT questions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL beginner-MPFIT questions [message #85134] Tue, 09 July 2013 09:18 Go to next message
NateM is currently offline  NateM
Messages: 2
Registered: July 2013
Junior Member
Hi all,

I am brand new to IDL and to any sort of programming and I am using IDL and the program mpfit(and mpfitfun) to fit a function to my data. I keep getting an error message "% MPFITFUN: ERROR: PARINFO parameter limits are not consistent". I have 5 parameters, 3 of which have limits being set using rasters and so differ throughout the study area- is this the reason for this error? Or does this mean that some of my grid cells that have data in the dataset to fit have no data in the parameter rasters (this is true-it is a large dataset).
At this point the output is also just returning my minimum limits/starting values-is this the reason? Is there anybody here that can please give me a push in the right direction (How to figure out on my own where the errors are occurring/specific information relating to mpfit-I have already looked through the Markwardt tutorial)?

Thanks a lot!
Nate
Re: IDL beginner-MPFIT questions [message #85145 is a reply to message #85134] Tue, 09 July 2013 14:22 Go to previous messageGo to next message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
Do you mean your limits are a function of current values in parameter space? Perhaps Craig can correct me, but I'm not sure mpfit can handle this. You can limit parameters as a function of other parameters though.

The error you are getting looks like there is a problem with the limits you set, viz., the lower limit is larger than the upper limit. At least, a search though mpfit shows that the line that prints the error you are getting is associated with this problem (line 3093 in the 1.79 version of mpfit).

Can you provide the parinfo structure (well, at least the part that deals with the limits) you are using?
Re: IDL beginner-MPFIT questions [message #85152 is a reply to message #85145] Wed, 10 July 2013 08:11 Go to previous message
NateM is currently offline  NateM
Messages: 2
Registered: July 2013
Junior Member
On Tuesday, July 9, 2013 4:22:34 PM UTC-5, Phillip Bitzer wrote:
> Do you mean your limits are a function of current values in parameter space? Perhaps Craig can correct me, but I'm not sure mpfit can handle this. You can limit parameters as a function of other parameters though.
>
>
>
> The error you are getting looks like there is a problem with the limits you set, viz., the lower limit is larger than the upper limit. At least, a search though mpfit shows that the line that prints the error you are getting is associated with this problem (line 3093 in the 1.79 version of mpfit).
>
>
>
> Can you provide the parinfo structure (well, at least the part that deals with the limits) you are using?


Phillip,

Thank you for the reply. Below is the parinfo structure. The k1,k2,and k4 rasters are the minimum and maximum parameter limits for those 3 parameters while the other two parameters don't vary in space and so are hard-coded.

Perhaps I will recheck my math for the creation of those limits, Thank you for the information.

-Nate

start = fltarr(5)
result = fltarr(ns,nl, 5)
for lines = 0, 999 do begin
for samples = 0, 999 do begin
pi = replicate({fixed:0, limited:[0,0], limits:[0.D,0.D]},5)
pi(0).limited(*) = 1
pi(0).limits(*) = reform(k1[samples, lines, *])

pi(1).limited(*) = 1
pi(1).limits(*) = reform(k2[samples, lines, *])

pi(2).limited(*) = 1
pi(2).limits(0) = 3
pi(2).limits(1) = 30

pi(3).limited(*) = 1
pi(3).limits(*) = reform(k4[samples, lines, *])

pi(4).limited(*) = 1
pi(4).limits(0) = 1
pi(4).limits(1) = 20

start[0] = reform(k1[samples, lines, 0])
start[1] = reform(k2[samples, lines, 0])
start[2] = 3
start[3] = reform(k4[samples, lines, 0])
start[4] = 1
error = [1,1,1,1,1,1,1,1,1,1,1]
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Most Important and urgent_clipping out a portion of image
Next Topic: Plot colors

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

Current Time: Wed Oct 08 15:27:40 PDT 2025

Total time taken to generate the page: 0.00493 seconds