![]() |
Bsoft 2.1.4
Bernard's software package
|
Processing focal series. More...
#include "rwimg.h"
#include "mg_ctf.h"
#include "mg_ctf_fit.h"
#include "mg_ctf_focal.h"
#include "simplex.h"
#include "utilities.h"
Functions | |
Bimage * | img_ctf_gradient (CTFparam &cp, double def_min, double def_max, double def_inc, Vector3< long > size, Vector3< double > sam, double lores, double hires) |
Calculates an aberration image. More... | |
Bimage * | img_ctf_focal_series (CTFparam &cp, double def_start, double def_end, double def_inc, Vector3< long > size, Vector3< double > sam, double lores, double hires) |
Bimage * | img_extract_section (Bimage *p, int which) |
Extracts a transverse section from focal series power spectra. More... | |
double | img_ctf_section_fit (Bimage *p, CTFparam cp, double def, double hires, double lores) |
Calculates a fit for a defocus value to a section from focal series modified power spectra. More... | |
double | img_find_section_defocus (Bimage *p, CTFparam &cp, double hires, double lores) |
Determines average defocus from a transverse section of focal series power spectra. More... | |
Bimage * | img_ctf_section_calc (Bimage *p, CTFparam &cp, double res) |
Calculates a transverse section of focal series power spectra from CTF parameters. More... | |
double | focus_cs_amp_section_fit_R (Bsimplex &simp) |
double | focus_fit_R (Bsimplex &simp) |
double | focal_aberration_fit_R (Bsimplex &simp) |
double | img_ctf_fit_section (Bimage *p, CTFparam &cp, double hires, double lores, double Bfactor, long maxiter) |
Fits 3 CTF parameters to a transverse section of focal series power spectra. More... | |
double | img_ctf_fit_astigmatism (Bimage *p, CTFparam &cp, double hires, double lores, double Bfactor, long maxiter) |
Fits defocus and astigmatism to focal series power spectra. More... | |
double | img_ctf_fit_aberration (Bimage *p, double wl, map< pair< long, long >, double > &wa, map< pair< long, long >, double > wd, double hires, double lores, double Bfactor, long maxiter) |
Fits aberration parameters to focal series power spectra. More... | |
double | img_ctf_fit_even5 (Bimage *p, CTFparam &cp, double hires, double lores, double Bfactor, long maxiter) |
Fits 5 even aberration parameters to focal series power spectra. More... | |
double | img_ctf_fit_even9 (Bimage *p, CTFparam &cp, double hires, double lores, double Bfactor, long maxiter) |
Fits 9 even aberration parameters to focal series power spectra. More... | |
Bimage * | img_ctf_focal_fit (Bimage *p, CTFparam &cp, double hires, double lores, double Bfactor, long maxiter) |
Fits the CTF to focal series power spectra. More... | |
Bimage * | img_fspace_extract_sphere (Bimage *p, double volt) |
Extracts a sphere corresponding to a given acceleration voltage. More... | |
Variables | |
int | verbose |
Processing focal series.
double focal_aberration_fit_R | ( | Bsimplex & | simp | ) |
double focus_cs_amp_section_fit_R | ( | Bsimplex & | simp | ) |
double focus_fit_R | ( | Bsimplex & | simp | ) |
double img_ctf_fit_aberration | ( | Bimage * | p, |
double | wl, | ||
map< pair< long, long >, double > & | wa, | ||
map< pair< long, long >, double > | wd, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits aberration parameters to focal series power spectra.
*p | Focal series. |
wl | Electron wavelength. |
&wa | Aberration weights (replaced). |
wd | Aberration weight limits for fitting. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
double img_ctf_fit_astigmatism | ( | Bimage * | p, |
CTFparam & | cp, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits defocus and astigmatism to focal series power spectra.
*p | Focal series. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
The constant phase shift and spherical aberration are fixed at initial values.
double img_ctf_fit_even5 | ( | Bimage * | p, |
CTFparam & | cp, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits 5 even aberration parameters to focal series power spectra.
*p | Focal series. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
double img_ctf_fit_even9 | ( | Bimage * | p, |
CTFparam & | cp, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits 9 even aberration parameters to focal series power spectra.
*p | Focal series. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
double img_ctf_fit_section | ( | Bimage * | p, |
CTFparam & | cp, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits 3 CTF parameters to a transverse section of focal series power spectra.
*p | Transverse section. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
The x axis is the original x or y axis from the power spectra. The y axis is the original series with focus change specified in sampling. The 3 parameters are the isotropic aberrations: constant phase shift (amplitude contrast) defocus spherical aberration
Bimage * img_ctf_focal_fit | ( | Bimage * | p, |
CTFparam & | cp, | ||
double | hires, | ||
double | lores, | ||
double | Bfactor, | ||
long | maxiter | ||
) |
Fits the CTF to focal series power spectra.
*p | Focal series. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
Bfactor | B-factor for weighting. |
maxiter | Maximum number of iterations. |
The image should be 3D with the third sampling interval the change in focus per 2D image.
Bimage * img_ctf_focal_series | ( | CTFparam & | cp, |
double | def_start, | ||
double | def_end, | ||
double | def_inc, | ||
Vector3< long > | size, | ||
Vector3< double > | sam, | ||
double | lores, | ||
double | hires | ||
) |
Bimage * img_ctf_gradient | ( | CTFparam & | cp, |
double | def_min, | ||
double | def_max, | ||
double | def_inc, | ||
Vector3< long > | size, | ||
Vector3< double > | sam, | ||
double | lores, | ||
double | hires | ||
) |
Calculates an aberration image.
cp | CTF & aberration parameters. |
def_min | Minimum defocus. |
def_max | Maximum defocus. |
def_inc | Defocus increment. |
size | new image size. |
sam | new image pixel size. |
lores | low resolution limit. |
hires | high resolution limit. |
Functions: angle = atan(y/x) s2 = x*x + y*y 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 - amp_shift; CTF = sin(phase) Note: Defocus is positive for underfocus and negative for overfocus.
Calculates a transverse section of focal series power spectra from CTF parameters.
*p | Transverse section. |
&cp | CTF parameters. |
res | High resolution limit. |
The x axis is the original x or y axis from the power spectra. The y axis is the original series with focus change specified in sampling.
Calculates a fit for a defocus value to a section from focal series modified power spectra.
*p | Section. |
cp | CTF parameters. |
def | defocus to test for. |
hires | High resolution limit. |
lores | Low resolution limit. |
The x axis is the original x or y axis from the power spectra. The y axis is the original series with focus change specified in sampling.
Extracts a transverse section from focal series power spectra.
*p | Focal series. |
which | 0=x, 1=y. |
The x axis is the original x or y axis from the power spectra. The y axis is the original series with focus change specified in sampling.
Determines average defocus from a transverse section of focal series power spectra.
*p | Transverse section. |
&cp | CTF parameters. |
hires | High resolution limit. |
lores | Low resolution limit. |
The x axis is the original x or y axis from the power spectra. The y axis is the original series with focus change specified in sampling.
Extracts a sphere corresponding to a given acceleration voltage.
*p | Focal series. |
volt | Acceleration voltage (V). |
|
extern |