Аннотация:This paper presents an algorithm and results of measurements of abeam quality (M). The algorithm is based on measurements performed by a Shack-Hartmann wavefront sensor (SHWS). The SHWS was designed to investigate the phase distortions of optical fields. Various wavefront parameters, such as Zernike coefficients of phase expansion, Peak-to-Valley, root-mean-square and intensity distribution, are obtained by using the SHWS. Some results of wavefront measurements are presented in this paper. The sensor developed can be widely used not only in scientific investigations and diagnostics, but also in adaptive optical systems to compensate for the phase aberrations.