Closed charlesll closed 5 years ago
This is now exercise 14. I have some more data files from Penny, but perhaps their addition can wait until next time around. Probably ready for @rmcgirr94 ...
Actually I think I'm going to make this Ex.15, and put the radioactive decay as 14, as that's probably a little easier...
I added an example of peak fitting. It is quite easy to do, but requires to create functions, read the doc of scipy.optimize.curve_fit, and plot things.
Unassigning @rmcgirr94 as it seems clear we will not use this prac for the current session.
https://github.com/valentineap/ComputationalGeoscienceCourse/tree/master/Practicals/Exercise%20N%20-%20Spectroscopy
I added a few lines of code to cut the signal, fit a baseline, and then do trapezoidal integration. My implementation of the trapezoidal function return a bit of a different value than np.trapz (at the 1e-8 decimal...). Any idea why?
I can add peak fitting if you want, we can ask to construct the functions for gaussians and use scipy.optimize.curve_fit.
Let me know!