An adjustable diffraction grating comprises: an optical element and a distortion mechanism. The optical element has an optical surface for receiving an input radiation beam. The optical element is provided with a plurality of closed channels below the optical surface, above each closed channel the optical surface being formed from a membrane of material. The distortion mechanism comprises one or more actuators that are operable to distort the membranes over the closed channels so as to control the shape of the optical surface and to form a periodic structure on the optical surface which acts as a diffraction grating such that the input radiation beam is diffracted from the optical element to form a plurality of angularly separated sub-beams.