Generating an optical model includes receiving lens aberration data associated
with a wafer response to lens aberrations. Aberration functions are selected and
fit to the lens aberration data. An optical model is generated in accordance to
the aberration functions, where the optical model indicates the wafer response
to the lens aberrations.