PaulHancock / Aegean

The Aegean source finding program and associated tools
http://aegeantools.rtfd.io/
Other
47 stars 14 forks source link

replace dependency on `lmfit` with scipy fitting #171

Open PaulHancock opened 2 years ago

PaulHancock commented 2 years ago

The module lmfit was used to allow fitting with constraints since scipy did not offer such a functionality at the time. Now that scipy.otimize.minimize now allows for constraints to be placed on individual parameters, lmfit is no longer needed.

PaulHancock commented 2 years ago

After some inspection of the scipy.optimize.minimize, I conclude that the interface is too different from lmfit to make the transition easy. minimize requires the target and jacobian functions to have the same call signature, which would required me to create a dictionary of the fitting parameters just like we do with lmfit. There seems to be little to be gained from this transition.