Autofocus functions based on the measurement of the high spatial frequency content of the image have proven most precise and robust for microscopy. In some situations, however, the through-focus response of the highpass autofocus functions exhibit local maxima, or side peaks. These violations of unimodality can produce spurious autofocus results. Through-focus phase-contrast images of a stage micrometer and their spectra were studied in order to identify the conditions under which these side peaks are generated. The through-focus spectra suggest the side peaks occur when the bandpass of the filter includes the frequencies that undergo contrast reversals. These contrast reversals occur as a fundamental characteristic imposed by the optical system. Contrast reversals, however, are not seen in the frequency range near the optical cutoff. Thus, it was possible to design narrow bandpass filters that isolated only these frequencies and produced unimodal autofocus functions. Based on unimodality, improved sharpness, and consideration of the conditions present in scanning applications, sharply defined highpass filters should prove best for general microscopy autofocus.