1. A method for focusing an image, the method comprising: performing optimization to identify an array of coefficients for a polynomial representing a phase correction in a manner that minimizes an entropy value generated by an entropy calculation for the image; applying the array of coefficients to the polynomial to obtain a desired phase correction; and correcting a phase error in the image using the desired phase correction to focus the image.