Bsoft function
img_ctf_fit
Source:
src/img/img_ctf.c
Description:
Determines the CTF parameters from a power spectrum.
Algorithm:
Input: Power spectrum or its logarithm.
A radial power spectrum is calculated.
A range of defocus values is tested (100-200000 angstrom, 0.01-20 um),
defining the baseline as passing through the zeroes for each defocus
and fitting it to a 4th order polynomial.
The envelope function is a simple gaussian on top of the baseline and
fitted to minimize the RMSD between the calculated curve and the
radial power spectrum logarithm.
The fitting is limited to the spatial frequency range between the
first and last zeroes.
Defocus values are positive for underfocus.
Functions:
angle = atan(y/x)
s2 = reciprocal space distance squared
defocus_average = (defocus_max + defocus_min)/2
defocus_deviation = (defocus_max - defocus_min)/2
defocus = defocus_average + defocus_deviation*cos(2*(angle - astigmatism_angle))
phase = 0.5*PI*lambda*lambda*lambda*Cs*s2*s2 - PI*lambda*defocus*s2;
phi_fac = sqrt(1-amp_fac*amp_fac)
CTF = amp_fac*cos(phase) - phi_fac*sin(phase)
The new parameters are written into the Bimage structure.
Arguments:
| Bimage* p | image structure.
|
| CTF* em_ctf | CTF parameter structure.
|
| float lores | low resolution limit.
|
| float hires | high resolution limit
|
Returns:
float first zero.
Prototype:
float img_ctf_fit(Bimage* p, CTF* em_ctf, float lores, float hires)
Functions used:
balloc
bfree
ctf_first_zero
Other objects included:
struct Bimage
Generated by bdoc.pl on Mon Jun 15 11:47:48 2009
Back to the Bsoft home