Open whtowbin opened 6 years ago
Exciting!! I won't have time to look at this for awhile, alas, but check the file endings of the stuff it says you changed. A lot of them might be .pyc files.
Hey, I'm about to:
Hey @whtowbin - I looked at it a little bit. The updates to make_area and documentation look reasonable, but why not just include your automated baselines as options in make_baseline? That way you don't have to keep track of two different functions. I leave it to you and Anna to decide what you want the default to be.
Also, I think it will be a huge help if you could also update EXAMPLES.ipynb to include the new options and defaults for both baselines and areas.
As you're doing this - don't worry too much about legacy support for me. My paper will use v0.2.0, and going forward, you and Anna should make this the best thing you can for yourselves and others.
And don't worry about the conflicts between .pyc files. I think I know how to sort that out when it's all ready to merge.
Thank you for the updates! I agree that is might be easier to just have one baseline function with several options. I left it separate for the time being because I actually have several other types of automated baseline and I was considering if there was a way to role them all into one. The current routine is good for most situations but sometimes conflicts with an automated peak fitting routine I have been working on.
For now it might be best to keep them separate until I figure out how best to sort them out.
I am happy to make examples. I will try to do it in the next few weeks. Thanks again, Henry
An automated peak fitting routine! Whoa! That's like the holy grail of pynams. You should check out the open source Matlab program (Google peakfit.m, I think) if you haven't already. There are a couple of commercial programs out there as well - I think one I've read about, maybe in one of Jannick Ingrin's olivine papers, is called PeakFit. I'm all about open-source, but if the existing pynams setup isn't good enough, it might not be worth a lot of your time if you can just buy something satisfactory for maybe not that much money.
I will wait to merge everything into master until you've sorted out what exactly you want to do and added examples (but Anna or whoever can still get the version from your branch if they want it), so just let me know when you want me to look at it again.
Thanks for the tips. I started working on it for my quantitative data analysis class. So far its slow but works well for fitting highly overlapping peaks after you roughly identify the peaks you want to fit in one spectra. It uses Montecarlo methods to sample peak heights and widths and then makes error estimates based on a likelihood function.
At the moment the choice of baseline has a huge effect in my profiles where the baseline varies a lot from spectra to spectra in a profile. This might not be a problem for more straight-forward baselines. After I am done with my master's paper I should try it out on San Carlos.
My ultimate goal is to sample baselines in the Monte Carlo method so thats why I have come up with multiple automated baseline methods.
Super interesting. I look forward to seeing what you come up with.
Updated make_area function and added an automated_baseline function. I have 2 additional automated baseline algorithms that can be implemented as well.
I am still pretty unfamiliar with git but it says I made many more changes than I did. I only made additions to the spectra.py file and nothing else.