Iterative linear focal-plane wavefront correction