The quantum phenomenon has to do with the excitation of the mercury atoms. If a sufficiently energetic electrom strikes a mercury atom, it may excite the atom into a higher quantum state. The energy required for the most common excitation is 4.9 eV (electron volts). The mercury atom then de-excites by radiating an ultraviolet photon with a wavelength of 253.7 nm.
Most of the electron-mercury collisions are elastic, meaning that the energy of the electron is not degraded significantly. However, if an electron manages to excite a mercury atom, it must lose 4.9 eV of energy in the process. Consider, then, what happens as the accelerating voltage V is increased from 1.5 V (enough to begin to counter the decelerating voltage). The electrons accelerate as they move from cathode to anode, gaining as much as V electron volts of energy just before they arrive there. First, the electrons will not have enough energy to cause any excitations, so nearly all will reach the collector. When the voltage is greater than 4.9 V, electrons arriving near the anode will have an energy of 4.9 eV, which is enough to excite a mercury atom. If an excitation occurs, they will have lost enough energy that they won't be able to move against the decelerating potential and get to the collector. An excitation doesn't have to occur, however, and so many electrons make it to the collector. Nevertheless, the current at the collector will show a dip when a large number of such excitations is occurring. As the accelerating voltage is increased further, electrons won't have to travel all the way from the cathode to the anode to acquire enough energy to excite a mercury atom. So when they do cause an excitation somewhere closer to the cathode, there will still be enough of a potential drop to allow them to pick up enough speed to make it through to the collector. The current will therefore rise. When the accelerating voltage is 9.8 V, it is then possible for electrons to cause two excitations. At three times 4.9 V they can cause three, and so on.
In summary we expect to see a series of peaks in the current at the collector with a spacing of about 4.9 V and the corresponding dips with the same spacing, corresponding to the excitation energy of 4.9 eV.
The data file ~p6720/examples/smooth/fh_data2 contains the measurement of current vs accelerating voltage (I vs V) collected by a student using this laboratory experiment. There are five peaks. Your task is to locate the voltages where the maxima occur. To do this, you will need to select a few points around each of the maxima. Then you will be asked to do a smoothing cubic spline. The spline will give a smooth curve from which the maximum can be determined.
The best numerical approach would start from a Monte Carlo model of electron transport, leading to an model expression for the peaks. This expression would then be used in a least chi square fit to the data. Since we don't have an analytic expression, we take the more pedestrian approach of "fitting" to a cubic spline.
Note that one can also use the minima for determining the excitation energies.
If you use dcssmo.f you will notice that the subroutine returns the coefficients of the spline polynomial. These can be used to construct the spline curve and find the maxima you need.
All spline smoothing algorithms have an adjustable smoothing parameter, often called "rho". Choose a value for this parameter so that the chi square difference between the data points and the spline is approximately equal to the number of data points N, give or take the square root of N. You will need to compute and write out chi square to monitor this criterion.
A discrete cubic spline is slightly different from the cubic spline discussed in class. The discrete spline matching conditions use finite differences instead of exact derivatives. So the exact derivatives might not be continuous. If you choose the discrete spline step size parameter $h$ to be much smaller than the interval between the x values, you will get better continuity of the first derivative, which is what you want for this project.
Next, you will need to write a program that reads any one of the files, feeds the data to the smoothing spline subroutine with a specified smoothing level, and uses the resulting polynomial coefficients to construct the smooth curve. You may also consider constructing the derivative of the polynomial to help pinpoint the maximum from a zero crossing.