The "Fourier Transform" option allows the user to make a direct Fourier transform of the data and visualize the
result in a false color image. This is intended as a qualitative, rather than quantitative, tool that may
give the user some insights into the physical origin of unexpected scattering patterns.
It is well understood that, in principle, the Fourier transform of the scattered intensity yields the
charge density autocorrelation function, sometimes known as the Patterson function. [See, e.g., J. Als-Nielson and D. McMorrow, Elements of Modern X-ray Physics (Wiley, 2001).] The reality is usually
more complicated. Background scattering and spurious effects from the optics and instrumentation produce artefacts in the
FT image, the Patterson function is only produced if the FT extends out to very large scattering angle and the data are properly
normalized, etc.
Datasqueeze uses the Fast Fourier Transform (FFT) algorithm to convert the 2D array of xray intensities measured in the 2D detector
to a Fourier transform spectrum. [See J. S. Walker, Fast Fourier Transforms, Second Edition ,
CRC Press (1996); for a typical implementation of the FFT in the C programming language see
http://local.wasp.uwa.edu.au/~pbourke/other/dft/]. In the FFT algorithm, an array of N real elements is replaced by a new array of N complex elements. The smallest
element corresponds to a periodicity of 2 Pi over the largest element in the original array.
Specifically, in the Datasqueeze implementation the following operations are performed:
- If needed, the data are padded with zeros to create a square array whose dimensions are an integer power of 2 (1024, 2048, etc.).
- Data excluded by the user-defined Mask are replaced with zeros.
- The data are multiplied by a filtering function whose function is to minimize ringing and aliasing effects.
- Each row of the array is subjected to the FFT algorithm, replacing the original numbers with new complex numbers.
- Each column of the array is subjected to the FFT algorithm.
- The power spectrum is calculated as the sum of the squares of the real and imaginary parts.
- The array is folded onto itself so that the zero (corresponding to the summed values of the original array) is at the
center, rather than the corners, of the array.
- This new power spectrum is displayed in a false color image similar to that originally used to display the data.
To execute the FFT, after reading in the data the user selects the desired Zoom and Filter, then clicks on the "Perform FT"
button in the Manipulate panel.
Zoom: This drop-down menu selects which part of the calculated spectrum will be viewed. Keep in mind that the outer part of the FT
image reflects frequencies corrresponding to length scales of one pixel, and are probably uninteresting. For a typical diffraction pattern,
which fills much of the detector, the user will want to zoom in to near the center of the FT image.
Filter: As discussed above, spurious "ringing" effects are minimized by
filtering the data using a smooth function that goes to zero at the boundaries.
At present, there are four possibilities for the prefilter; the addition of more will be driven by user input:
- "Hamming": This is probably the most commonly used filter in discrete Fourier transforms. Starting with
an array of N intensities, z[i], the data are multiplied by a sine function that goes to zero at the end points:
z'[i] = z[i] * sin2(i * Pi / (N-1))
The same filter is applied in both the horizontal and vertical directions.
- "Pseudo-Lorentzian": There doesn't seem to be a good name for this function, which is
nevertheless commonly used in the numerical analysis community. The data are multiplied by the function:
z'[i] = z[i] / (1 + (4 * (i - N/2)/N)^6)
This function does not quite go to zero at i=0 or i=N, but it is small. Compared to the Hamming function, it
remains relatively large far from the center of the array.
- "Gaussian": The data are multiplied by the function:
z'[i] = z[i] exp(-(4 * (i - N/2)/N)^2)
- "None": Not recommended, this option leaves the data untouched.
Advice: The best results will be obtained for data that have relatively low background (or at least, very good signal:background) and for which
both the data and the background are close to zero near the edges of the detector. To improve the quality of the FT image:
- If possible, subtract any background while reading in the data.
- Use the Mask feature to mask out any features not believed to arise from sample scattering. These might include parasitic scattering near beam zero,
scattering at wide angles not believed to arise from the sample, etc.
- Consider using the Vertical, Horizontal, or Inversion symmetrizing features.
- Unless the interesting features in the data alternate from pixel to pixel, you will probably want to zoom in by a factor of 4 or more.
To put it differently, if the instrumental resolution is N pixels wide, you will want to zoom in by at least a factor of N.
|