for example and without limitation spatial filter 44 may be moved by a linear motor or a motorized drive screw in accordance with this further embodiment of the present invention spatial filter 44 has an aperture substantially equal to the size of image spot 48 thus when movable spatial filter 44 is located at image plane r u2032 maximum transmission of outgoing beam 33 scattered from illumination spot 32 occurs and trace radiation from diffused scattering around illumination spot 32 is rejected advantageously in accordance with this embodiment of the present invention the use of spatial filter 44 significantly improves the contrast of an image obtained on hartmann shack sensor 50 and as a result the detection of focal spots 52 to be described in detail below can be more precise as further shown in fig1 hartmann shack wavefront sensor 50 comprises lenslet array 51 and ccd camera 53 lenslet array 51 is located at plane p u2032 and ccd camera 53 is located at the focal plane of the lenslet elements of lenslet array 51 wavefront sensor 50 detects the wavefront of outgoing beam 33 when lenslet array 51 forms a pattern of focal spots 52 on ccd camera 53 in accordance with this embodiment of the present invention the output from ccd camera 53 is applied as input to an analyzer not shown for example a personal computer the analyzer then determines the x y z position of a centroid of focal spots in accordance with any one or a.