CrysTBox - diffractGUI - Step by step guide


Here is a list of several steps you typically need to go through with diffractGUI (see below) if you are after some more or less reliable results.

1 - Open input image

In order to demonstrate how diffractGUI operates, a sample image is provided and loaded by default. This allows you to just press Launch all (described below) and see the correct results in a moment. Your own diffractograms and micrographs can be loaded using the Browse button in the Image panel or via the menu File / Open image. Either way leads to a dialog box (see aside).

(2 - Optional: Set image resolution)

If the image contains information about the image resolution, it is loaded and you can see it in the Image panel. Otherwise, you have to specify the resolution manually.

You can let diffractGUI to parse scalebars burnt into the image via Tools / Detect scalebar. If the scalebar is read successfully, resolution is calculated and after you check it, it can be applied. If there is a conflict between the scalebar resolution and the value stated previously in the GUI, you will be notified and given a choice of whether to use one or another.

Note: Since scalebar contains many features rather attractive to the spot detector, it is advisable to detect the scalebar even if the image resolution is known. This allows to prevent the scalebar features to mix up with the image features and thus decay the results.

(3 - Optional: Adjust input image)

DiffractGUI allows you to slightly adjust the image using Image / Adjust. The image can be flipped, rotated, cropped or subjected to FFT or IFFT.

If there is a region in your image, you do not want to be taken into account during the analysis (beamstopper, unwanted phase etc.), navigate to the main menu Image / Eliminate image area. This feature allows you to encircle unwanted region in a polygon clicking into the image - each click defines one polygon node. Use double-click to select the last node. Then, individual nodes can be adjusted and the selection is confirmed double-clicking the polygon. This feature should not be used for HRTEM images.

4 - Select sample material

The sample material can be changed at any time during the analysis. Details about material database and selection can be found here.

(5 - Optional: Select analysis speed and type of diffraction pattern)

Although diffractGUI typically works all right with default parameters, you might like to adjust the analysis flow even though you are not familiar with the particular parameters. In this case, use two pop-up menus in the top right corner of Procedure panel.

If you want to get your results fast or if you want to be sure about maximal precision, select appropriate option in Speed pop-up menu. Similarly, it can be beneficial to provide diffractGUI with a hint of what kind of spots the diffraction pattern consists of. If there are rather small and sharp reflections, set the Spot sizes pop-up menu to Small. If the reflections are rather large and broad, pick Large. For CBED patterns, select disk.

6 - Launch all

The whole analysis can be launched at once using the Launch all button. The individual procedure steps represented by the buttons below are then carried out consecutively. After the whole procedure has been finished successfully, the final results are presented. Each step can be re-launched at any time by pressing respective button below the Launch all button. Partial results of individual steps can be shown via corresponding Show buttons aside. It is advisable to check the partial results to verify relevance of the final findings. Below, the individual steps and expected results are discussed in detail.

6a - Find 30 strongest reflection candidates

Note: Right before this step, the image size is reduced if maximal allowed size image size is exceeded. The maximal size is set to 1024x1024px by default and can be changed in Image / Maximum image size. If HRTEM is analyzed, it is Fourier-transformed into an "artificial diffractogram".

In this step, diffraction spots are detected in several scales and 30 strongest candidates are selected. Number of the selected candidates can be adjusted according to the pattern nature. Detections can be also added, moved or removed manually after clicking at Adjust candidates manually.

Even though there is a considerable number of obviously misplaced or redundant detections (see the image aside), the final results can be all right.

Check: Press Show button next to Get 30 candidates and check that major diffraction reflections (as many as possible) are covered by detections.

6b - Fit the reflection candidates a lattice using RANSAC

RANSAC is a smart algorithm which fits a regular lattice to the detections even though they contain significant number of false detections.

Check: Press Show button next to Ransac - fit lattice and check that the lattice points are localized properly across the lattice (see the image aside). Do not hesitate to zoom in and out using a scroll wheel to inspect different regions across the lattice in detail.

6c - Pick nice lattice vectors

In this step, four lattice vectors in the regular lattice are found (see the image aside) and quantified in the panel D-spacing.

6d - Find zone axis

Now, the previously selected vectors are used to find the zone axis and to identify individual reflections. This is done by comparing the measured interplanar distances and angles with their theoretical counterparts. Those theoretical counterparts mean all planes of the given sample material having Miller indices lower or equal to the number stated in Max. plane idex (5 by default). The default value of 5 means, that all planes between (-5 -5 -5) and (5 5 5) are considered (1330 planes in total).

Check: If you expect to face some weird "high-indexed" zone axes, make sure that maximal Miller index stated in Max. plane index is sufficient. Note that high values may slow down the algorithm of the zone axis calculation.

7 - Interpretation

Now it comes to the most important part ot the analysis, where we find how sound the results are. Zone axis panel (see above) is going to be essential for that. There can be more zone axes corresponding to the measured inteplanar distances and angles in given material. Those potential zone axes are listed in Zone ax. pop-up menu with the the best candidates being stated at the beginning of the list and the worst candidates at the end. Note, that by default the list can contain several crystallographically equivalent versions of one zone axis.

If the image is nice, if you are sure about the camera length calibration, you know the sample material and you expect no tricky zone axes, then you can just keep the best zone axis found by diffractGUI and check the Rating in the top right corner.

In all other cases you need to check what the plot on the left and the the row of values on the right is telling you.

The plot is used to visualize how the theoretical d-spacings match with the measured ones. The dark-blue lines in the bottom part of the image correspond to the theoretical d-spacings specific to the sample material. The dark-blue lines in the upper part represent the d-spacings measured in the input image. The ligt-blue connector lines show the assignment required to obtain the zone axis selected in the Zone ax. pop-up menu. As it can be seen below, the way how the measured d-spacings are aligned with the theoretical ones tells us a lot about the analysis quality and potential problems. The more aligned the connector lines are, the better. If all the connector lines are biased the same way, the camera length might be off. Cal.coef can be used to align them properly and to determine calibration coefficient. Kind of zig-zag formation suggests the selected zone axis is not correct or that the structure is significantly deformed.

Nicely aligned - correct zone axis

Biased - camera length off

ZigZag - wrong zone axis

Furthermore, there are several important readings below the Rating:
Consistency check - should be "OK".
Lattice check - should be "OK".
Total angular dist. - the smaller the better, I would generally try to stay below 5.
d-spacing stdev - the smaller the better, I would generally try to stay below 0.005 or 0.01... depends.

8 - Save the results

If you need to save the results, you can generate an HTML report via File / Generate HTML report or you can export an image of partial or final results using File / Export image. More about image export can be found here.