Abstract
A compact pupil plane wavefront sensor is described, which is able to image on a single detector four images of the pupil, containing information on the gradient of the incoming wavefront. The wavefront sensor consists of a lens relay and an oscillating pyramidal-shaped prism. The gain of the device is driven by the amplitude of the oscillations, while the sampling is determined by the focal length of the lens relay. This wavefront sensor can be conveniently used for astronomical adaptive optics purposes because of its flexibility to match the brightness of the reference source used (varying the sampling) and the seeing conditions (varying the gain).