After a lot of pain, I figured out my arcs were so off and zig zagging: My derivative function had too much error. After that, things cleared up. Now, my arc detection works better, but it still needs to be improved (I thought about some ideas). I also worked on fixing the error function (success). Lastly, the LMA now works MUCH better because I took the estimated mean from the simple gaussian model (without functional dependence) and set that to the constant parameter of the other gaussian model's mean's functional dependence. If I have a situation like mean1 = .5*x + 5.5 and I pick a snapshot where x = 1, then the estimated initial mean will be approx 6 with the simple model. I use a = 0 and b = 6 when I run the LMA on the mean functional dependence model and it corrects it to a = .5 and b = 5.5. It does this correctly for 2 peaks which are close together, one of which is much smaller. I am somewhat optimistic about these results.