Difference between revisions of "Fourier Shell Correlation"

From Dynamo
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
# During [[Adaptive bandpass filtering | adaptive bandpassing]], the FSC of the two half averages is used to measure the ''resolution'' attained at each iteration.
 
# During [[Adaptive bandpass filtering | adaptive bandpassing]], the FSC of the two half averages is used to measure the ''resolution'' attained at each iteration.
 
# During a regular project, the FSC between the freshly computed [[iteration average]] and the one generated in the previous iteration is also computed. This information is used to measure the ''convergence''.
 
# During a regular project, the FSC between the freshly computed [[iteration average]] and the one generated in the previous iteration is also computed. This information is used to measure the ''convergence''.
 +
  
  
 
The command line that computes the FSC is {{docfunction|dynamo_fsc|dfsc}}. In its default settings, the FSC for two volumes with a sidelength of  ''N'' pixels would be a vector with a length of "N"/2 pixels.  
 
The command line that computes the FSC is {{docfunction|dynamo_fsc|dfsc}}. In its default settings, the FSC for two volumes with a sidelength of  ''N'' pixels would be a vector with a length of "N"/2 pixels.  
 
<tt>
 
<tt>
;compute A as fourier transform of real space volume a
+
#compute A as fourier transform of real space volume a
;compute B as fourier transform of real space volume a
+
#compute B as fourier transform of real space volume a
  
;for each i=1:N/2
+
#for each shell index i=1:N/2
: compute a discretized shell n(i)
+
#: compute a discretized shell n(i) as a volume with entries 0 or 1
::  a fourier pixel with a distance ''k'' from the center is in n(i) if   i-1<=|k|<i  
+
#::  a fourier pixel with a distance ''k'' from the center is in shell n(i) if i<=|k|<i+1
: locate elements of A and B  inside shell n(i)   
+
#: locate elements of A and B  inside shell n(i)   
:: A_i = A|n_i ; A vector with a
+
#:: A<sub>i</sub> = A|n(i) ; a vector with as many entries as non-zero elements in n(i)
:: B_i =  
+
#:: B<sub>i</sub> = B|n(i) ; a vector with as many entries as non-zero elements in n(i)
: compute cross correlation of  
+
#: compute cross correlation of vectors A<sub>i</sub>, B<sub>i</sub>:
:: FSC(i) = A_i * B_i / |A_i| |B_i|
+
#:: FSC(i) = A<sub>i</sub> * B<sub>i</sub> / |A<sub>i</sub>| |B<sub>i</sub>|
 +
#:: ''*''  represents pixelwise multiplication, |.| is the vector norm.
 
</tt>
 
</tt>
With this definition, the first element in a FSC would measure the similarity of the two first shells A_1,B_1.
+
With this definition, the first element in a FSC would measure the similarity of A and B restricted to a first shell A<sub>1</sub> and B<sub>1</sub>.  With the definition above, this first shell skips the central Fourier mode, i.e. the zero-th component of the Fourier transform (i.e, the total intensity of particle ''a'' in direct space). The FSC of the central Fourier model of two volumes will always be 1 (being the correlation of two scalars), and it's not represented.

Latest revision as of 07:40, 27 April 2016

The Fourier Shell Correlation (FSC) between two volumes is a measure of their similarity. It assigns a coefficient between -1 and 1 to each chosen frequency range.

FSC computations are used in different areas of Dynamo

  1. During adaptive bandpassing, the FSC of the two half averages is used to measure the resolution attained at each iteration.
  2. During a regular project, the FSC between the freshly computed iteration average and the one generated in the previous iteration is also computed. This information is used to measure the convergence.


The command line that computes the FSC is dfsc. In its default settings, the FSC for two volumes with a sidelength of N pixels would be a vector with a length of "N"/2 pixels.

  1. compute A as fourier transform of real space volume a
  2. compute B as fourier transform of real space volume a
  1. for each shell index i=1:N/2
    compute a discretized shell n(i) as a volume with entries 0 or 1
    a fourier pixel with a distance k from the center is in shell n(i) if i<=|k|<i+1
    locate elements of A and B inside shell n(i)
    Ai = A|n(i) ; a vector with as many entries as non-zero elements in n(i)
    Bi = B|n(i) ; a vector with as many entries as non-zero elements in n(i)
    compute cross correlation of vectors Ai, Bi:
    FSC(i) = Ai * Bi / |Ai| |Bi|
    * represents pixelwise multiplication, |.| is the vector norm.

With this definition, the first element in a FSC would measure the similarity of A and B restricted to a first shell A1 and B1. With the definition above, this first shell skips the central Fourier mode, i.e. the zero-th component of the Fourier transform (i.e, the total intensity of particle a in direct space). The FSC of the central Fourier model of two volumes will always be 1 (being the correlation of two scalars), and it's not represented.