Bsoft  2.1.0
Bernard's software package
scatter.cpp File Reference

Functions for calculating electron scattering profiles. More...

#include "scatter.h"

Go to the source code of this file.

Functions

double signal_integrated (double emu, double imu, double ke, double ki, int ef)
 
double signal_integrated_new (double emu, double imu, double k, int ef)
 
vector< double > calculate_scattering_curve (Batomtype *at, double ds, double scut)
 Calculates an elastic electron scattering profile for an atom type. More...
 
map< string, vector< double > > calculate_scattering_curves (JSvalue &el, Batomtype *atompar, double ds, double scut)
 Calculates elastic electron scattering profiles for a subset of atom types. More...
 
double scatter_curve_integral (Batomtype *at)
 Calculates the integral of the whole curve. More...
 
double elastic_cross_section (Batomtype *at, double volt)
 Calculates the full elastic cross section (no aperture). More...
 
double elastic_cross_section_integrated (Batomtype *at, CTFparam &ctf)
 Integrates the elastic scattering curve up to the aperture cutoff. More...
 
double elastic_cross_section (JSvalue &el, Batomtype *atompar, double volt)
 Calculates the combined elastic cross section for a defined composition. More...
 
double elastic_cross_section_integrated (JSvalue &el, Batomtype *atompar, CTFparam &ctf)
 Calculates the combined elastic cross section for a defined composition. More...
 
double inelastic_cross_section_langmore (long Z, double volt)
 Calculates the inelastic cross section for an atom type. More...
 
double inelastic_cross_section_langmore (JSvalue &el, Batomtype *atompar, double volt)
 Calculates the combined inelastic cross section for a defined composition. More...
 
double cross_section (JSvalue &el, Batomtype *atompar, double volt)
 Calculates the combined total cross section for a defined composition. More...
 
double cross_section_integrated (JSvalue &el, Batomtype *atompar, CTFparam &ctf)
 Calculates the combined total cross section for a defined composition. More...
 
double cross_section_half_maximal_frequency (Batomtype *at)
 Calculates the half-maximal frequency for an atom type. More...
 
double cross_section_half_maximal_frequency (JSvalue &el, Batomtype *at)
 Calculates the half-maximal frequency for an atom type. More...
 
double ice_density ()
 Returns vitreous ice density. More...
 
double ice_cross_section (Batomtype *atompar, double volt)
 Calculates the total cross section for ice up to the aperture cutoff. More...
 
double intensity (JSvalue &el, double d, double thickness, Batomtype *atompar, CTFparam &ctf)
 Calculates the expected intensity given a thickness of vitreous ice. More...
 
double ice_intensity (double thickness, Batomtype *atompar, CTFparam &ctf)
 Calculates the expected intensity given a thickness of vitreous ice. More...
 
vector< double > ice_intensity (double thick_step, double thick_max, Batomtype *atompar, CTFparam &ctf)
 Calculates the expected intensity vs thickness of vitreous ice. More...
 
double ice_lambda (Batomtype *atompar, CTFparam &ctf)
 Calculates the average lambda proportionality parameter for vitreous ice. More...
 

Variables

int verbose
 

Detailed Description

Functions for calculating electron scattering profiles.

Author
Bernard Heymann
Date
Created: 20190521
Modified: 20200312

Definition in file scatter.cpp.

Function Documentation

◆ calculate_scattering_curve()

vector<double> calculate_scattering_curve ( Batomtype *  at,
double  ds,
double  scut 
)

Calculates an elastic electron scattering profile for an atom type.

Parameters
*atatom type.
dsfrequency space sampling increment.
scutmaximum spacial frequency.
Returns
vector<double> array with scattering profile.

Definition at line 65 of file scatter.cpp.

◆ calculate_scattering_curves()

map<string, vector<double> > calculate_scattering_curves ( JSvalue &  el,
Batomtype *  atompar,
double  ds,
double  scut 
)

Calculates elastic electron scattering profiles for a subset of atom types.

Parameters
&elelements to calculate curves for.
*atomparatom type.
dsfrequency space sampling increment.
scutmaximum spacial frequency.
Returns
vector<double> array with scattering profile.

Definition at line 97 of file scatter.cpp.

◆ cross_section()

double cross_section ( JSvalue &  el,
Batomtype *  atompar,
double  volt 
)

Calculates the combined total cross section for a defined composition.

Parameters
&elcomposition with element counts.
*atomparatom types.
voltacceleration voltage.
Returns
double integral.

Definition at line 265 of file scatter.cpp.

◆ cross_section_half_maximal_frequency() [1/2]

double cross_section_half_maximal_frequency ( Batomtype *  at)

Calculates the half-maximal frequency for an atom type.

Parameters
*atatom type.
Returns
double half-maximal frequency.

Definition at line 307 of file scatter.cpp.

◆ cross_section_half_maximal_frequency() [2/2]

double cross_section_half_maximal_frequency ( JSvalue &  el,
Batomtype *  at 
)

Calculates the half-maximal frequency for an atom type.

