Fig. 1: Two different types of wavefront sensing.
From: Angle-based wavefront sensing enabled by the near fields of flat optics

a Interference between the incident wave and a reference wave produces intensity modulation that can be recorded by photodetector arrays. The reference wave can often be generated from the same incident wave. Multiple interference patterns are usually needed in order to retrieve the wavefront without ambiguity. b Arrays of micro-lenses are used to measure the spatial distribution of incident angles on the wavefront. The size of lenses is usually much larger than the optical wavelength in order to have a good focus.