1. A method for focusing an image, the method comprising: identifying a spatial model for spatial variation in phase error for the image; dividing the image into a number of subpatches based on the spatial model; applying phase correction to each of the number of subpatches to form a number of focused subpatches; and merging the number of focused subpatches to form a focused image.