TF DDF - Transfer Function - Determine Defocus & amplitude contrast

(11/5/15)

PURPOSE

Estimate defocus and amplitude contrast ratio from minima in power spectrum starting with of rotationally averaged 1D power spectrum. Input can be single spectrum or a series of spectra. Outputs defocus parameters to SPIDER operation line registers and to a line in a doc file. This operation has not been used in many years and may not function properly. Further on the contrast transfer function. Further info on CTF related operations in SPIDER.

SEE ALSO

TF [Transfer Function - Generate image showing effect of defocus on CTF]
TF C [Transfer Function - Generate a straight, complex, CTF correction image]
TF C3 [Transfer Function - Generate a straight, complex, CTF correction volume]
TF CT [Transfer Function - Generate a binary, phase flipping, complex, CTF correction image]
TF CT3 [Transfer Function - Generate a binary, phase flipping, complex, CTF correction volume]
TF CTS [Transfer Function - CTF correction with SNR, image/volume]
TF D [Transfer Function - Generate image showing effect of astigmatism on CTF]
TF DEV [Transfer Function - Determine Envelope function]
TF DNS [Transfer Function - Delete noise background]
PW [Power spectrum - Amplitudes of Fourier transform ||]

USAGE

.OPERATION: TF DDF

.NUMBER OF IMAGES IN THE SERIES: 1
[Enter number of images. If you want to process a series images, number input images in either increasing or decreasing sequence.]

.IMAGE FILE: ro008
[Enter file name of 1D half-profile of power spectrum.]

.MAX SPATIAL FREQUENCY [1/A]: 0.171
[Enter the spatial frequency radius corresponding to the maximum radius of pixels in the array.]

.SEARCH NEIGHBORHOOD DISTANCE: 5
[This parameter controls the size of the local neighborhood that is searched for local minima. For each point in the spectrum, N points on either side are searched (total neighborhood = 2N + 1 pixels).]

At this point, minima are located and printed out. The first column contains the keys, the second column is the location of each minimum (value is interpolated between pixels), the third column has the same location in spatial frequency units. The last column represents the amplitude of the minimum. e.g.:
 
CURVE HAS: 8 MINIMA: # RADIUS RADIUS (FREQ) AMPLITUDE (PIXELS) (A-1) 1 42.00 0.0164 0.0732 2 175.84 0.0687 0.0300 3 249.61 0.0975 0.0251 4 303.99 0.1187 0.3888 5 349.06 0.1364 0.2255 6 395.03 0.1543 0.0160 7 430.32 0.1681 0.4989 8 467.99 0.1828 0.1609

.CHANGE SEARCH NEIGHBORHOOD? (Y/N): No
[ If "Y", the above operation will be repeated. Smaller search areas may identify noise as minima, resulting in spurious minima. Large search areas can smooth out and overlook actual minima if they are too small. Increase the search neighborhood if your data is very noisy; decrease it if you have many small minima.]

.NUMBER OF MINIMA USED FOR CTF?: 3
[Enter the number of minima you want to include in the calculation.]

POINT # 1
.SPATIAL FREQ. POINTS & ABERRATION (PI): 28.0, -1
[Enter the grid point of the minimum, which is found in the second column in the list of minima found by the program, and its corresponding aberration value in units of pi. For underfocus, the first minimum is -1, the second is -2, the next is -3, and so on. For overfocus, the first minimum is zero, the second is 1, the next is 2, and so on.]

POINT # 2
.SPATIAL FREQ. POINTS & ABERRATION (PI): 58.8, -2

POINT # 3
.SPATIAL FREQ. POINTS & ABERRATION (PI): 83.1, -3

If a defocus series is used, SPIDER asks:

.CONSTRAINTS: (1), (2) or (3): 1
[Enter the choice of constraints, as follows:
(1) Same amplitude,
(2) Same amplitude and define defocus interval,
(3) Same defocus.

.WAVELENGTH LAMBDA [A]: 0.037
[Enter the wavelength of the electrons in Angstroms. The value used in this example corresponds to 100kV. A table of values is listed in the glossary.]

.SPHERICAL ABERRATION CS [MM]: 2.0
[Enter the spherical aberration coefficient, in mm.]

At this point, values are calculated and printed out:
DEFOCUS = 24278.687 (Angstroms)
AMPLITUDE CONTRAST = 0.143490

.DO YOU WANT TO GENERATE A FILTER? (Y/N) : y
[This option can generate a 1D filter file which is used by 'FD' to correct the CTF.]

If you answer "Y", SPIDER asks:

.OUTPUT FILE: fil008 [Enter the name for the filter file. The filter files are generated in the same sequence as the input files if you process a series.]

NOTES

  1. The outline of the theory is as for 'TF'. See Zhu et al. (1997) Journal of Structural Biology, 118, 197-219.

  2. The amplitude contrast ratio is calculated by a grid search method, and low spatial frequency minima are treated with a special weighting for amplitude contrast.

  3. The method to prepare a 1D profile is described in J. Zhu and J. Frank (1994) In, Electron Microscopy 1994 (Proceedings of the 13th Intl. Congr. on Electr. Microsc. (Paris)), pp.465-6. The procedure for calculating power spectrum is given below:
     
            FR 
              ?image file ?[img]          ; Input image  
            FR 
              ?power spectrum file ?[pw]  ; Output power spectrum  
            [n]=0 
            [x5]=200 
            DO  I=1,12                    ; Number of pieces horizontal direction 
               [x4]=120 
               DO  J=1,12		      ; Number of pieces in vertical direction 
                  WI                      ; Get small pieces of the input image 
                    [img] 
                    _1 
                    512,512               ; Size of small pieces 
                    [x4],[x5] 
                  RA                      ; Correct ramp effects 
                    _1 
                    _2 
                  [n]=[n]+1 
                  PW                      ; Calc power spectrum of each small piece 
                    _2                    ; Calc square root of power spectrum 
                    _3 
                  SQ                      ; Calculate real power spectrum 
                    _3			       
                    pwa{****[n]} 
                  WI                      ; Window central section of quick checking 
                    pwa{****[n]} 
                    pwb{****[n]} 
                    80,80  
                    217,217  
                  [x4]=[x4]+256           ; 50% overlapping with its neighbours 
               ENDDO 
               [x5]=[x5]+256 
            ENDDO 
            AS R			      ; Average over power spectra of small pieces 
              pwa***                         
              1-144 
              A 
              _1 
              _2 
            WU			      ; Calculate the square root of power  
              _1			      ; spectrum so it agrees with SPIDER 
              [pw]                        ; convention 
            RE 
    

SUBROUTINES

DEFOCUS, DEFO001, DEFO003

CALLER

UTIL1