Improving the fit to the line

  • Initially a gaussian convoluted with a circular distribution was fitted to the spectral line, with the equations of:
  • Gaussian:
 \begin{equation} f(x; A,\mu,\sigma) = A \frac{1}{\sqrt{2 \pi \sigma^{2}}} e^{-\frac{(x - \mu)^{2}}{2 \sigma^2}} +b\end{equation}

  • Circle:
 \begin{equation} f(x; A,r,\mu) = A\frac{2 \sqrt{r^2-(x - \mu)^{2}}}{\pi r^2}. \end{equation}
  • This gave a plot of

  • Then for the background term a quadratic was used of the form:
 \begin{equation} f(x) = a_{0}+a_{1}x+a_{2}x^{2} \end{equation}

  • This gave a plot of:

After this a skewed Gaussian was fitted to the spectral line:

  • This has the equation:
 \begin{equation} f(y; A,\mu,\sigma) = A \frac{1}{\sqrt{2 \pi \sigma^{2}}} e^{-\frac{(y - \mu)^{2}}{2 \sigma^2}} +b\end{equation}

  • where $y = b_{0} + b_{1} x + b_{2} x^{2}$
This gave a plot of:


  • Finally the quadratic background was fitted with the skewed gaussian:

  • The parameters for each of the its is listed below:

Parameters Conv Conv+Quadratic back Skew Guass Skew Gauss + Quadratic back
Gauss Amp 364.6 (1.8e7) 347.8 (4.8e6) (3.4160569)e05 (6.231090)e4
Mean 59.410.0003 33.40.001 7771729 -8.5214871
Gauss $\sigma$ 1.9980.001 1.7850.002 75.13489 1.3542369
Circle radius 4.150.004 4.5160.002    
Circle Amplitude 369.8(1.8e7) 388.2(5.4e6)    
background 624.70.2   6120.3  
$b_{0}$     1295931461 0.9306679
$b_{1}$     -5.692644 -0.10819.1
$b_{2}$     0.311407 -0.0059.4
$a_{0}$   6810.41   63.2920
$a_{1}$   -0.3660.009   0.126480
$a_{2}$   0.0960.001   -0.0360.006
$\chi^2$ 191158 138587 131805 127977
$N_{\rm{DOF}}$ 70 70 70 70
$\chi^2$ per DOF 2730 1979 1882 1828

  • it was noticed that towards the edges of the frame the distributions were becoming skewed, this was symmetric on both sides of the chip as the plots below show:

  • This shows a skew on the left side of the chip:

  • This shows a skew to the right of the chip:

  • This shows the same peak in the center

Halogen Lamp

  • To look at the response of the camera a halogen lamp was observed across its spectrum, this gave a plot of:

Are $N_{\mathrm{pe}}$ Poisson?

  • Wanted to check whether $N_{\mathrm{pe}}$ actually followed Poisson distribution, as the errors seemed too small
  • Took 20 frames of the same spectral line. Then studied the same point for each of the 20 frames to see how it fluctuated in each frame.
  • Plotted $N_{\mathrm{pe}}$ against the pixel position #350 for each of the 20 frames, and calculated the $\mu$ and $\sigma$ for the 20 points

Mean $\mu$ Standard Deviation $\sigma$
138928.0 623.85

  • For a Poisson distribution, the standard deviation is equal to the square root of the mean, $\sigma = \sqrt{\mu}$. For 138928 photoelectrons this corresponds to $\sigma$ = 372.73
  • This indicates that $N_{\mathrm{pe}}$ is NOT in fact Poisson distributed, as we had been assuming before?

Mapping wavelength with pixel position and micrometer position

  • First to visualise the fit to the 3d plot the residuals of the points were plotted, this is done by:
 \begin{equation} \rm{Residual} = \frac{\rm{point} - \rm{fitted point}}{\rm{errorbar}} \end{equation}

  • The error bar for $\lambda$ was calculated by propagating the errors in the pixel position and the micrometer position.
  • This was done using the equation:
 \begin{equation} \sigma_{f}^{2} = \sum_{i,j = 1}^{2} \left[ \frac{\partial y}{\partial x_{i}} \frac{\partial y}{\partial x_{j}} \right] V_{ij} \end{equation}
  • where $ x_{1} = m $ ,micrometer position and $x_{2} = \mu$, the position on the camera.
  • The first equation that was fitted was:
 \begin{equation} f(\mu,m) = \lambda_{0} + a_{1} \mu + b_{1} m \end{equation}

  • This gave a residual plot of:

  • This process was then repeated with a quadratic fit with the equation:
 \begin{equation} f(\mu,m) = \lambda_{0} + a_{1} \mu + b_{1} m + a_{2} \mu^{2} + b_{2} m^{2} + c_{2} \mu m \end{equation}
  • This gave a residual histogram of:
  • This was then repeated one more time with a cubic term within the fit:
 \begin{equation} f(\mu,m) = \lambda_{0} + a_{1} \mu + b_{1} m + a_{2} \mu^{2} + b_{2} m^{2} + c_{2} \mu m + a_{3}\mu^{3} + b_{3} m^{3} + c_{3} \mu^{2} m + d_{3} \mu m^{2}\end{equation}
  • This have a histogram of residuals as:
  • this gave parameters for each of the fits as:

Parameters Linear Squared Cubed
$\lambda_{0}$ 275 4 2769 314.923.6
$a_{1}$ 0.10690.0057 0.1180.028 0.0980.092
$b_{1}$ 55.260.66 53.763.57 26.115.1
$a_{2}$   -(23)e-05 (-1.32)e-04
$b_{2}$   0.110.34 5.533.22
$c_{2}$   0.00140.003 0.0030.002
$a_{3}$     (1.171.62)e-07
$b_{3}$     -0.3210.219
$c_{3}$     (-320)e-05
$d_{3}$     (-2.751.67)e-03
$\chi^2$ 7305 7220 6772
$N_{\rm{DOF}}$ 72 72 72
$\chi^2$ per DOF 101 100 94

* Ask about errors that go into the least squares fit, as currently set to one?

---+ Standard Deviation vs Exposure time

  • Took frames of one spectral line of Helium at different exposure times starting at 0.1s, increasing in 0.3s increments up to 3.0s.
  • This was to see how the $\sigma_{\sigma}$ of the line changed with exposure time
  • Did fit an exponential distribution, however this is redundant without any error bars, so we need to sort out our errors before fitting it.


  • The plot below shows vega at 3.5mm grating setting,
  • 120s frame

-- JosephBayley - 22 Nov 2015

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng PoissonTest.png r1 manage 39.6 K 23 Nov 2015 - 21:56 AshleaKemp  
PNGpng SigmaError_Vs_Exposure.png r1 manage 31.0 K 25 Nov 2015 - 07:55 AshleaKemp  
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions

Physics WebpagesRHUL WebpagesCampus Connect • Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r10 - 01 Dec 2015 - JosephBayley

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 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