Contrast transfer function¶

Module to describe the contrast transfer function.

class abtem.transfer.CTF(semiangle_cutoff=inf, rolloff=0.1, focal_spread=0.0, angular_spread=0.0, gaussian_spread=0.0, energy=None, parameters=None, **kwargs)[source]

Contrast transfer function object

The Contrast Transfer Function (CTF) describes the aberrations of the objective lens in HRTEM and specifies how the condenser system shapes the probe in STEM.

abTEM implements phase aberrations up to 5th order using polar coefficients. See Eq. 2.22 in the reference 1. Cartesian coefficients can be converted to polar using the utility function abtem.transfer.cartesian2polar.

Partial coherence is included as an envelope in the quasi-coherent approximation. See Chapter 3.2 in reference 1.

For a more detailed discussion with examples, see our walkthrough.

Parameters
• semiangle_cutoff (float) – The semiangle cutoff describes the sharp Fourier space cutoff due to the objective aperture [mrad].

• rolloff (float) – Softens the cutoff. A value of 0 gives a hard cutoff, while 1 gives the softest possible cutoff [Å].

• focal_spread (float) – The 1/e width of the focal spread due to chromatic aberration and lens current instability [Å].

• angular_spread (float) – The 1/e width of the angular deviations due to source size [Å].

• gaussian_spread (float) – The 1/e width image deflections due to vibrations and thermal magnetic noise [Å].

• energy (float) – The electron energy of the wave functions this contrast transfer function will be applied to [eV].

• parameters (dict) – Mapping from aberration symbols to their corresponding values. All aberration magnitudes should be given in Å and angles should be given in radians.

• kwargs – Provide the aberration coefficients as keyword arguments.

References

1(1,2)

Kirkland, E. J. (2010). Advanced Computing in Electron Microscopy (2nd ed.). Springer.

property defocus

The defocus [Å].

Return type

float

property energy

Acceleration energy [eV].

property focal_spread

Return type

float

property gaussian_spread

Return type

float

property parameters

The parameters.

property rolloff

The fraction of soft tapering of the cutoff.

Return type

float

property semiangle_cutoff

Return type

float

show(max_semiangle=None, phi=0, ax=None, **kwargs)[source]

Show the contrast transfer function.

Parameters
• max_semiangle (float) – Maximum semiangle to display in the plot.

• ax (matplotlib Axes, optional) – If given, the plot will be added to this matplotlib axes.

• phi (float, optional) – The contrast transfer function will be plotted along this angle. Default is 0.

• n (int, optional) – Number of evaluation points to use in the plot. Default is 1000.

• title (str, optional) – The title of the plot. Default is ‘None’.

• kwargs – Additional keyword arguments for the line plots.

property wavelength

Relativistic wavelength [Å].

abtem.transfer.cartesian2polar(cartesian)[source]

Convert between Cartesian and polar aberration coefficients.

Parameters

cartesian (dict) – Mapping from Cartesian aberration symbols to their corresponding values.

Returns

Mapping from polar aberration symbols to their corresponding values.

Return type

dict

abtem.transfer.point_resolution(Cs, energy)[source]

Calculate the point resolution.

Parameters
• Cs (float) – Spherical aberration [Å].

• energy (float) – Electron energy [eV].

Returns

The point resolution.

Return type

float

abtem.transfer.polar2cartesian(polar)[source]

Convert between polar and Cartesian aberration coefficients.

Parameters

polar (dict) – Mapping from polar aberration symbols to their corresponding values.

Returns

Mapping from cartesian aberration symbols to their corresponding values.

Return type

dict

abtem.transfer.polar_aliases = {'C5': 'C50', 'Cs': 'C30', 'astigmatism': 'C12', 'astigmatism_angle': 'phi12', 'coma': 'C21', 'coma_angle': 'phi21', 'defocus': 'C10'}

Aliases for the most commonly used optical aberrations.

abtem.transfer.polar_symbols = ('C10', 'C12', 'phi12', 'C21', 'phi21', 'C23', 'phi23', 'C30', 'C32', 'phi32', 'C34', 'phi34', 'C41', 'phi41', 'C43', 'phi43', 'C45', 'phi45', 'C50', 'C52', 'phi52', 'C54', 'phi54', 'C56', 'phi56')

Symbols for the polar representation of all optical aberrations up to the fifth order.

abtem.transfer.scherzer_defocus(Cs, energy)[source]

Calculate the Scherzer defocus.

Parameters
• Cs (float) – Spherical aberration [Å].

• energy (float) – Electron energy [eV].

Returns

The Scherzer defocus.

Return type

float