Parameters
&elcomposition with element counts.
*atatom type.
Returns
double half-maximal frequency.

Definition at line 328 of file scatter.cpp.

◆ cross_section_integrated()

double cross_section_integrated ( JSvalue &  el,
Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the combined total cross section for a defined composition.

Parameters
&elcomposition with element counts.
*atomparatom types.
&ctfCTF and microscope parameters.
Returns
double integral.
If the slit width is specified, the energy filter is assumed to be used
and only the elastic cross section is returned.

Definition at line 288 of file scatter.cpp.

◆ elastic_cross_section() [1/2]

double elastic_cross_section ( Batomtype *  at,
double  volt 
)

Calculates the full elastic cross section (no aperture).

Parameters
*atatom type.
voltacceleration voltage.
Returns
double integral.

Definition at line 141 of file scatter.cpp.

◆ elastic_cross_section() [2/2]

double elastic_cross_section ( JSvalue &  el,
Batomtype *  atompar,
double  volt 
)

Calculates the combined elastic cross section for a defined composition.

Parameters
&elcomposition with element counts.
*atomparatom types.
voltacceleration voltage.
Returns
double integral.

Definition at line 187 of file scatter.cpp.

◆ elastic_cross_section_integrated() [1/2]

double elastic_cross_section_integrated ( Batomtype *  at,
CTFparam &  ctf 
)

Integrates the elastic scattering curve up to the aperture cutoff.

Parameters
*atatom type.
ctfCTF and microscope parameters.
Returns
double integral.

Definition at line 158 of file scatter.cpp.

◆ elastic_cross_section_integrated() [2/2]

double elastic_cross_section_integrated ( JSvalue &  el,
Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the combined elastic cross section for a defined composition.

Parameters
&elcomposition with element counts.
*atomparatom types.
ctfCTF and microscope parameters.
Returns
double integral.

Definition at line 206 of file scatter.cpp.

◆ ice_cross_section()

double ice_cross_section ( Batomtype *  atompar,
double  volt 
)

Calculates the total cross section for ice up to the aperture cutoff.

Parameters
*atomparatom types.
voltacceleration voltage.
Returns
double cross section.

Definition at line 371 of file scatter.cpp.

◆ ice_density()

double ice_density ( )

Returns vitreous ice density.

Returns
double density in molecules/A3.

Definition at line 349 of file scatter.cpp.

◆ ice_intensity() [1/2]

vector<double> ice_intensity ( double  thick_step,
double  thick_max,
Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the expected intensity vs thickness of vitreous ice.

Parameters
thick_stepspecimen tickness step size (angstrom).
thick_maxmaximum specimen thickness (angstrom).
*atomparatom types.
ctfmicroscope parameters.
Returns
vector<double> array of intensities.

Definition at line 455 of file scatter.cpp.

◆ ice_intensity() [2/2]

double ice_intensity ( double  thickness,
Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the expected intensity given a thickness of vitreous ice.

Parameters
thicknessatom types.
*atomparatom types.
ctfmicroscope parameters.
Returns
double intensity.

Definition at line 433 of file scatter.cpp.

◆ ice_lambda()

double ice_lambda ( Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the average lambda proportionality parameter for vitreous ice.

Parameters
*atomparatom types.
&ctfmicroscope parameters.
Returns
double lambda average.

Definition at line 501 of file scatter.cpp.

◆ inelastic_cross_section_langmore() [1/2]

double inelastic_cross_section_langmore ( JSvalue &  el,
Batomtype *  atompar,
double  volt 
)

Calculates the combined inelastic cross section for a defined composition.

Parameters
&elcomposition with element counts.
*atomparatom types.
voltacceleration voltage.
Returns
double integral.

Definition at line 244 of file scatter.cpp.

◆ inelastic_cross_section_langmore() [2/2]

double inelastic_cross_section_langmore ( long  Z,
double  volt 
)

Calculates the inelastic cross section for an atom type.

Parameters
Zatomic number.
voltacceleration voltage.
Returns
double integral.

Definition at line 224 of file scatter.cpp.

◆ intensity()

double intensity ( JSvalue &  el,
double  d,
double  thickness,
Batomtype *  atompar,
CTFparam &  ctf 
)

Calculates the expected intensity given a thickness of vitreous ice.

Parameters
elelemental composition.
ddensity (molecules/A3).
thicknessspecimen thickness.
*atomparatom types.
ctfmicroscope parameters.
Returns
double intensity.

Definition at line 391 of file scatter.cpp.

◆ scatter_curve_integral()

double scatter_curve_integral ( Batomtype *  at)

Calculates the integral of the whole curve.

Parameters
*atatom type.
Returns
double integral.

Definition at line 121 of file scatter.cpp.

◆ signal_integrated()

double signal_integrated ( double  emu,
double  imu,
double  ke,
double  ki,
int  ef 
)

Definition at line 20 of file scatter.cpp.

◆ signal_integrated_new()

double signal_integrated_new ( double  emu,
double  imu,
double  k,
int  ef 
)

Definition at line 38 of file scatter.cpp.

Variable Documentation

◆ verbose

int verbose
extern