Finding errors in spectra

Initially we wanted to find the errors in the spectra plot below. A discrete number of photons will hit the pixel in a certain amount of time, this number of photons follows a Poisson distribution. As the number of photoelectron also follows a Poisson the error is equal to the square root of the number of events, \sigma = \sqrt{N_{\rm{pe}}}. The spectra can then be plotted with the errors included.

  • Spectra_error.png:
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:

  • Peak_fit.png:
The Gaussian fit returns two arrays of values, the fit parameters which were:

amplitude = 2.45174694e+07

mean =32.1143568

sigma = 2.36989539

background = 1.44398361e+05

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

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

  • Focus.png:
To get the most accurate position for the focus a parabola can then be fitted to the plot of focus, this is shown below.

  • Focus_fit.png:
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.

  • Angle.png:
By fitting the a parabola similar to the above plot for focus the best angle can be found.

  • Angle_fit.png:
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.

  • Spectra_position.png:

These peak values were found at the pixel positions of

peak 1 = 168.80845947 \pm 2.65735394668

peak 2 = 282.11434879 \pm 2.37636473875

peak 3 = 553.879099215 \pm 2.8694730656

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

frame width = 735 pixels = 80.9902944578 \pm 0.82257041263

This frame can then be plotted with the correct wavelength values for each peak.

  • Spectra_wavelength.png:

Then this wavelength will have to be correlated to the micrometer position.

-- Public.JosephBayley - 26 Oct 2015

This topic: Public > UserList > StewartBoogert > StewartBoogertAstronomy > StewartBoogertMSciProjects > StewartBoogertSpectroscopy2015 > 20151021_MSciSpectrocopyLab
Topic revision: r1 - 26 Oct 2015 - JosephBayley
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 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