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

Home » Public Forums » archive » mpfit debugging
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
mpfit debugging [message #90140] Fri, 30 January 2015 16:34 Go to previous message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
I'm debugging a program that does a sequence of mpfit calls, where I fix different parameters in different calls. This is mpfit.pro directly, not mpfitfun etc., so the MYFUNCT function returns the difference between measured samples and model data. I also limit some of the parameters.

By making various errors, so far I've noticed that

* if I forget to make the model data real (there are FFTs involved) the report after each iteration has two lines that begin with "Iter", one with the current iteration number followed by "chi-square" and "dof" and one with some other number that does not change from iteration to iteration and is not followed by chi-square" and "dof". (Something like that, it's been a couple of weeks since I fixed this bug.)

* if my initial parameter array has values that are outside the specified limits, mpfit just returns the initial parameters without writing an "Iter" report and without even calling MYFUNCT once.

But what could cause the following behavior?

It writes the initial "Iter 1" report, calls MYFUNCT a bunch of times to calculate the derivatives, then writes an identical "Iter 1" report, and returns the initial parameters as the answer.

I should add that these initial parameters do not happen to be the optimum. I tried again with slightly different values for some of the non-fixed initial parameters, a different chi-square was printed in the "iter 1" report but the behavior was the same.

Does this ring a bell with anyone? What kind of bug should I look for?

/Mats
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Windows XP survey
Next Topic: make_rt change viewplane behaviour

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

Current Time: Wed Oct 08 11:30:02 PDT 2025

Total time taken to generate the page: 0.00403 seconds