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