Wavefront analysis code