jjhelmus / nmrglue

A module for working with NMR data in Python
BSD 3-Clause "New" or "Revised" License
209 stars 86 forks source link

Additional options for autops #108

Closed kaustubhmote closed 5 years ago

kaustubhmote commented 5 years ago

This PR does 3 things to the autops function:

  1. Allows an optional return_phases argument. If set to True, the optimized phases will be returned. By default, this is set to False.
  2. Allows additional (optional) keyword arguments to be passed to the scipy.optimize.fmin. The default options work fine most of the time for autops, but this way, one has the option to turn off the (sometimes irritating) convergence messages (using disp=False). Also maxiter and ftol might be useful in some cases. The complete list of options is documented here.
  3. "Normalizes" the return value of the "acme" function to a reasonable number. The current return value is very high and sometimes causes convergence issues. This should fix #102.

None of the above should change the default behavior of the autops function and all changes are backward compatible. This PR has some overlap with #48, but that seems to have stalled, and I am not implementing any of the changes proposed to the "acme" function itself.

jjhelmus commented 5 years ago

LGTM.