An inspection system for detecting defects in a semiconductor sample, the system comprising: a light source for generating an illumination beam; an illumination lens system for directing the illumination beam towards a sample; a collection lens system for directing towards a detector output light from the sample in response to the illumination beam, wherein the collection lens system includes a compensator plate having a plurality of individually selectable filters having different configurations from each other for correcting different wavefront aberration errors of the output light caused by one or more optical components of the inspection system under different operating conditions, wherein each filter has a fixed design; the detector for receiving the output light from the sample; and a controller operable to perform the following operations in cooperation with the light source, illumination lens system, collection lens system, and detector: generating and directing the illumination beam towards the sample; selecting a set of the different operating conditions and a selected one of the filters for correcting the aberration error caused by the one or more optical components under such selected set of operating conditions; generating an image based on the output light from the sample in response to the illumination beam; and determining whether the sample passes or fails inspection or characterizing such sample based on the image. a light source for generating an illumination beam; an illumination lens system for directing the illumination beam towards a sample; a collection lens system for directing towards a detector output light from the sample in response to the illumination beam, wherein the collection lens system includes a compensator plate having a plurality of individually selectable filters having different configurations from each other for correcting different wavefront aberration errors of the output light caused by one or more optical components of the inspection system under different operating conditions, wherein each filter has a fixed design; the detector for receiving the output light from the sample; and a controller operable to perform the following operations in cooperation with the light source, illumination lens system, collection lens system, and detector: generating and directing the illumination beam towards the sample; selecting a set of the different operating conditions and a selected one of the filters for correcting the aberration error caused by the one or more optical components under such selected set of operating conditions; generating an image based on the output light from the sample in response to the illumination beam; and determining whether the sample passes or fails inspection or characterizing such sample based on the image. generating and directing the illumination beam towards the sample; selecting a set of the different operating conditions and a selected one of the filters for correcting the aberration error caused by the one or more optical components under such selected set of operating conditions; generating an image based on the output light from the sample in response to the illumination beam; and determining whether the sample passes or fails inspection or characterizing such sample based on the image. <EOS>