Excel Tutorial 2
Jason Harlow
Task: Plot the gamma-ray spectrum of an emission line source, and overplot a Gaussian on it.
Imagine you have a radioactive source and a Gamma Ray detector, and you take a spectrum of the source. There is some Cobalt-60 in the source, and it emits gamma rays with an energy of 1173 keV. The spectrum is a plot of photon energy versus counts, or number of photons detected. No errors are given for either variable, but it is assumed that photon energy is known precisely, and the error in the counts is the square root of the number of counts. There should be 100 rows of data; the first few lines should look like:
E (keV) | Counts |
1171 | 11 |
1171.05 | 6 |
1171.1 | 16 |
1171.15 | 11 |
1171.2 | 8 |
1171.25 | 10 |
1171.3 | 14 |
1171.35 | 11 |
1171.4 | 9 |
1171.45 | 11 |
1171.5 | 13 |
1171.55 | 12 |
1171.6 | 11 |
1171.65 | 10 |
1171.7 | 10 |
1171.75 | 11 |
1171.8 | 14 |
1171.85 | 6 |
1171.9 | 5 |
1171.95 | 11 |
1172 | 14 |
As first guesses, in cells H1, H2, H3 and H4 enter the values 10, 500, 1173.2 and 0.5. Now use these values in an equation. Click on cell D2 and enter:
= $H$1+$H$2*EXP(-1*(A2-$H$3)^2/(2*$H$4^2))
The dollar signs around the letters of the cell names make these absolute references. That way, when you copy and paste the formula, these will remain the same, and Excel wont try to find the values in the rows below. Do NOT put the dollar signs around the A in A2, since you want this to be pasted as A3, A4, A5, etc. Left-click on cell D2, copy it, then paste it into cells D3-D101.
Back to Excel Hints.