MAPFFT and IMGFFT

  1. MAPFFT

    Function of the program:   Forward and Backward FFT of 3-D map. The program can read the map directly from PIF format and calculate the FFT. The calculated structure factors can be used by the program EMRESOL (below) to calculate the resolution, or can be used by the program EMFOM to do filtering, or can be used by many X-ray crystallography software packages, such as CNS/X-Plor. Structure factors calculated from CNS/X-Plor can be read by MAPFFT to calculate backward FFT to obtain a PIF map. The obtained PIF map can be used for difference map calculation or can be used as the initial model for cryo-EM reconstruction.

    Purpose of the program:   The old FFT library used in EM reconstruction is from 70s. The dimension of the map has many limitations. The center of map is not located at the unit cell center so that the calculated structure factor cannot be used by X-ray crystallography softwares directly. The same situation exists for the backward FFT calculation. By using a new FFT library called FFTW, not only faster FFT is achieved but also limitations of the dimension have been removed. Furthermore, some manipulations of the map can be done by using MAPFFT, for example, 90 degree rotation of the map; (1/2, 1/2, 1/2) translation of the map; scaling the map density or scaling of the amplitude of the structure factor; doing low-pass, high-pass or windows pass filtration (soft or hard) of the map.

    Usage of the program:

    • Usage: mapfft [option] map.pif map.asf

    • Options:
      Options explanations
      -F Forward FFT (default)
      -B Backward FFT
      -r high_resolution Highest Resolution in E
      -l low_resolution optional lowest resolution in E
      -p pixel_size Pixel size in E, Default will be from the PIF header
      -s amp_scale_factor Amp scale factor, Default 1.0
      -k map_scale_factor Map density scale factor, output default 1.0
      -t Input and Output SF is strict formatted TSB ASCII SF
      -x Input and Output SF are X-plor format ASCII SF
      -o map_out_type 0 = PIFMAP(default); 1=TSB ASCII EM MAP;
      2=XPLOR ASCII MAP; 3=STACKED ASCII map
      -d dimension_size Final Map Dimension in grid point
      -f Soft filter using the default parameters
      -e recipocal_step edge_cut_weight Soft filter parameters,after reciprocal_step grids in reciprocal space,
      the weight drops to edge_cut_weight,
      Default recipocal_step=3.0;edge_cut_weight=0.000001
      -m Manipulate_Flag 1 = rotate 90 degree; 2 = translate 1/2,1/2,1/2;3 = both
      -w Output the whole set of the SF, default is half set
      -h Print the help, no calculation

    • Example for MAPFFT:
      PIFMAP -> TSB ASF: mapfft map.pif map.asf
      PIFMAP -> X-plor SF: mapfft -x map.pif map.xpl
      TSB ASF -> PIFMAP: mapfft -B -p 3.00 map.asf map.pif
      X-plor SF -> PIFMAP: mapfft -B -x -p 3.00 -d 251 map.xpl map.pif

    • Known problem:
      When using the calculated structure factor from CNS or XPLOR, Low resolution horizontal strips will be seen in the PIF map. Now I am still trying to dig that bug out.

  2. IMGFFT

    Function of the program:   Forward and Backward FFT of 2-D boxed images. The program can read directly of PIF image and then calculate the structure factors. The structure factor calculated from all the boxed images of the same micrograph can be averaged and then a further circular averaging of the 2-D averaged FFT can be done. The circular averaged data can be used for estimate the defocus value by the program CTFEST (below). After obtaining the defocus value of the micrograph, back transfer with different type of CTF corrections can be done by IMGFFT. Temperature factor correction can also be done when doing the back transfer.

    Purpose of the program:   The old FFT library used in EM reconstruction is from 70s as mentioned above. Padding (adding zeros) is required for the image FFT to meet the dimension requirement of the old FFT library. Not only time is wasted for the padding operation, but also some artifacts have been added to the back transferred images. The new FFTW library has no dimension limitations. Padding is skipped. The FFT is faster and more flexible. CTF correction and temperature factor correction can be tested at the level of raw images before doing cryo-EM reconstruction.

    Usage of the program:

    • Usage: imgfft [option] image.pif image.asf

    • Options:
      Options explanations
      -F Forward FFT (default)
      -B Backward correct FFT, without CTFEST file
      -r hi_resolution Highest Resolution in E
      -l low_resolution Lowest resolution in E
      -p pixel_size Pixel_size in E, default is from the PIF header
      -s amp_scale_factor Amp scale factor, Default 1.0
      -k img_scale_factor Image density scale factor, output default 1.0
      -t Input and Output SF are strict format TSB ASCII SF
      -x Input and Output SF are X-Plor SF
      -f Soft filter using the default parameters
      -e recipocal_step edge_cut_weight Soft filter parameters,after reciprocal_step grids in
      reciprocal space,the weight drops to edge_cut_weight
      Default recipocal_step=3.0;edge_cut_weight=0.000001
      -m Manipulate_Flag 1 = rotate 90 degree; 2 = translate 1/2,1/2,1/2;3 = both
      -L The output will be in log scale
      -w Output the whole set of the SF, default is half set
      -V Write out the Vector Averaged FFT at the end
      -A Write out the Amplitude Averaged FFT at the end
      -i Write out the Intensity Averaged FFT at the end
      -I Only write out the Intensity Averaged FFT
      -c Write out the circular averaged at the end
      -C Only write out the circular averaged results
      -B CTFEST_OUTPUT_FILE Backwork FFT with B_factor and CTF correction
      read in Famp,Cs,Voltage,Defocus, B_factor
      from CTFEST file
      -b B_factor read in B_factor, doing B_factor correction
      -D CTFEST_OUTPUT_FILE Backwork FFT with only CTF phase correction
      read in Famp,Cs,Voltage,Defocus from CTFEST file
      -d defocus_value_in_nm read in defocus value and backwork FFT with CTF
      phase correction
      -X Famp change the Famp, default is 0.05.
      -Y Cs change the Cs, default is 2.0 mm
      -Z Voltage change the voltage, default is 300 kV.
      -W weiner factor Add additional ctf/(ctf2+weiner) amplitude correction
      -h Print the help, no calculation

    • Example for IMGFFT:
      Image -> Circular Averaged SF: imgfft -p 3.11111 -C image.pif image.sf
      Image -> CTF and B factor Corrected Image: imgfft -p 3.11111 -D image.ctfest -b 28.0 -W 0.5 image.pif image_prefix

BUG REPORT: If you meet any bugs or problems of the programs, please email me at xc@purdue.edu.