scikit-spectra
scikit-spectra copied to clipboard
add curvefitting api
See notebook AUDilution from feb 26 for polynomial fitting. What about general fitting from scipy curvefit/optimize? Thinking either have separate functions for each style:
polyfit gaussfit etc...
Then for general functions, have a final function (gen fit)
Other possibility is to have a fit function with special keywords like poly, gauss but then each function would have its own set of keywords. This is a bit more confusing.
Also, in my use case, I collapsed all values to a single curve. Not sure how to do many curves. EG, 50 curves in a timespectra to get 50 separate polynomial fit functions etc... Maybe store 50 functions in a dictionary then when user actually passed in x-values to an "analyze" function, it returns the time spectra?
Noticed these functions would be really helpful for autobaseline fitting with chaco.