1. A method for inspecting a mask, comprising: projecting radiation through the mask using an optical system so as to form an actual aerial image; deriving a transmission function from a design of the mask; generating a simulated aerial image by convolving a mathematical model of the optical system with the transmission function; and comparing the simulated aerial image to the actual aerial image in order to identify a defect in the mask.