| Bsoft 1.9 Bernard's software package

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
img_multislice.cpp File Reference

Multi-slice simulation of the electron imaging process. More...

`#include "img_multislice.h"`
`#include "img_ctf.h"`
`#include "molecule_to_map.h"`
`#include "mol_edit.h"`
`#include "Complex.h"`
`#include "Vector3.h"`
`#include "utilities.h"`

Go to the source code of this file.

## Functions
Bimage * | img_calc_multi_slice (Bimage *pgrate, double thickness, double volt, double resolution)
| Simulates the electron imaging process using a multi-slice approach. More...
Bimage * | img_calc_wave_propagator (Vector3< int > size, Vector3< float > sampling, double thickness, double volt, double resolution)
| Calculates the wave propagation function between slices. More...
Bimage * | img_calc_potential (Bmolgroup *molgroup, Vector3< int > size, Vector3< float > origin, Vector3< float > sampling, double thickness, double resolution, double Bfactor, Bstring &paramfile, int type)
| Calculates the atomic potential. More...
int | img_calc_phase_grating (Bimage *p, double volt)
| Calculates the phase grating approximation from the atomic potential. More...
int | img_apply_complex_CTF (Bimage *p, double def_avg, double def_dev, double ast_angle, double volts, double Cs, double Cc, double amp_fac, double alpha, double energy_spread)
| Applies a complex CTF function to a Fourier transform. More...

## Variables
int | verbose

## Detailed Description

Multi-slice simulation of the electron imaging process.

Author
  Bernard Heymann

Date
  Created: 20030118
  Modified: 20111028

Definition in file img_multislice.cpp.

## Function Documentation

int img_apply_complex_CTF | ( | Bimage * | p,
|  | double | def_avg,
|  | double | def_dev,
|  | double | ast_angle,
|  | double | volts,
|  | double | Cs,
|  | double | Cc,
|  | double | amp_fac,
|  | double | alpha,
|  | double | energy_spread
| ) |  |

Applies a complex CTF function to a Fourier transform.

The CTF is applied as a multiplication with a complex number: new_datum.re = datum.re*amp_fac*cos(dphi) - datum.im*phi_fac*sin(dphi) new_datum.re = datum.re*phi_fac*sin(dphi) + datum.im*amp_fac*cos(dphi) Both input and output are complex transforms.

Parameters

  *p | complex Fourier transform (modified).
  def_avg | defocus minimum (angstrom).
  def_dev | defocus maximum (angstrom).
  ast_angle | astigmatism angle (radians).
  volts | acceleration voltage (volts).
  Cs | spherical aberration (angstrom).
  Cc | chromatic aberration (angstrom).
  amp_fac | amplitude contrast contribution (fraction).
  alpha | beam source size (radians).
  energy_spread | effective energy spread (fraction: typically 10^-5)

Returns
  int 0.

Definition at line 247 of file img_multislice.cpp.

Bimage* img_calc_multi_slice | ( | Bimage * | pgrate,
|  | double | thickness,
|  | double | volt,
|  | double | resolution
| ) |  |

Simulates the electron imaging process using a multi-slice approach.

Parameters

  *pgrate | phase grating multi-image.
  thickness | slice thickness (in angstrom).
  volt | acceleration voltage (volt).
  resolution | resolution limit (angstrom).

Returns
  Bimage* simulated projection image transform.

      The passage of the electron beam is simulated as the interaction of
      a planar wave with successive planar phase gratings spaced at regular
      intervals, with the wave propagated between the 2D gratings. The
      phase gratings are derived from slabs of the atomic potential
      calculated from the atomic structure using scattering profiles.
      Note: The final product is a 2D transform of the exit wave.
      Reference: Cowley, J. M. (1995) Diffraction Physics. 3rd Rev. Ed.
          Elsevier Science, Amsterdam.

Definition at line 38 of file img_multislice.cpp.

int img_calc_phase_grating | ( | Bimage * | p,
|  | double | volt
| ) |  |

Calculates the phase grating approximation from the atomic potential.

All calculations are complex.

Parameters

  *p | atomic potential image (modified).
  volt | acceleration voltage (volt).

Returns
  int 0.

Definition at line 203 of file img_multislice.cpp.

Bimage* img_calc_potential | ( | Bmolgroup * | molgroup,
|  | Vector3< int > | size,
|  | Vector3< float > | origin,
|  | Vector3< float > | sampling,
|  | double | thickness,
|  | double | resolution,
|  | double | Bfactor,
|  | Bstring & | paramfile,
|  | int | type
| ) |  |

Calculates the atomic potential.

Parameters

  *molgroup | set of molecules.
  size | size of projection image (z = 1).
  origin | origin in x and y.
  sampling | voxel size.
  thickness | slice thickness (in angstrom).
  resolution | resolution limit (angstrom).
  Bfactor | overall temperature factor.
  &paramfile | parameter file for atomic scattering coefficients.
  type | type of potential calculation: 0=reciprocal space, 1=real space, 2=gaussian

Returns
  Bimage* complex potential image.

Definition at line 136 of file img_multislice.cpp.

Bimage* img_calc_wave_propagator | ( | Vector3< int > | size,
|  | Vector3< float > | sampling,
|  | double | thickness,
|  | double | volt,
|  | double | resolution
| ) |  |

Calculates the wave propagation function between slices.

Parameters

  size | size of projection image (z = 1).
  sampling | pixel size in x and y, slice thickness in z.
  thickness | slice thickness (in angstrom).
  volt | acceleration voltage (volt).
  resolution | resolution limit (angstrom).

Returns
  Bimage* wave propagation function image.

Definition at line 84 of file img_multislice.cpp.

## Variable Documentation

int verbose