I hope I'm doing something obviously stupid, but I can't figure it out. I'm trying to fit a list of points [x, z, y] (in a cartesian coordinate system) that very closely approximate a shallow sphereical cap. The cap was generated by cutting an approximate sphere with a plane approximately parallel to the x-z plane so that the cap is apprximately symmetrical around the y-axis. Thus the cap can be expressed conveniently as y[x,z], but only less accurately as y[r], where r = Sqrt[x^2 + z^2], because the original sphere's center was not exactly on the y-axis. I have very good guesses for the center location and the radius of curvature; I want more accurate values for these parameters from the fit.
The following expression incorporating all of the degrees of freedom will not converge but wanders off toward very large values of all parameters:
(originalOffset is just a constant that forces the spherical cap to cut the y-axis where I wnat.) In trying to diagnose the problem, I eventually converted the data l1st to the form, [r, y] (r as defined above) and successfully fitted it with a simple two-parameter model (neglecting fitxOffset and fitzOffset):
The above model converges very well, yields reasonable values for fitRadiusOfCurvature and fityOffset, and gives a very low RMS residual. BUT when I try to fit what should be an essentially identical model to the original data list, the convergence fails as describe above for the full model: