Difference: 20161028_MSciSpectroscopyMeeting (1 vs. 4)

Revision 404 Nov 2016 - WilliamBurrows

Line: 1 to 1
 
META TOPICPARENT name="StewartBoogertSpectroscopy2016"
Improved peak location

Revision 328 Oct 2016 - JamesAngthopo

Line: 1 to 1
 
META TOPICPARENT name="StewartBoogertSpectroscopy2016"
Improved peak location
Line: 7 to 7
 
  • Location of local peaks of Cd at 06.50mm found using for loop and weighted average:
    peaklocated.png

  • Location of local peaks of Cd at 06.50mm found using for loop and weighted average after processing with median filter:
    peaklocatedmfilter.png
Added:
>
>

  • text.txt: Code for peak finders and width
 Improved Gaussian Fits

  • Gaussian function used:
Line: 30 to 33
 
META FILEATTACHMENT attachment="Improved_Cd_0650_Gaussians.png" attr="" comment="Improved Gaussian fits to the Cadmium 6.50mm spectrum peaks" date="1477595882" name="Improved_Cd_0650_Gaussians.png" path="Improved_Cd_0650_Gaussians.png" size="41014" user="zyvb951" version="1"
META FILEATTACHMENT attachment="latex2bf48f8973c95f44e9d89e5f6272740f.png" attr="h" comment="" date="1477600099" name="latex2bf48f8973c95f44e9d89e5f6272740f.png" user="zyvb951" version="1"
META FILEATTACHMENT attachment="gaussian_fit.py.txt" attr="" comment="Improved Gaussian fit python code" date="1477601459" name="gaussian_fit.py.txt" path="gaussian_fit.py.txt" size="4777" user="zyvb951" version="1"
Added:
>
>
META FILEATTACHMENT attachment="text.txt" attr="" comment="Code for peak finders and width" date="1477654767" name="text.txt" path="text.txt" size="3770" user="zyvb137" version="1"

Revision 227 Oct 2016 - WilliamBurrows

Line: 1 to 1
 
META TOPICPARENT name="StewartBoogertSpectroscopy2016"
Changed:
<
<
Correction for peak and width
>
>
Improved peak location
 
Changed:
<
<
  • Second derivative of the data is used rather than the first derivative the negative values from the second derivative gives are simpler to cut off using python.
>
>
  • Second derivative of the data is used over the first derivative as the peak locations are easier to locate via Python using a cut off.

  • Location of local peaks of Cd at 06.50mm found using for loop and weighted average:
    peaklocated.png

  • Location of local peaks of Cd at 06.50mm found using for loop and weighted average after processing with median filter:
    peaklocatedmfilter.png
Improved Gaussian Fits

  • Gaussian function used:
 \begin{equation} f(x) = a e^{- \frac{(x - \mu )^2}{2 \sigma ^2}} + b \end{equation}

  • Where a is amplitude, μ is pixel position, σ is peak width and b is background level.
  • First guess parameters for each peak (obtained from peak finding code) are passed to scipy.optimize.curvefit whose function is defined above. curve_fit returns the optimal parameters which are then passed again to the Gaussian function and the outputs are plotted as fits to the data.

  • Improved Gaussian fits to the Cadmium 6.50mm spectrum peaks:
    Improved_Cd_0650_Gaussians.png
  • Currently x range is limited to 50 pixels of the estimated pixel position, in order for the fit to be able to work
  • Still struggles with closely grouped peaks

 
Deleted:
<
<
  • Location of local peaks found using for loop and weighted average:
    peaklocated.png
 
Deleted:
<
<
  • Location of local peaks found using for loop and weighted average where the data has been filtered using median filter:
    peaklocatedmfilter.png
 -- JamesAngthopo - 27 Oct 2016

META FILEATTACHMENT attachment="peaklocated.png" attr="" comment="Location of local peaks found using for loop and weighted average" date="1477586530" name="peaklocated.png" path="peaklocated.png" size="68084" user="zyvb137" version="1"
META FILEATTACHMENT attachment="peaklocatedmfilter.png" attr="" comment="Location of local peaks found using for loop and weighted average where the data has been filtered using median filter" date="1477586579" name="peaklocatedmfilter.png" path="peaklocatedmfilter.png" size="65624" user="zyvb137" version="1"
Added:
>
>
META FILEATTACHMENT attachment="Improved_Cd_0650_Gaussians.png" attr="" comment="Improved Gaussian fits to the Cadmium 6.50mm spectrum peaks" date="1477595882" name="Improved_Cd_0650_Gaussians.png" path="Improved_Cd_0650_Gaussians.png" size="41014" user="zyvb951" version="1"
META FILEATTACHMENT attachment="latex2bf48f8973c95f44e9d89e5f6272740f.png" attr="h" comment="" date="1477600099" name="latex2bf48f8973c95f44e9d89e5f6272740f.png" user="zyvb951" version="1"
META FILEATTACHMENT attachment="gaussian_fit.py.txt" attr="" comment="Improved Gaussian fit python code" date="1477601459" name="gaussian_fit.py.txt" path="gaussian_fit.py.txt" size="4777" user="zyvb951" version="1"

Revision 127 Oct 2016 - JamesAngthopo

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="StewartBoogertSpectroscopy2016"
Correction for peak and width

  • Second derivative of the data is used rather than the first derivative the negative values from the second derivative gives are simpler to cut off using python.

  • Location of local peaks found using for loop and weighted average:
    peaklocated.png

  • Location of local peaks found using for loop and weighted average where the data has been filtered using median filter:
    peaklocatedmfilter.png
-- JamesAngthopo - 27 Oct 2016

META FILEATTACHMENT attachment="peaklocated.png" attr="" comment="Location of local peaks found using for loop and weighted average" date="1477586530" name="peaklocated.png" path="peaklocated.png" size="68084" user="zyvb137" version="1"
META FILEATTACHMENT attachment="peaklocatedmfilter.png" attr="" comment="Location of local peaks found using for loop and weighted average where the data has been filtered using median filter" date="1477586579" name="peaklocatedmfilter.png" path="peaklocatedmfilter.png" size="65624" user="zyvb137" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback