an improved scanning grating useful as an image scanner and spatial frequency filter , for a focusing detector to ascertain the focus of an optical system on deflecting the light incident from the optical system into two different directions for forming two images of the exit pupil or of parts thereof of said optical system . a slit grating is superimposed over the groove grating so that the ledges cover the peaks and the troughs thereof . it is thereby attained that the signals obtained from the peak and trough areas , which normally are more or less undefined , are exempt from evaluation . the ledges have a width ranging from 10 to 100 percent of that of the slit width .