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]
|