valentineap / ComputationalGeoscienceCourse

Materials for an introductory course in Python programming for geoscientists
7 stars 1 forks source link

Spectroscopy practical #7

Closed charlesll closed 5 years ago

charlesll commented 6 years ago

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!

valentineap commented 6 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 ...

valentineap commented 6 years ago

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...

charlesll commented 6 years ago

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.

valentineap commented 5 years ago

Unassigning @rmcgirr94 as it seems clear we will not use this prac for the current session.