Accuracy analysis of a Hartmann-Shack wavefront sensor operated with a faint object