Page 155 - Read Online
P. 155

Wang et al. Microstructures 2023;3:2023036  https://dx.doi.org/10.20517/microstructures.2023.27   Page 3 of 12

               pattern is automatically assigned based on its average intensity. Our results show that Auto-CLAHE
               significantly improves the signal-to-noise ratio of low-intensity diffraction spots, particularly those from
               patterns acquired away from zone axes. This improvement in diffraction pattern quality enables better
               template matching, resulting in less noise and more accurate orientation mapping.


               MATERIALS AND METHODS
               An indented pure magnesium (Mg) TEM specimen was used as the model system to test the Auto-CLAHE
               algorithm. The bulk sample was a hot-rolled commercially pure Mg purchased from MetalMart
               International Inc. The sample was annealed at 500 °C for two hours under an argon flow atmosphere to
               homogenize the microstructure and remove most of the dislocations, then mechanically polished to 1,200
               grit  SiC  abrasive  sandpaper  and  chemically  polished  in  a  10%  nitric  acid  in  methanol  before
               nanoindentation. Nanoindentation was carried out using a KLA iMicro nanoindentation testing system
               (KLA Instruments) equipped with a Berkovich tip. Nanoindentation was performed on a grain close to the
               [0001] direction so the indentation is approximately parallel to the c-axis of the crystal. The indentation
                                                                                      +
               depth was 600 nm. The focused ion beam (FIB, Helios G4, ThermoFisher, 30 kV Ga  beam) lift-out method
               was used to prepare the cross-sectional TEM specimen to investigate the microstructure under the indent
               impression. The TEM characterizations were performed in an FEI Tecnai TEM operated at 200 keV and
               equipped with a NanoMEGAS ASTAR system with a Stingray CCD camera for PED experiments. The
               precession angle was 0.3° and the step size was 20 nm when acquiring the map. The 0.3° precession angle
               was selected because it offers a good combination of reduction in the dynamical effect and retaining a
               decent beam spot size (~3 nm). One precession per pixel was used, and the diffraction pattern rate was
               approximately 0.06 s per pixel.

               The Auto-CLAHE method was developed as a Python program, utilizing several scientific libraries to
               handle data. The source code can be found in our GitHub repository linked under the “Availability of data
               and materials” section. In the code, the HyperSpy and PixSTEM libraries are used to open and read the PED
               raw data .blo files. The average intensity of each diffraction pattern is calculated. The diffraction patterns are
               recorded as 8-bit images. The pixel intensity ranges from 0 (dark) to 255 (bright). Next, each diffraction
               pattern is processed with CLAHE (from the OpenCV library). The clip limit value is calculated using the
               equation:







               There is an inverse relationship between the clip limit value and the average intensity of the diffraction
               pattern. If the diffraction pattern is at or close to a zone axis, many diffraction spots are excited. The average
               intensity of the pattern is high, the clip limit is small, and little enhancement is required. In contrast, if the
               diffraction pattern is far away from zone axes, a few diffraction spots are excited. The average intensity of
               the pattern is low, the clip limit is large, and signal enhancement is applied.  In the equation, the numerator
               coefficient of 10 in the Auto-CLAHE algorithm was determined by a combination of trial and error and
               visual inspection to ensure optimal quality of the enhanced diffraction patterns. It is worth noting that if the
               average intensity of a diffraction pattern is too high, the “10/Average_intensity” term may round down to 0.
               Using it alone as the clip limit can cause the CLAHE algorithm to default to non-CLAHE, which will
               produce erroneous results. To address this issue, another coefficient of 1 was introduced to help preserve
               image information when processing bright diffraction patterns. With this setup, we have successfully
               applied this approach to generate enhanced diffraction patterns in various datasets, but users can adjust the
               coefficients based on their own PED datasets.
   150   151   152   153   154   155   156   157   158   159   160