Patent Number: 
Section: claims

1. An inspection system, comprises: (i) illumination optics, adapted to alter a focal point of a charged particle beam according to a first focal pattern that varies with time while scanning a first area of a sample; and adapted to alter a focal point of a charged particle beam according to a second focal pattern that varies with time while scanning a second area that is ideally identical to the first area; (ii) at least one detector adapted to provide a first set of detection signals resulting from the scanning of the first area and adapted to provide a second set of detection signals resulting from the scanning of the second area; and (c) a processor, adapted to process the first and second set of detection signal s to determine a focal characteristic; whereas the first focal pattern and the second focal pattern differ over time by the location of an optimal focal point. 2. The system according to claim 1 wherein the first focal pattern comprises under-focus points and over-focused points. 3. The system according to claim 1 further adapted to repeat stages (a) and (b) such as to collect a third set of detection signals from a third area that is ideally identical to the first area; and wherein the processing further comprises processing the third set of detection signals. 4. The system according to claim 1 further adapted to scan a reference area that is ideally identical to the first area while maintaining a substantial constant focal point to collect a reference set of detection signals; and wherein the processor is further adapted to process the reference set of detection signals. 5. The system according to claim 1 wherein the processor estimates a focal change along a first axis and along a second traverse axis. 6. The system according to claim 5 wherein the focal characteristic is determined in response to the focal change along a first axis and in response to a focal change along the second axis. 7. The system according to claim 1 wherein the processor generates a gradient image of the first area and a gradient image of the second area. 8. The system according to claim 1 wherein the alteration comprises a mechanical translation. 9. The system according to claim 1 wherein the alteration comprises an alteration of a characteristic of an illumination path through which the charged particle beam propagates. 10. The system according to claim 1 wherein the alteration is responsive to an estimated spatial relationship between at least one element of a charged beam device and between the surface of the sample. 11. The system according to claim 1 further adapted to map an upper surface of the sample. 12. The system according to claim 1 wherein the first area comprises multiple non-continuous segments. 13. The system according to claim 1 wherein the area comprises multiple segments and wherein the focal point is maintained substantially fixed in relation to a surface of the sample while scanning a single segment. 14. The system according to claim 1 wherein the processor is adapted to: generate a first axis gradient image of the first area; generate a second axis gradient image of the first area; calculate a focal grade of the first axis gradient image of the first area; and calculate a focal grade of the second axis gradient image of the first area. 15. The system according to claim 14 wherein the processor is adapted to: generate a first axis gradient image of the second area; generate a second axis gradient image of the second area; calculate a focal grade of the first axis gradient image of the second area; calculate a local grade of the second axis gradient image of the second area; compare between the focal grade of the first axis gradient image of the first area and between focal grade of the first axis gradient image of the second area; and compare between the focal grade of the second axis gradient image of the first area and between focal grade of the second axis gradient image of the second area. 16. The system according to claim 1 wherein the focal pattern comprises a ramp. 17. The system according to claim 1 wherein the focal pattern comprises limited focal changes. 18. The system according to claim 1 adapted to alter the focal point during an inspection session of the sample. 19. The system according to claim 1 wherein system is adapted to apply the first focal pattern during an inspection session of the sample. 20. The system according to claim 1 wherein the system is adapted to apply the first focal pattern during focal correction sessions between inspection sessions of the sample. 21. The system according to claim 1 wherein the first area comprises a first group of sub-areas and wherein the second area comprises a second group of sub-areas. 22. The system according to claim 1 wherein the processing comprises processing detection signals from each sub-area to provide a sub-area grade and determining the focus characteristic in response to the grades of each sub-area.