The defocus and astigmatism of a scanning microscope objective lens can be detected by introducing ramping functions to a weak lens which runs synchronously with the scan coils of the instrument. Several different ramping schemes are then possible which alter the effective focal length of the objective lens. The methods considered are: linear ramps applied to independent x and y focusing coils, a circularly symmetric ramp where the defocus is ramped radially from the center of the display and a quadrupole stigmator ramp where the ramping varies both radially and rotationally about the center of the display. Using these methods the whole image display can be made to resemble a reciprocal space display much as one obtains from the power spectrum of a micrograph. Here the image display provides a representation of where best focus and residual axial astigmatism occur. These ramping methods provide a rapid "snap shot" technique requiring a single image scan, hence reducing radiation damage. It is possible in practice to build simple circuits or use computer control to calibrate the amount of defocus and astigmatism to electronically correct a micrograph and provide the optimum image contrast. To evaluate these ramping methods computer calculations of high resolution bright-field STEM images have been obtained from single atom images and simulated amorphous film structures. The point spread functions of single atoms and composite films have been evaluated in the same context. These results apply to any scanning system provided the correct object dimensions are chosen. © 1981 North-Holland Publishing Company.