Line: 1 to 1 | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
By then selecting one of the peaks a gaussian function can then be fitted to gain estimates for the standard deviation mean and amplitude of the peak. The fit uses the least squares method where {} is minimised. The \sigma_{n_{i}} is the errors in the initial spectral plot above. The Gaussian fit to one of the peaks is shown below: | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
The Gaussian fit returns two arrays of values, the fit parameters which were: amplitude = 2.45174694e+07 | ||||||||||||||||||||||||||
Line: 20 to 20 | ||||||||||||||||||||||||||
and the covariance matrix. The covariance matrix returns values for how much the fit parameters are correlated to each other. The diagonals of the covariance matrix return the variance of each of the fit parameters. For a Gaussian distribution the variance V[x], is equal to the square of the standard deviation, V[x} = (\sigma)^2. Therefore the error in the satndard deviation of the peak can be found from the squareroot of the correct element of the covariance matrix. The covariance matrix for this plot is | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < | [[ 1.53901604e+11 -6.97141082e-01 -1.63287377e+03 -2.26365868e+08] [ -6.97141082e-01 1.60878183e-03 -2.72663680e-07 9.95929048e-03] [ -1.63287377e+03 -2.72663680e-07 9.39810559e-04 2.33274473e+01] [ -2.26365868e+08 9.95929048e-03 2.33274473e+01 1.48494566e+07]] | |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < | The errors can then be found from the diagonal so that. | |||||||||||||||||||||||||
> > | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < | amplitude = (2.45174694 \pm 0.0392302949) e+07 pe | |||||||||||||||||||||||||
> > | . . . The standard deviation of each of the fit parameters can then be found from the squareroot of the diagonal. amplitude = (2.45174694 \pm 0.0392302949) e+07 pe | |||||||||||||||||||||||||
mean =32.1143568 \pm 0.0401096226 | ||||||||||||||||||||||||||
Line: 36 to 44 | ||||||||||||||||||||||||||
The standard deviation of the peak can then be plotted against the distance of the camera from the lens. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
To get the most accurate position for the focus a parabola can then be fitted to the plot of focus, this is shown below. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
The parabola fit then gave a minimum of 19.9mm. Plotting the standard deviation against camera angle The same process could then be repeated where the standard deviation of the peak can be plotted against the angle of the camera. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
By fitting the a parabola similar to the above plot for focus the best angle can be found. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
The parabola gave a best angle of 4.6mm. Mapping the pixel number to the wavelength of the light. To find the corresponding pixel number to wavelength in the above image the three lines were found to have values of 508.5822nm, 479.9912nm and 467.8149nm. By fittig a Gaussian to all three peaks as shown below the peak positions could be estimated. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
These peak values were found at the pixel positions of peak 1 = 168.80845947 \pm 2.65735394668 | ||||||||||||||||||||||||||
Line: 68 to 75 | ||||||||||||||||||||||||||
By then combining these peak values with the previously found peak values above it is possible to find the width of one frame in nm, this was found to be | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < | frame width = 735 pixels = 80.9902944578 \pm 0.82257041263 | |||||||||||||||||||||||||
> > | frame width = 735 pixels = 80.9902944578 \pm 0.82257041263 nm | |||||||||||||||||||||||||
This frame can then be plotted with the correct wavelength values for each peak. | ||||||||||||||||||||||||||
Changed: | ||||||||||||||||||||||||||
< < |
| |||||||||||||||||||||||||
> > |
| |||||||||||||||||||||||||
Then this wavelength will have to be correlated to the micrometer position. | ||||||||||||||||||||||||||
Added: | ||||||||||||||||||||||||||
> > | Faint Peaks
The plot below shows a strong peak on the left with two smaller peaks at pixel positions of approximately 100 and 400. These are the weaker lines on cadmium.
| |||||||||||||||||||||||||
-- Public.JosephBayley - 26 Oct 2015
| ||||||||||||||||||||||||||
Line: 86 to 98 | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
Added: | ||||||||||||||||||||||||||
> > |
|
Line: 1 to 1 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added: | |||||||||||||||||||
> > |
[[ 1.53901604e+11 -6.97141082e-01 -1.63287377e+03 -2.26365868e+08] [ -6.97141082e-01 1.60878183e-03 -2.72663680e-07 9.95929048e-03] [ -1.63287377e+03 -2.72663680e-07 9.39810559e-04 2.33274473e+01] [ -2.26365868e+08 9.95929048e-03 2.33274473e+01 1.48494566e+07]]
The errors can then be found from the diagonal so that.
amplitude = (2.45174694 \pm 0.0392302949) e+07 pe
mean =32.1143568 \pm 0.0401096226
sigma = 2.36989539 \pm 0.0306563298
background = (1.44398361 \pm 0.0385349927) e+05 pe
Plotting the standard deviation against the focus distance
The standard deviation of the peak can then be plotted against the distance of the camera from the lens.
|