Script to compute the Wiener and average background subtracted filter images of HRTEM images. Based on R. Kilaas's work (J. Microscopy, 190, (1998), 45-51).
This script carries out filtering of HRTEM images in frequency space. It uses rotational averaging of the FFT to separate the discrete spots due to crystalline material from the continuum due to amorphous material. The aveage amorphous component is then subtracted, to leave the just crystalline component. A Butterworth Filter can be applied to remove the high frequency noise component. Images must be 2n x 2n in dimension. If an ROI of 2n x 2n is present - that region will be filtered.
In this revised version (1.3) - setting Delta to zero deactivates any rotational filtering and just applies a Butterworth filter. This removes the high frequency component from the image. This is an effective noise filter.
The fields in the script dialog do the following:
* The FFT is rotationally averaged and subtracted from the original iteratively to calculate the amorphous component. The upper limit of the % of pixels to be changed by this iteration is defined in Delta %.
* The step size of the iteration is defined by Step. Smaller steps means less overshoot of the target % - but more iterations - so it is slower.
* Cycles is the maximum number of iteration steps - just in case it ends up in an infinite loop or you get bored.
* Filter - this checkbox controls whether the Butterworth filter is applied to remove the noise in the image after Wiener/ABSF filtering
* BW n - the order of the Butterworth filter (acceptable values are 1-20). A value of 1 produces a gently inclined slope to the filter - gradual cutoff. A value of 3 a more gaussian slope. Higher values produce sharper cut offs.
* BW Ro - the radius (relative distance from the centre of the FFT to the edge) at which the filter function drops to half. (acceptable values 0.01-3). Using small values will move the cutoff inwards in the FFT removing more of the lower frequency component, and producing a more heavily filtered image - too low a value and you lose your crystalline intensity.
* Wiener and ABSF - when selected these filtered images are computed and displayed - at least one must be selected.
* Preview - when checked the progress of the filtering is displayed along with the resulting FFT images as well as their inverse FFTs (the filtered) images.