网页
综合
更新时间 2026-11-14 09:57:45
Finding the atom lattice — Atomap 0.4.3.dev1 documentation
自动蜘蛛
atomap.org
正文约 6000 字
The first step in using Atomap to analyse atomic resolution STEM images is to find the position of the atomic columns in the image. This tutorial will show how to do this from scratch:
Finding the feature separation
Generate initial positions for the atomic columns and initialize a Sublattice object
Refine the position of the atomic columns
Construct the zone axes
In this tutorial, the datasets from which the atomic positions are found are generated by using functionality in Atomap that generates test datasets. We will use an image of a simple cubic structure to introduce the basic steps.
After fitting a 2D-Gaussian to each atomic column a variety of structural information can be extracted: such as the distance between atoms and monolayers, and ellipticity. This will be dealt with in the Analysing atom lattices tutorial.
The dataset used in this example will be generated using the atomap.dummy_data module:
White noise was added to the image, in order to make it more realistic. To use your own images rather than this test dataset, load your own image for example by using HyperSpy. HyperSpy supports a large variety of image formats, for example dm3/dm4, tiff and emi/ser.
We will continue with the test dataset s.
Atomap finds initial positions for the atomic columns by using a peak finding algorithm from the python package skimage. This algorithm needs to know the smallest peak separation (minimum pixel separation of the features). You can find the optimal pixel separation by using the Atomap function get_feature_separation() which returns a HyperSpy signal.
This function uses the peak finding algorithm for a range of pixel separations. The default separation range is 5 to 30. s_peaks is plotted below. The left figure shows where the peak finding function has located a peak, the right figure shows the minimum feature separation in pixels on the x-axis. Use the Ctrl key + left-right arrow keys to navigate through the different minimum feature separation, and see how it affects the result of the peak finding in the left figure.
The requirements for the peak separation are:
With an optimal peak separation, only atoms from one sublattice should be marked.
In addition, all the atoms from the first sublattice should be marked. (It is not necessary that all the atoms at the edges are marked).
With a pixel separation of 2, too many atoms are found.
With a pixel separation of 7, all atoms are identified. Often, the program will have difficulties with finding the atoms in the rows at the boundary of the image. This does not matter, the important thing is that all atoms in the central part of the image are found.
12 is a too large pixel separation, as not all atoms in the interior of the image are found. This will create issues when the zone axes are constructed and atom planes are found (part 4).
Having found the optimal feature separation, it is time to generate the initial atomic positions. get_atom_positions() takes the atomic resolution image signal s and the optimal feature separation. The function also allows for PCA, relative threshold, background subtraction and normalization of intensity, these options are described in the api documentation.
atom_positions is a list of x and y coordinates of initial atom positions. If there are any missing or extra atoms add_atoms_with_gui() can be used, see Adding atoms using GUI for more info. If there are several phases within the image, these can be separated using select_atoms_with_gui(), see Several phases for more info. This list will be used to initialize a Sublattice object, which will contain all the information about the atoms. In our simple example, all atoms belong to the same sublattice, so only one Sublattice object is needed. (In the more advanced example below, images containing more than one sublattice will be analysed). The Sublattice object takes a list of atom positions, and a 2D NumPy array representing the image.
Atomap uses centre of mass (refine_atom_positions_using_center_of_mass()) first, and then 2D-Gaussians (refine_atom_positions_using_2d_gaussian()) to refine the positions (and shape) of the atomic columns. Before the refinement, the nearest neighbours of each atomic column must be found. This is needed to for Atomap to know boundary values for the position refinements, and is set using find_nearest_neighbors().
Let’s see what how the refinement procedure have improved the atom positions.
Again, navigate through from the initial positions, to the positions after the first and second refinement, in this case the centre of mass and 2D-Gaussian respectively. Below, the initial and end position are shown.
Atom positions have clearly been improved by the refinement. The quality of the fit is seen more clearly when we zoom in on the atoms.
Information on the atoms in a sublattice can always be accessed through sublattice.atom_list, which contains all the atom positions. Each atom position is represented as the Atom_Position class.
Atomap can find atom planes and zone axes in a Sublattice. The program uses nearest neighbour statistics in real space, and finds the translation symmetry. This is done using the construct_zone_axes() method. If not all atoms in the interior of the image are found (as in the peak finding in part 2, with the largest feature separation), the atom planes will probably be discontinuous at the “missing atom”.
The zone axes are needed for the types of analysis explained in Analysing atom lattices. Atom planes for the zone axes in the sublattice can easily be plotted. The atom planes are represented as Atom_Plane class objects, which contains all the atoms in one plane, and the relation between these atoms.
Navigate though the different zone vectors to see the corresponding planes (Ctrl + left-right arrow keys).
If you’re using your own dataset and some of the planes are non-continuous or missing, try increasing the atom_plane_tolerance from the default 0.5: sublattice.construct_zone_axes(atom_plane_tolerance=0.7)
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。