1. A computer-implemented method for improving imaging performance of a lithographic apparatus, the method comprising: obtaining initial values of one or more design variables that control an optical wavefront shape of the lithographic apparatus, at least some of the design variables comprising characteristics of a projection optics system included in the lithographic apparatus; obtaining a known pattern to be imaged using the lithographic apparatus; defining a multi-variable cost function of the one or more design variables, wherein the cost function is indicative of the imaging performance at predefined evaluation points on the known pattern; and updating the initial values of the one or more design variables based on a numerical convergence technique to optimize the multi-variable cost function, wherein the updated values of the one or more design variables shape the optical wavefront to produce an image of the known pattern that matches an imaging performance of a reference lithographic apparatus.