Bsoft  1.9
Bernard's software package
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
img_multislice.h File Reference

Header file for multi-slice simulation of the electron imaging process. More...

#include "rwmolecule.h"
#include "rwimg.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...
 

Detailed Description

Header file for multi-slice simulation of the electron imaging process.

Author
Bernard Heymann
Date
Created: 20030118
Modified: 20060121

Definition in file img_multislice.h.

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
*pcomplex Fourier transform (modified).
def_avgdefocus minimum (angstrom).
def_devdefocus maximum (angstrom).
ast_angleastigmatism angle (radians).
voltsacceleration voltage (volts).
Csspherical aberration (angstrom).
Ccchromatic aberration (angstrom).
amp_facamplitude contrast contribution (fraction).
alphabeam source size (radians).
energy_spreadeffective 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
*pgratephase grating multi-image.
thicknessslice thickness (in angstrom).
voltacceleration voltage (volt).
resolutionresolution 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
*patomic potential image (modified).
voltacceleration 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
*molgroupset of molecules.
sizesize of projection image (z = 1).
originorigin in x and y.
samplingvoxel size.
thicknessslice thickness (in angstrom).
resolutionresolution limit (angstrom).
Bfactoroverall temperature factor.
&paramfileparameter file for atomic scattering coefficients.
typetype 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
sizesize of projection image (z = 1).
samplingpixel size in x and y, slice thickness in z.
thicknessslice thickness (in angstrom).
voltacceleration voltage (volt).
resolutionresolution limit (angstrom).
Returns
Bimage* wave propagation function image.

Definition at line 84 of file img_multislice.cpp.