A model to perform a maximum likelihood fit of the modal coefficients
of a given wavefront to the data provided by curvature sensing devices
is proposed in this work, The fit is directly done from the modal exp
ansion of the wavefront, and not from its first- and second-order deri
vatives, so that the orthogonality properties of the basis functions a
n preserved in the final result. The least-squares estimate of each co
efficient can be obtained as a sum of weighted integrals over the wave
front Laplacian inside a domain and over its outwards normal derivativ
e along the domain edge. Analytical solutions for the weighting functi
ons are given for a modal wavefront expansion in terms of Zernike poly
nomials.