Alternatively, difference-frequency generation (DFG) can be used. From light at opposite ends of the broadened spectrum the difference frequency is generated in a nonlinear crystal, and a heterodyne beat between this mixing product and light at the same wavelength of the original spectrum is measured. This beat frequency, detectable with a photodiode, is the carrier–envelope offset frequency.