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.