CTFparam(3)

NAME
CTFparam

SYNOPSIS

#include <ctf.h>

  Public Member Functions
CTFparam ()
CTFparam (double v, double sa, double ac)
int update (CTFparam *ctf)
int update (CTFparam &ctf)
Updates a CTF structure from another.
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 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 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.
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.
Bstring baseline_equation ()
Generates a baseline equation string from 4 to 10 coefficients.
Bstring envelope_equation ()
Generates an envelope equation string from 4 coefficients.
int parse_baseline_equation (Bstring base_eq)
Extracts the coefficients from the baseline string.
int parse_envelope_equation (Bstring env_eq)
Extracts the coefficients from the envelope string.
vector< double > envelope_partial_coherence (long n, double freq_step)
Calculates the envelope curve based on partial coherence.
vector< double > envelope_energy_spread (long n, double freq_step)
Calculates the envelope curve based on energy spread.
double zero (int i)
double defocus_for_first_zero (double s)
void show ()
void show_baseline ()
void show_envelope ()

Detailed Description

Definition at line 26 of file ctf.h.

Constructor & Destructor Documentation

  CTFparam::CTFparam () [inline]

Definition at line 72 of file ctf.h.

  CTFparam::CTFparam (double v, double sa, double ac) [inline]

Definition at line 73 of file ctf.h.

Member Function Documentation

  double CTFparam::alpha () [inline]

Definition at line 91 of file ctf.h.

  void CTFparam::alpha (double v) [inline]

Definition at line 92 of file ctf.h.

  double CTFparam::amp_shift () [inline]

Definition at line 95 of file ctf.h.

  void CTFparam::amp_shift (double v) [inline]

Definition at line 96 of file ctf.h.

  double CTFparam::astigmatism_angle () [inline]

Definition at line 104 of file ctf.h.

  void CTFparam::astigmatism_angle (double v) [inline]

Definition at line 105 of file ctf.h.

  vector<double>& CTFparam::baseline () [inline]

Definition at line 108 of file ctf.h.

  double CTFparam::baseline (int i) [inline]

Definition at line 109 of file ctf.h.

  void CTFparam::baseline (int i, double d) [inline]

Definition at line 110 of file ctf.h.

  void CTFparam::baseline (double * b) [inline]

Definition at line 111 of file ctf.h.

  void CTFparam::baseline (vector< double > & b) [inline]

Definition at line 112 of file ctf.h.

  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 165 of file ctf.cpp.

  long CTFparam::baseline_type () [inline]

Definition at line 106 of file ctf.h.

  void CTFparam::baseline_type (long t) [inline]

Definition at line 107 of file ctf.h.

  double CTFparam::calc_baseline (double s) [inline]

Definition at line 161 of file ctf.h.

  double CTFparam::calc_envelope (double s) [inline]

Definition at line 189 of file ctf.h.

  double CTFparam::calculate (double s2, double angle) [inline]

Definition at line 149 of file ctf.h.

  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 67 of file ctf.cpp.

  Complex<double> CTFparam::calculate_complex (double s2, double angle) [inline]

Definition at line 156 of file ctf.h.

  double CTFparam::Cc () [inline]

Definition at line 89 of file ctf.h.

  void CTFparam::Cc (double v) [inline]

Definition at line 90 of file ctf.h.

  bool CTFparam::check_Cs () [inline]

Definition at line 131 of file ctf.h.

  bool CTFparam::check_defocus () [inline]

Definition at line 123 of file ctf.h.

  double CTFparam::Cs () [inline]

Definition at line 87 of file ctf.h.

  void CTFparam::Cs (double v) [inline]

Definition at line 88 of file ctf.h.

  double CTFparam::dE () [inline]

Definition at line 93 of file ctf.h.

  void CTFparam::dE (double v) [inline]

Definition at line 94 of file ctf.h.

  double CTFparam::defocus_average () [inline]

Definition at line 100 of file ctf.h.

  void CTFparam::defocus_average (double v) [inline]

Definition at line 101 of file ctf.h.

  double CTFparam::defocus_deviation () [inline]

Definition at line 102 of file ctf.h.

  void CTFparam::defocus_deviation (double v) [inline]

Definition at line 103 of file ctf.h.

  double CTFparam::defocus_for_first_zero (double s) [inline]

Definition at line 227 of file ctf.h.

  double CTFparam::delta_phi (double s2, double angle) [inline]

Definition at line 145 of file ctf.h.

  vector<double>& CTFparam::envelope () [inline]

Definition at line 115 of file ctf.h.

  double CTFparam::envelope (int i) [inline]

Definition at line 116 of file ctf.h.

  void CTFparam::envelope (int i, double d) [inline]

Definition at line 117 of file ctf.h.

  void CTFparam::envelope (double * v) [inline]

Definition at line 118 of file ctf.h.

  void CTFparam::envelope (vector< double > & v) [inline]

Definition at line 119 of file ctf.h.

  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 372 of file ctf.cpp.

  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 209 of file ctf.cpp.

  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 338 of file ctf.cpp.

  long CTFparam::envelope_type () [inline]

Definition at line 113 of file ctf.h.

  void CTFparam::envelope_type (long t) [inline]

Definition at line 114 of file ctf.h.

  double CTFparam::focal_length () [inline]

Definition at line 85 of file ctf.h.

  void CTFparam::focal_length (double v) [inline]

Definition at line 86 of file ctf.h.

  double CTFparam::fom () [inline]

Definition at line 120 of file ctf.h.

  void CTFparam::fom (double v) [inline]

Definition at line 121 of file ctf.h.

  double CTFparam::lambda () [inline]

Definition at line 139 of file ctf.h.

  double CTFparam::objective_aperture () [inline]

Definition at line 98 of file ctf.h.

  void CTFparam::objective_aperture (double v) [inline]

Definition at line 99 of file ctf.h.

  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 242 of file ctf.cpp.

  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 287 of file ctf.cpp.

  void CTFparam::show () [inline]

Definition at line 232 of file ctf.h.

  void CTFparam::show_baseline () [inline]

Definition at line 244 of file ctf.h.

  void CTFparam::show_envelope () [inline]

Definition at line 267 of file ctf.h.

  double CTFparam::term1 () [inline]

Definition at line 143 of file ctf.h.

  double CTFparam::term2 () [inline]

Definition at line 144 of file ctf.h.

  int CTFparam::update (CTFparam * ctf) [inline]

Definition at line 77 of file ctf.h.

  int CTFparam::update (CTFparam & ctf)

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.

  double CTFparam::volt () [inline]

Definition at line 83 of file ctf.h.

  void CTFparam::volt (double v) [inline]

Definition at line 84 of file ctf.h.

  double CTFparam::zero (int i) [inline]

Definition at line 218 of file ctf.h.

  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 115 of file ctf.cpp.

Author

Generated automatically by Doxygen for Bsoft from the source code.