EFerriss / Pynams

Python package for interpreting FTIR spectra of nominally anhydrous minerals (NAMs)
MIT License
13 stars 4 forks source link

add new and improved automatic baseline creation #30

Open EFerriss opened 7 years ago

EFerriss commented 7 years ago

Henry has been playing with how to make better polynomial baselines automatically. That code and the supporting documentation should be included in pynams as keywords in spectrum.make_baseline() and profile.make_baselines(), ideally also block.make_baselines() at some point.

Should it be the default option? What should the command be? For now, how about we leave the default as a linear baseline, and call this option with kwarg polynomial_order='auto'? Is that too cryptic? I am open!

Henry, your mission, should you choose to accept it:

Make a new git branch - a nice, clean copy to play with. I like these examples

Add the functions Henry has already written into the main pynams code and format.

Update docstrings for spectrum.make_baseline() and profile.make_baselines(). Maybe add links to any background reading that feels excessive in the docstring in the Wiki (a few tabs over).

Update the EXAMPLES jupyter notebook with an example and explanation.

Run ALL the example notebooks to make sure you didn't accidentally break anything.

Commit changes and submit a pull request.

Sound do-able?

whtowbin commented 7 years ago

I'm on it! The only thing I still need to think through is how best to give the user some flexibility on the different iterations of the baseline fit. I'll think of a keyword syntax to allow a user to change the default number of iterations, order of the polynomials, and wave number ranges for each fit.

EFerriss commented 7 years ago

Wahoo!