Old 02-07-12, 10:08 AM
Senior Member
Join Date: Sep 2008
Posts: 598
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Likes: 0
Liked 0 Times in 0 Posts
ericm: Thanks. The mailing list is a probably better place to start. Once the patch is fit for public consumption I'll post it there.

efficiency: I am using a Nelder-Mead minimizer with sum of squares as the cost function. As long as the initial guess is ballpark it can usually find a pretty good fit. It can fit all the parameters, but usually it's best to keep mass, eta, and maybe rho fixed. The minimizer can select which parameters to fit, but I need to put in UI controls for that.

I originally tried a linear least squares (this means you have to take m and rho as given). While this was a lot more stable, it often found crazy values (negative CdA, etc). I don't know of a way to do linear least squares with constraints, but if such a beast exists, I think it might work better.

At the moment I am using the GNU Scientific Library implementations, which adds another library dependency, but the relevant routines are fairly short and could be extracted and put into the GC source tree.
stedalus is offline