We should investigate using this library to solve our nonlinear least squares problem. https://github.com/ralna/RALFit?tab=readme-ov-file