Fit reference

A fit combines a BornAgain simulation, a user-defined residual function, and a Python optimizer. BornAgain also provides helpers for preparing residuals and displaying progress; it does not prescribe the optimizer.

Start with the fitting tutorial for a complete script. This reference explains the purpose and use of each helper. Their docstrings give exact arguments and defaults: try help(ba.valid_pixel_residual) or help(ba.FitMonitor) after importing bornagain as ba.