Modern direct measurements are based on precision measurements of the atomic energy levels in hydrogen and deuterium, and measurements of scattering of electrons by nuclei. There is most interest in knowing the charge radii of protons and deuterons, as these can be compared with the spectrum of atomic hydrogen and deuterium : the nonzero size of the nucleus causes a shift in the electronic energy levels which shows up as a change in the frequency of the spectral lines. Such comparisons are a test of quantum electrodynamics (QED).