The purpose of this circuit is to tell if the laser being used as the reference in the spectrum analyzer is single mode or multi-mode. The spectrum analyzer uses a PZ XTAL to move a grating. With a voltage ramp sent into the PZ the frequency of the spectrum analyzer is sweep over the desired range. The output of the spectrum analyzer is a voltage representing the intensity. This is plotted using the XY function on a scope (intensity vs. frequency). There will be one large peak for each mode of the laser plus smaller peaks for the light being measured. The circuit counts the peaks above a threshold (set by the user). If the number of peaks is larger than the number on the front dial the error line goes high for that sweep. The output is reset during the retrace (negative slope of ramp). If a person is sitting there it's easy to tell if the laser is OK. This is used for unattended data collection. The data collection software records the error signal along with the rest of the data.