MASKTRANA
By Vinzenz Unger and Anchi Cheng
This program is used to mask Fourier transforms. A modified copy of the transform is written out in which only selected parts have non-zero values. The shape and size of the maskholes can be varied as can the mode of operation using either all spots to a given resolution or only those spots for which the (h k) indices are explicitly stated. The most commonly used maskhole shape is a “sharp edged circle” (shape = 1). In this mode the intensities of the pixels that are within a distance of radius (RAD) around the predicted peak position are let through the mask unchanged. In contrast, for a “gaussian circle” (shape = 2) the pixel intensities are tapered and fall off to [intensity * 0.37] at the edge of the hole. This may be advantageous if fuzzy spots are to be included because it allows the hole radius to be increased without putting too much weight on those parts of the signal that are increasingly off the predicted peak position. As pointed out in the main text, lattice distortions are best determined by correlating a tightly masked transform (=reference) with a loosely masked transform that contains the information about the lattice disorder.
Choosing the right type and correct radius for the maskhole of the loosely masked transform is extremly important. Several trials may be needed to find the best setting for a given problem. Once established, the settings will be either identical or very similar for other images from the same specimen. However, the transforms of specimens that are only ordered to intermediate resolutions (5-10Å) may require individual adjustments of this parameter for each image to get the best results.
Especially for less ordered specimen the calculated diffraction spots are often blurred and spread out. In these cases, a good starting estimate for an appropriate maskhole radius can be obtained by (i) rescaling the transform intensities so that the pixelation of the intermediate resolution spots becomes visible (try scaling from mean intensity to 4-8x the mean) and (ii) counting the number of pixel across about four spots each at ~25Å and ~9-15Å. Average the counts and use the result as radius for a sharp edged maskhole (double this number if a “Gaussian” hole is used). However, for an image transform that displays sharp spots (i.e if the crystal is well ordered) the radius should be decreased to exclude noise from the filtered image. Similarly, the maskhole size should be reduced for a second or third pass of processing because the first pass of cross-correlation and lattice unbending will have “sharpened” the spots. When optimizing the maskhole for the loose filtering step one should be aware that omitting weak or fuzzy spots does not do any damage. However, any noise let through the mask will have a negative impact on the analysis especially at higher resolutions where the signal-to-noise ratio of the spots is smaller.
Which spots should be included?
The answer to this question largely depends on the explicit approach chosen for the correlation and unbending procedure. The protocols given in this chapter use a tightly filtered image for the generation of the reference area. For a maskradius of one pixel the shape of the maskhole created by MASKTRANA is identical to that of a “perfect” spot (see Fig.1a). Therefore, only those spots should be used for which a significant part falls within the tightly masked area (see Fig.2 for more detail) to minimize the amount of noise in the reference. Once a first pass of unbending has been completed one can use the MMBOX result as guideline to choose spots for a second pass. Usually, including spots with an IQ of 3 or better is safe for calculating the reference; the inclusion of weaker spots is not recommended.
A second important factor is to determine a suitable resolution cut-off for the filtering step. For specimens that are ordered to near atomic resolution, sharp spots to ~6-7Å can be observed in the optical diffraction. Using all visible spots out to the highest resolution may be beneficial in these cases, especially for a second pass of cross-correlation and lattice straigthening. However, a specimen that is only ordered to 5-10Å resolution is not likely to display visible spots at much better than 10Å in the optical diffraction and these spots are often diffuse or weak. Still, features out to ~15Å are usually well preserved in these cases and hence this is a good resolution cut-off for the basic processing.
Common to all cases is that specifying selected reflections is preferable to using all possible spots to a given resolution because it minimizes the contribution of noise to the processing (but see comments to MAKETRAN). This becomes even more important for the calculated transforms of tilted crystals because in these cases the diffraction is often better along the tiltaxis than in the direction perpendicular to it.
Finally, it should be mentioned that for highly tilted crystals (>45˚) a “splitting” of spots is observed in the calculated transforms if images were recorded at a fixed amount of underfocus. This “splitting” reflects contrast reversals of the affected Fourier components (also known as “tilt transfer function”) and is caused by the height difference across the image. A correction for this effect is necessary in these cases and the related program TTMASK (see comments on TTBOX) should be used in this situation.
In summary, only significant spots with a good signal-to-noise ratio should be included while fuzzy and weak spots should be ignored.
Current settings (JOBA)
Current settings for tightly masking the transform use a sharp edged hole, a radius of 1 pixel and an automatic amplitude reduction (“IAMPLIMIT = T”). With this setting the amplitude of strong reflections will be reduced to a value corresponding to 1.5x the average amplitude calculated from all spots that are included in the mask. This feature prevents strong low resolution terms from dominating the filtered image too much and should be used routinely.
The current settings also require an input file (named “${image}p1.spt” for the first pass of processing) specifying the (h k) indices of the spots to be used. Starting with a new line each time, only reflections from the unique half of the transform should be listed although the program will ignore spots whose indices are repeated or where Friedel mates are listed. Instead of a separate file, a list of spots can be directly added in the script following the third line of input parameter. In this case the second “T” flag on the first line of input parameter needs to be set to “F” (see protocols).
For reasons given above, the automatic generation and use of all the spots up to a given resolution is not recommended for the regular processing (but see comments on MAKETRAN). However, if required, setting of “ITYPE=0” activates the lattice generator of the program. In this case a more specific input is needed for “IH/IK min max” and “RMAX” on the same input line. “IH/IK min max” sets the minimum and maximum indices for H and K. “RMAX” specifies the maximum transform radius (= resolution cut-off in grid units) to which spots will be generated. Depending on the cell dimensions of the specimen and the resolution required, the current settings may not be sufficient. To adjust “RMAX” look up the AX, AY, BX and BY components of the unit cell vectors (provided by XIMDISP), calculate the x and y coordinates for the reflection with the highest resolution that you want to include (x=h*AX + k*BX; y= h*AY + k*BY) and from these values determine the length of the vector reaching that reflection [ √(x2+y2) ].