| Bsoft 2.0.5 Bernard's software package

Classes | Macros | Functions
ctf.h File Reference

Header file for CTF (contrast transfer function) functions. More...

`#include <cmath>`
`#include <vector>`
`#include "Bstring.h"`
`#include "Complex.h"`

Go to the source code of this file.

## Classes
class | CTFparam

## Macros
#define | NCTFPARAM 10
#define | _CTFparam_

## Functions
double | electron_wavelength (double volt)
| Calculates the wavelength in angstrom from the acceleration voltage. More...
double | beta2 (double volt)
| Calculates the square of the relative electron velocity. More...
double | beta (double volt)
| Calculates the relative electron velocity. More...
vector< double > | C_curve (long n, double freq_step)
| Calculates the carbon scattering curve. More...

## Detailed Description

Header file for CTF (contrast transfer function) functions.

Author
  Bernard Heymann

Date
  Created: 20000426
  Modified: 20191108

Definition in file ctf.h.

## Macro Definition Documentation

## ◆ _CTFparam_

#define _CTFparam_

Definition at line 290 of file ctf.h.

## ◆ NCTFPARAM

#define NCTFPARAM 10

Definition at line 15 of file ctf.h.

## Function Documentation

## ◆ beta()

double beta | ( | double | volt | ) |

Calculates the relative electron velocity.

Parameters

  volt | acceleration voltage.

Returns
  double relative electron velocity.

                                1
      beta = sqrt(1 - ---------------------)
                      (1+e*volt/(me*c^2))^2

Definition at line 447 of file ctf.cpp.

## ◆ beta2()

double beta2 | ( | double | volt | ) |

Calculates the square of the relative electron velocity.

Parameters

  volt | acceleration voltage.

Returns
  double square of the relative electron velocity.

                           1
      beta2 = 1 - ---------------------
                  (1+e*volt/(me*c^2))^2

Definition at line 426 of file ctf.cpp.

## ◆ C_curve()

vector<double> C_curve | ( | long | n,
|  | double | freq_step
| ) |  |

Calculates the carbon scattering curve.

Parameters

  n | length of curve.
  freq_step | frequency step size.

Returns
  vector<double> array with C-curve.

      The curve is based on the sum of five Gaussians.

Definition at line 462 of file ctf.cpp.

## ◆ electron_wavelength()

double electron_wavelength | ( | double | volt | ) |

Calculates the wavelength in angstrom from the acceleration voltage.

Parameters

  volt | acceleration voltage.

Returns
  double wavelength in angstrom, <0 on error.

                         12.26
      lambda = ----------------------------
               sqrt(volt*(1+volt*0.9788e-6)
                             1e10 * h
      lambda = ---------------------------------------
               sqrt(2*me*e*volt*(1+e*volt/(2*me*c^2)))

Definition at line 403 of file ctf.cpp.