RESUMEN
The measurement of the wavefront at the exit pupil of an optical system is a reliable method to investigate its imaging performance. It is sometimes necessary to compare the measurement obtained with a wavefront sensor to some known aberration function, which is for example given by a simulation or a gold standard measurement technique such as interferometry. For accurate measurement systems, the residual after direct subtraction of the two wavefronts is often partly due to a mismatch between coordinate systems. We present in this paper a method that uses the Zernike expansion of wavefronts to numerically cancel such small alignment errors. We use this algorithm to quantify the accuracy of a custom-built Shack-Hartmann wavefront sensor in the measurement of known aberration functions.