CCUNBENDE

By Vinzenz Unger and Anchi Cheng

CCUNBENDE corrects lattice distortions by reinterpolating the optical densities in the original image based on the positions of the cross-correlation peaks that were determined by QUADSERCH. The input files are the image that is to be corrected (“$image.img” for first pass, “corp1$image.img” for second pass) and a list of the peak positions (CCORDATA: “prof$image.dat”). Only unit cells with peak heights above a chosen fraction of the highest peak (parameter: $threshold) will be considered by the program. In contrast to the cutoff used for boxing the very best area of the image the threshold for unbending can be chosen much lower. Usually, cross-correlation values as low as 0.1-0.2 are still part of the crystalline array.

Since QUADSERCH only provides a list with the positions of the cross-correlation peak one needs to convert this information in a set of distortion vectors. To this end the whole image is divided into a number of “gridsquares”. For each of the squares the amount and direction of the distortion is then calculated from the position of the nearest cross-correlation peak and the theoretical position that would make for a perfect lattice with respect to the reference area. Once the distortion is known all optical densities within a gridsquare will be moved by the same amount. To assure that the corrected image has no “empty” spaces, the interpolation of the densities for each grid square also takes into account the distortions that were determined for the four nearest neighbors.

The basic parameter that controls the gridsize (i.e. size of the patches for which the densities will be changed by identical amounts) is called ISTEP (setting $step in header of JOBA). A second parameter IMAXCOR (setting $maxcor in header of JOBA) determines the maximum distortion that will be fully corrected. Any distortion that is larger than IMAXCOR will be truncated to the set maximum. Furthermore, since the image is treated in boxes of size ISTEPxISTEP, IMAXCOR cannot be larger than ISTEP.

Based on the current program dimensions the following limits apply:

As a general rule, ISTEP should be set to a value that is close to the number of pixel per unit cell where ever possible. Choosing an ISTEP setting smaller than the unit cell usually has no negative impact on the outcome. However, if the size of the gridunits exceeds the unit cell dimensions, then some distortion will remain even after lattice straightening because the correction will be based on the averaged distortion information from more than one unit cell.

Two program options exist to calculate the distortion vectors. If the parameter ITYPE=0 (as set in the protocol) then the explicit peak positions that were determined by QUADSERCHB are used to determine the local amount of distortion for each gridunit. For ITYPE=1 a smooth curve is fitted to the positions of the cross-correlation peaks before reading off the local distortion for the individual grid positions. The latter option uses a bicubic spline fit routine that requires additional input parameter:

For images of highly tilted crystals, the diffraction spots are usually more blurred in the direction perpendicular to the tilt axis. Consequently, the dimensions and positions of the unit cells are far less certain along this direction than those defined by the sharp spots along the tilt axis. The associated larger errors for the positions of the cross-correlation peaks perpendicular to the tiltaxis require IKNOTY to be much larger than IKNOTX in these cases to allow a smooth fit. Finding the best settings may need several trials.

For the final interpolation of the densities, the image and the calculated correction vectors will be returned to the original x,y orientation of the image.

Which of the two options is used is at the discretion of the user. However, it should be noted that the bicubic spline fit takes multiples of the time compared to the simpler option without having any obvious advantage, except for images of highly tilted crystals. In the latter case using the spline fit is more suitable to follow the errors perpendicular to the tiltaxis.

A table listing the error corrections that were finally used by the program can be obtained by setting LTABOUT=T. This may be useful for setting up correction tables that can be used in other programs to compensate for effects such as CCD fibre optic distortions.

Finally, the two parameter LTAPER, RTAPER are intended for future use in single particle work. However, these options have not yet been completed and hence LTAPER=F should be used in all cases. For this setting any number given for RTAPER will be ignored.