This is a simple example project where I want to extract parameters from piece of spectrum data that I have. My gaussian function has the following form:

@@0@@

Where @@1@@ is a normalisation coefficient, @@2@@ is the center point, @@3@@ defines with the width of the curve and @@4@@ is the height above the x axis.

First lets load and plot the data

Loading output library...
Loading output library...
Loading output library...
Loading output library...

Clearly the data is a nice gaussian, so lets fit the function to get the center point and full-width at half max, which is given by

@@0@@

First we import some code which contains the gauss equation, and the optimize function from scipy to do the curve fitting.

Loading output library...
Loading output library...

So here we have a pretty good fit, and we were able to find the intensity, center point and width of the curve. Lets just finally calculate the FWHM