#include <ctf.h>
|
| | CTFparam () |
| |
| | CTFparam (double v, double sa, double ac) |
| |
| int | update (CTFparam *ctf) |
| |
| int | update (CTFparam &ctf) |
| | Updates a CTF structure from another. More...
|
| |
| double | volt () |
| |
| void | volt (double v) |
| |
| double | focal_length () |
| |
| void | focal_length (double v) |
| |
| double | Cs () |
| |
| void | Cs (double v) |
| |
| double | Cc () |
| |
| void | Cc (double v) |
| |
| double | alpha () |
| |
| void | alpha (double v) |
| |
| double | dE () |
| |
| void | dE (double v) |
| |
| double | amp_shift () |
| |
| void | amp_shift (double v) |
| |
| double | objective_aperture () |
| |
| void | objective_aperture (double v) |
| |
| double | slit_width () |
| |
| void | slit_width (double v) |
| |
| double | defocus_average () |
| |
| void | defocus_average (double v) |
| |
| double | defocus_deviation () |
| |
| void | defocus_deviation (double v) |
| |
| double | astigmatism_angle () |
| |
| void | astigmatism_angle (double v) |
| |
| long | baseline_type () |
| |
| void | baseline_type (long t) |
| |
| vector< double > & | baseline () |
| |
| double | baseline (int i) |
| |
| void | baseline (int i, double d) |
| |
| void | baseline (double *b) |
| |
| void | baseline (vector< double > &b) |
| |
| long | envelope_type () |
| |
| void | envelope_type (long t) |
| |
| vector< double > & | envelope () |
| |
| double | envelope (int i) |
| |
| void | envelope (int i, double d) |
| |
| void | envelope (double *v) |
| |
| void | envelope (vector< double > &v) |
| |
| double | fom () |
| |
| void | fom (double v) |
| |
| bool | check_defocus () |
| |
| bool | check_Cs () |
| |
| double | lambda () |
| |
| double | frequency_cutoff () |
| |
| double | term1 () |
| |
| double | term2 () |
| |
| double | delta_phi (double s2, double angle) |
| |
| double | calculate (double s2, double angle) |
| |
| vector< double > | calculate (int nrad, int npsi, double step_size) |
| | Calculates a CTF curve. More...
|
| |
| Complex< double > | calculate_complex (double s2, double angle) |
| |
| double | calc_baseline (double s) |
| |
| double | calc_envelope (double s) |
| |
| vector< double > | zeroes (double max_s) |
| | Calculates the zeroes of a CTF curve on the spatial frequency scale. More...
|
| |
| Bstring | baseline_equation () |
| | Generates a baseline equation string from 4 to 10 coefficients. More...
|
| |
| Bstring | envelope_equation () |
| | Generates an envelope equation string from 4 coefficients. More...
|
| |
| int | parse_baseline_equation (Bstring base_eq) |
| | Extracts the coefficients from the baseline string. More...
|
| |
| int | parse_envelope_equation (Bstring env_eq) |
| | Extracts the coefficients from the envelope string. More...
|
| |
| vector< double > | envelope_partial_coherence (long n, double freq_step) |
| | Calculates the envelope curve based on partial coherence. More...
|
| |
| vector< double > | envelope_energy_spread (long n, double freq_step) |
| | Calculates the envelope curve based on energy spread. More...
|
| |
| double | zero (int i) |
| |
| double | defocus_for_first_zero (double s) |
| |
| void | show () |
| |
| void | show_baseline () |
| |
| void | show_envelope () |
| |
Definition at line 28 of file ctf.h.
◆ CTFparam() [1/2]
Definition at line 76 of file ctf.h.
◆ CTFparam() [2/2]
| CTFparam::CTFparam |
( |
double |
v, |
|
|
double |
sa, |
|
|
double |
ac |
|
) |
| |
|
inline |
Definition at line 77 of file ctf.h.
◆ alpha() [1/2]
| double CTFparam::alpha |
( |
| ) |
|
|
inline |
Definition at line 95 of file ctf.h.
◆ alpha() [2/2]
| void CTFparam::alpha |
( |
double |
v | ) |
|
|
inline |
Definition at line 96 of file ctf.h.
◆ amp_shift() [1/2]
| double CTFparam::amp_shift |
( |
| ) |
|
|
inline |
Definition at line 99 of file ctf.h.
◆ amp_shift() [2/2]
| void CTFparam::amp_shift |
( |
double |
v | ) |
|
|
inline |
◆ astigmatism_angle() [1/2]
| double CTFparam::astigmatism_angle |
( |
| ) |
|
|
inline |
◆ astigmatism_angle() [2/2]
| void CTFparam::astigmatism_angle |
( |
double |
v | ) |
|
|
inline |
◆ baseline() [1/5]
| vector<double>& CTFparam::baseline |
( |
| ) |
|
|
inline |
◆ baseline() [2/5]
| void CTFparam::baseline |
( |
double * |
b | ) |
|
|
inline |
◆ baseline() [3/5]
| double CTFparam::baseline |
( |
int |
i | ) |
|
|
inline |
◆ baseline() [4/5]
| void CTFparam::baseline |
( |
int |
i, |
|
|
double |
d |
|
) |
| |
|
inline |
◆ baseline() [5/5]
| void CTFparam::baseline |
( |
vector< double > & |
b | ) |
|
|
inline |
◆ baseline_equation()
| Bstring CTFparam::baseline_equation |
( |
| ) |
|
Generates a baseline equation string from 4 to 10 coefficients.
- Returns
- Bstring baseline equation.
The baseline string is constructed from the 4 to 10 coefficients
according to the specified type.
Definition at line 167 of file ctf.cpp.
◆ baseline_type() [1/2]
| long CTFparam::baseline_type |
( |
| ) |
|
|
inline |
◆ baseline_type() [2/2]
| void CTFparam::baseline_type |
( |
long |
t | ) |
|
|
inline |
◆ calc_baseline()
| double CTFparam::calc_baseline |
( |
double |
s | ) |
|
|
inline |
◆ calc_envelope()
| double CTFparam::calc_envelope |
( |
double |
s | ) |
|
|
inline |
◆ calculate() [1/2]
| double CTFparam::calculate |
( |
double |
s2, |
|
|
double |
angle |
|
) |
| |
|
inline |
◆ calculate() [2/2]
| vector< double > CTFparam::calculate |
( |
int |
nrad, |
|
|
int |
npsi, |
|
|
double |
step_size |
|
) |
| |
Calculates a CTF curve.
- Parameters
-
| nrad | number of radii. |
| npsi | number of angular segments. |
| step_size | reciprocal space step size (1/angstrom). |
- Returns
- vector<double> new CTF array.
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 - amp_shift;
CTF = sin(phase)
The new CTF curve is returned.
Definition at line 69 of file ctf.cpp.
◆ calculate_complex()
| Complex<double> CTFparam::calculate_complex |
( |
double |
s2, |
|
|
double |
angle |
|
) |
| |
|
inline |
◆ Cc() [1/2]
Definition at line 93 of file ctf.h.
◆ Cc() [2/2]
| void CTFparam::Cc |
( |
double |
v | ) |
|
|
inline |
Definition at line 94 of file ctf.h.
◆ check_Cs()
| bool CTFparam::check_Cs |
( |
| ) |
|
|
inline |
◆ check_defocus()
| bool CTFparam::check_defocus |
( |
| ) |
|
|
inline |
◆ Cs() [1/2]
Definition at line 91 of file ctf.h.
◆ Cs() [2/2]
| void CTFparam::Cs |
( |
double |
v | ) |
|
|
inline |
Definition at line 92 of file ctf.h.
◆ dE() [1/2]
Definition at line 97 of file ctf.h.
◆ dE() [2/2]
| void CTFparam::dE |
( |
double |
v | ) |
|
|
inline |
Definition at line 98 of file ctf.h.
◆ defocus_average() [1/2]
| double CTFparam::defocus_average |
( |
| ) |
|
|
inline |
◆ defocus_average() [2/2]
| void CTFparam::defocus_average |
( |
double |
v | ) |
|
|
inline |
◆ defocus_deviation() [1/2]
| double CTFparam::defocus_deviation |
( |
| ) |
|
|
inline |
◆ defocus_deviation() [2/2]
| void CTFparam::defocus_deviation |
( |
double |
v | ) |
|
|
inline |
◆ defocus_for_first_zero()
| double CTFparam::defocus_for_first_zero |
( |
double |
s | ) |
|
|
inline |
◆ delta_phi()
| double CTFparam::delta_phi |
( |
double |
s2, |
|
|
double |
angle |
|
) |
| |
|
inline |
◆ envelope() [1/5]
| vector<double>& CTFparam::envelope |
( |
| ) |
|
|
inline |
◆ envelope() [2/5]
| void CTFparam::envelope |
( |
double * |
v | ) |
|
|
inline |
◆ envelope() [3/5]
| double CTFparam::envelope |
( |
int |
i | ) |
|
|
inline |
◆ envelope() [4/5]
| void CTFparam::envelope |
( |
int |
i, |
|
|
double |
d |
|
) |
| |
|
inline |
◆ envelope() [5/5]
| void CTFparam::envelope |
( |
vector< double > & |
v | ) |
|
|
inline |
◆ envelope_energy_spread()
| vector< double > CTFparam::envelope_energy_spread |
( |
long |
n, |
|
|
double |
freq_step |
|
) |
| |
Calculates the envelope curve based on energy spread.
- Parameters
-
| n | number of spatial frequency steps. |
| freq_step | size of spatial frequency step. |
- Returns
- vector<double> curve.
The curve is calculated at frequency s as: Ees(s) = exp(-0.5*(pi*lambda*Cc*(dE/V)*s^2)^2) where Cc: Chromatic aberation (~2e7 A) dE: Energy spread (~1 eV) V: Acceleration voltage (~1e5 V) lamda: electron wavelength (~0.03 A)
References: Freitag et al. (2005) Ultramicroscopy 102, 209-14. Zhu et al. (1997) JSB 118, 197-219.
Definition at line 374 of file ctf.cpp.
◆ envelope_equation()
| Bstring CTFparam::envelope_equation |
( |
| ) |
|
Generates an envelope equation string from 4 coefficients.
- Returns
- Bstring envelope equation.
The envelope string is constructed from the 4 double gaussian parameters.
Definition at line 211 of file ctf.cpp.
◆ envelope_partial_coherence()
| vector< double > CTFparam::envelope_partial_coherence |
( |
long |
n, |
|
|
double |
freq_step |
|
) |
| |
Calculates the envelope curve based on partial coherence.
- Parameters
-
| n | number of spatial frequency steps. |
| freq_step | size of spatial frequency step. |
- Returns
- vector<double> curve.
The curve is calculated at frequency s as: Epc(s) = exp(-(pi*alpha*(Cs*lamda^2*s^2 - def)*s)^2) where Cs: Spherical aberation (~2e7 A) alpha: Beam spread/source size (~0.1 mrad) def: Defocus (~1e4 A) lamda: electron wavelength (~0.03 A)
References: Zhu et al. (1997) JSB 118, 197-219.
Definition at line 340 of file ctf.cpp.
◆ envelope_type() [1/2]
| long CTFparam::envelope_type |
( |
| ) |
|
|
inline |
◆ envelope_type() [2/2]
| void CTFparam::envelope_type |
( |
long |
t | ) |
|
|
inline |
◆ focal_length() [1/2]
| double CTFparam::focal_length |
( |
| ) |
|
|
inline |
Definition at line 89 of file ctf.h.
◆ focal_length() [2/2]
| void CTFparam::focal_length |
( |
double |
v | ) |
|
|
inline |
Definition at line 90 of file ctf.h.
◆ fom() [1/2]
◆ fom() [2/2]
| void CTFparam::fom |
( |
double |
v | ) |
|
|
inline |
◆ frequency_cutoff()
| double CTFparam::frequency_cutoff |
( |
| ) |
|
|
inline |
◆ lambda()
| double CTFparam::lambda |
( |
| ) |
|
|
inline |
◆ objective_aperture() [1/2]
| double CTFparam::objective_aperture |
( |
| ) |
|
|
inline |
◆ objective_aperture() [2/2]
| void CTFparam::objective_aperture |
( |
double |
v | ) |
|
|
inline |
◆ parse_baseline_equation()
| int CTFparam::parse_baseline_equation |
( |
Bstring |
base_eq | ) |
|
Extracts the coefficients from the baseline string.
- Parameters
-
| base_eq | baseline equation string. |
- Returns
- int equation type.
The baseline string is scanned in one of the three supported formats.
Definition at line 244 of file ctf.cpp.
◆ parse_envelope_equation()
| int CTFparam::parse_envelope_equation |
( |
Bstring |
env_eq | ) |
|
Extracts the coefficients from the envelope string.
- Parameters
-
| env_eq | envelope equation string. |
- Returns
- int 0.
The envelope string is scanned to get the 4 double gaussian parameters.
Definition at line 289 of file ctf.cpp.
◆ show()
◆ show_baseline()
| void CTFparam::show_baseline |
( |
| ) |
|
|
inline |
◆ show_envelope()
| void CTFparam::show_envelope |
( |
| ) |
|
|
inline |
◆ slit_width() [1/2]
| double CTFparam::slit_width |
( |
| ) |
|
|
inline |
◆ slit_width() [2/2]
| void CTFparam::slit_width |
( |
double |
v | ) |
|
|
inline |
◆ term1()
| double CTFparam::term1 |
( |
| ) |
|
|
inline |
◆ term2()
| double CTFparam::term2 |
( |
| ) |
|
|
inline |
◆ update() [1/2]
Updates a CTF structure from another.
- Parameters
-
| ctf | CTF structure with new information. |
- Returns
- int 0, <0 on error.
Definition at line 20 of file ctf.cpp.
◆ update() [2/2]
Definition at line 81 of file ctf.h.
◆ volt() [1/2]
| double CTFparam::volt |
( |
| ) |
|
|
inline |
Definition at line 87 of file ctf.h.
◆ volt() [2/2]
| void CTFparam::volt |
( |
double |
v | ) |
|
|
inline |
Definition at line 88 of file ctf.h.
◆ zero()
| double CTFparam::zero |
( |
int |
i | ) |
|
|
inline |
◆ zeroes()
| vector< double > CTFparam::zeroes |
( |
double |
max_s | ) |
|
Calculates the zeroes of a CTF curve on the spatial frequency scale.
- Parameters
-
| max_s | maximum spatial frequency. |
- Returns
- vector<double> array of spatial frequencies for zeroes, NULL on error.
The nth zero is given by the reciprocal space distance where the
phase shift term is equal to -n*PI:
phase = 0.5*PI*lambda^3*Cs*s^4 - PI*lambda*defocus*s^2 = -n*PI
ctf_fz = defocus/(Cs*lambda^2)
zero(n) = sqrt(ctf_fz - sqrt(ctf_fz^2 - 2.0*n/(Cs*lambda^3)))
Defocus values are positive for underfocus.
The array returned start with the first zero at index 0.
Definition at line 117 of file ctf.cpp.
The documentation for this class was generated from the following files:
- /Users/bernard/b20/bsoft/include/ctf.h
- /Users/bernard/b20/bsoft/src/util/ctf.cpp