METHOD AND SYSTEM FOR INDEXING ELECTRON DIFFRACTION PATTERNS

20230393083 · 2023-12-07

    Inventors

    Cpc classification

    International classification

    Abstract

    A method is provided of indexing an electron diffraction pattern obtained from a crystalline sample. Indexing data comprising phase and crystallographic orientation information is obtained for first set of locations on the sample. A second set of locations to be indexed is identified. For each nominal location in the second set an experimental electron diffraction pattern is obtained, together with a simulated template from a number of previously indexed locations in the first set, the previously indexed locations being in a proximal region of the sample to the nominal location. Further simulated templates are generated by modifying the crystallographic orientation for the previously indexed locations at angular sub-intervals. The templates are compared with the experimental pattern for the nominal location and, using a similarity measure, a resultant indexing of the location is produced. A corresponding system is also disclosed.

    Claims

    1. A method of indexing an electron diffraction pattern obtained from a sample of material having one or more crystalline phases, the method comprising: a) obtaining indexing data associated with a first set of locations on the sample, the indexing data comprising phase and crystallographic orientation information for each location; b) identifying a second set of locations on the sample to be indexed; c) obtaining a master dataset for each phase of the sample material, each master dataset representing the three dimensional distribution of the electrons scattered from a crystal of the given phase; d) for each nominal location in the second set: i) obtaining an experimental electron diffraction pattern from the nominal location; ii) generating at least one first simulated template from at least one respective related location to the nominal location, the related location being in the first set and in a proximal region on the sample to the said nominal location in the second set, wherein the at least one first simulated template represents a simulated electron diffraction pattern generated using the master dataset and the indexing data for the respective related location. iii) for each at least one first simulated template, generating one or more further simulated templates representing simulated electron diffraction patterns for crystallographic orientations corresponding to that of the respective first simulated template and which are modified at one or more crystallographic orientation sub-intervals with respect to the first simulated template; iv) comparing the first and further simulated templates with the experimental electron diffraction pattern from the nominal location so as to generate a corresponding similarity measure; and, v) analysing the similarity measures so as to select at least one resultant indexed phase and orientation for each nominal location.

    2. A method according to claim 1, wherein each of steps d(ii) and d(iii) are performed using geometric calibration data describing the relative positions of at least the location on the sample, the electron beam and the detector.

    3. A method according to claim 1, wherein the first and further simulated templates are generated in accordance with similar experimental conditions as the obtained experimental diffraction pattern.

    4. A method according to claim 1, wherein the first set of locations is indexed using a Hough indexing, pattern matching or template matching method.

    5. A method according to claim 1, wherein, prior to step a, the method further comprises obtaining a number of experimental electron diffraction patterns from a sample of the material, according to a set of experimental conditions in which an electron beam is incident at a number of locations upon the sample and the scattered electrons are monitored by a detector; and attempting to index the patterns for each location.

    6. A method according to claim 1, wherein a location is selected for inclusion within the first or second sets of locations according to a confidence measure based upon one or more of the following: a measure of the diffraction pattern quality; the number of detected Kikuchi bands, or groups of such bands, used for the indexing process; the difference between the positions of the Kikuchi bands as detected and the equivalent bands in the result from the analysis; and the relationship between the highest ranking and lower ranking solutions.

    7. A method according to claim 1, wherein the at least one related location is in a proximal region on the sample if it is a near neighbour of the nominal location.

    8. A method according to claim 7, wherein the near neighbour related location is a primary neighbour being directly adjacent to the nominal location.

    9. A method according to claim 1, where the locations are defined as points upon the sample at which an electron beam impinges on the sample surface, and wherein such points are provided in a pattern of points which are spaced apart from each other.

    10. A method according to claim 1, wherein a plurality of locations are arranged on the sample surface in an array.

    11. A method according to claim 1, wherein the first and further templates are generated from a master diffraction pattern which includes predicted diffraction intensities for all crystal directions for the relevant phase.

    12. A method according to claim 11, wherein the first and further templates use one or each of: the same geometry calibration values for the relevant location, and, the same resolution as the experimental diffraction pattern.

    13. A method according to claim 1, further comprising selecting a subset of locations to form the nominal locations, wherein the subset of locations comprises one or more of: (i) locations with no successful indexing; (ii) locations with a low data confidence; and, (iii) locations or small clusters of locations that were indexed with a different phase and/or orientation to their neighbouring locations.

    14. A method according to claim 1, further comprising, for a third set of locations which are in the first set of locations: e) for each nominal location in the third set: vi) obtaining an experimental electron diffraction pattern from the nominal location of the third set; vii) obtaining at least one first simulated template representing an electron diffraction pattern generated from the nominal location of the third set using the indexing data comprising phase and crystallographic orientation information, wherein the simulated template is according to similar experimental conditions as the obtained experimental diffraction pattern; viii) for each at least one first simulated template, generating one or more further simulated templates represent simulated electron diffraction patterns for crystallographic orientations corresponding to that of the respective first simulated template and which are modified at one or more crystallographic orientation sub-intervals with respect to the first simulated template; ix) comparing the first and further simulated templates with the experimental electron diffraction pattern from the nominal location of the third set so as to generate a corresponding similarity measure; and, x) analysing the similarity measures so as to select at least one resultant indexed phase and orientation for each nominal location of the third set of locations.

    15. A method according to claim 14, wherein: a specific nominal location is present in each of the first set, second set and third set, such that a resultant indexed phase and orientation is produced for each nominal location in accordance with each of step d(v) and step e(x); and wherein the method further comprises comparing the said resultant indexed phases and orientations so as to produce an updated resultant indexed phase and orientation for each said nominal location.

    16. A method according to claim 14, wherein the image correlation measure is a normalised cross correlation coefficient, NCCC.

    17. A method according to claim 14, wherein one or each of step d(iii) or step e(viii), is performed using the Nelder-Mead or Downhill Simplex methods.

    18. A method according to claim 1, wherein the similarity measure is an image correlation measure.

    19. A method according to claim 1, wherein a resultant indexed phase and crystallographic orientation is only selected if the correlation measure meets a given threshold.

    20. A method according to claim 1, further comprising displaying information relating to one or more of the phase identity and orientation of the crystal at the or each location.

    21. A method according to claim 1, further comprising, repeating the method one or more further times, wherein for each repetition, the first set is updated using the newly indexed locations from the second set of locations indexed previously.

    22. A system for indexing an electron diffraction pattern obtained from a material having one or more crystalline phases, the system comprising: a computer system including a central processing unit having a primary memory, wherein the system is configured when in use to perform the method according to claim 1.

    23. A system according to claim 22, further comprising: an electron detector configured to receive electrons scattered from a sample as a result of an electron beam interacting with the sample and to generate data representing the detected scattered electrons for analysis.

    24. A computer program product comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method of claim 1.

    Description

    BRIEF DESCRIPTION OF DRAWINGS

    [0071] We now describe a system and method with reference to the accompanying drawings, in which:

    [0072] FIG. 1 is a schematic illustration of how an original (left) orientation map may be cleaned (right) using a prior art method;

    [0073] FIG. 2 is a schematic illustration of part of the vacuum chamber of a scanning electron microscope which includes a computer system;

    [0074] FIG. 3 is a flow diagram of the initial stages of a method according to an embodiment;

    [0075] FIG. 4 is a flow diagram showing the steps in the embodiment relating to locations where an indexing solution exists;

    [0076] FIG. 5 is a flow diagram showing the steps in the embodiment relating to locations where an indexing solution does not exist;

    [0077] FIG. 6 is a flow diagram showing the later steps in the embodiment;

    [0078] FIG. 7 shows how an orientation map dataset may be repaired according to the method of the embodiment;

    [0079] FIG. 8 shows how indexing may be achieved even with a low quality experimental image; and,

    [0080] FIG. 9 shows an orientation map which illustrates the effectiveness of the method of the embodiment in analysing a sample which has undergone substantial deformation.

    DETAILED DESCRIPTION

    [0081] With reference to the accompanying drawings, FIG. 2 is a schematic representation showing some parts of a system that are employed in a scanning electron microscope (SEM) 1 for analysing a sample of material. The SEM electron beam 5 is produced inside an evacuated chamber and usually focussed with a combination of magnetic lenses forming the “SEM column”, the final part of which, the SEM final lens pole piece 10 is shown in FIG. 1. When the focussed beam 5 strikes a sample held in a sample holder 15, some electrons are scattered back from the specimen (backscattered electrons or BSE) or interact with the specimen to produce secondary electrons (SE) and a number of other emissions such as X-rays. Kikuchi band patterns are caused by diffraction of the emerging backscattered electrons. The backscattered electrons BSE 20 are detected by an EBSD detector 25. A separate x-ray detector 30 is used to detect the x-rays for analysis.

    [0082] An alternative geometry configuration uses a thin sample that is supported so that the focussed electron beam is transmitted through the sample and the detector is placed below the sample so that electrons scattered from beneath the sample strike the detector which is used to form an image that contains a “transmitted electron Kikuchi pattern” or TKD pattern.

    [0083] The SEM 1 includes a computer system 50 which is used to operate the microscope, including receiving data from the EBSD detector 25. The computer system 50 takes a conventional form having input devices 55 such as a keyboard and mouse, and output devices 60 such as a display and printer. The computer system 50 has a central processing unit CPU 55. The CPU 55 includes a control unit 65 which controls the operation of the system 50 including its component parts. The CPU 55 includes an arithmetic and logic unit 70 which performs the majority of the processing underlying the method to be described. The CPU 55 also includes primary memory 75 in the form of RAM. External to the CPU 55 there is provided secondary memory 80 arranged as a solid state hard disc which has a much larger memory capacity than the primary memory 75. The secondary memory 80 is provided as a non-volatile memory. The control unit 65 may cause data from the secondary memory 80 to be loaded into the arithmetic and logic unit 70, although in order for this to be achieved it must be firstly loaded into the primary memory 75.

    [0084] In the following description, an embodiment of the invention is provided. In this case a region of a two-phase sample of titanium has been analysed using conventional EBSD using the Hough-indexing method, resulting in 30% of the measurement locations within a grid array of such locations on the sample not being successfully indexed. The objective is to provide reliable phase and orientation information for as many pixels as possible within a given field of view image. The method now described is applied to each pixel which forms the image, subject to the requirement that, for each pixel, at least one neighbouring pixel is capable of being indexed so as to give a phase and orientation. Any pixel which does not meet this requirement is skipped over (ignored) by the method and will therefore either retain its original indexing, or remain unindexed, as applicable. The method serves to reduce the percentage of measurement locations which are not successfully indexed. It also increases the likelihood that pixels, either individually or in small clusters, which differ from surrounding pixels in terms of orientation and/or phase, have been correctly indexed.

    [0085] The method uses electron backscatter diffraction patterns which are analysed from a two-phase titanium sample using the SEM 1. The sample is known to comprise two principal phases: a hexagonal (alpha) phase and a cubic (beta) phase. The sample is prepared for analysis using standard metallurgical techniques and is then loaded into the chamber of the SEM 1, in a conventional manner.

    [0086] Reference is now made to FIG. 3 which shows the main steps of the method now described.

    [0087] At step 300, the parameters are defined which are needed for the calculation, in step 305, of simulated master diffraction patterns for the two known phases in the sample. Thus, in this case there are two known “candidate phases” in the dataset which is to be generated, here these being the hexagonal (alpha) and cubic (beta) phases. The input parameters are the phase crystallography (space group and unit cell parameters), the atomic coordinates, the atom types and their occupancy at each atomic site, the electron beam energy, the minimum desired diffracted reflector intensity, the minimum lattice plane spacing, the Debye-Waller factor and the master simulation resolution. The phase atomic and crystallography data are usually included in a standard crystallography information file (*.cif format) and therefore can be readily obtained from such a file.

    [0088] At step 305, a simulated master diffraction pattern in the form of a master simulation file is generated using the computer system 50 for each of the phases (alpha and beta), using the parameters defined in step 300. The computer system 50 used for this purpose is that used to control the microscope, although a separate computer system could be used instead. The master simulation file includes the predicted diffraction intensities for all crystal directions and is stored in the primary memory 75 of the computer system 50 for subsequent reference. The master simulation can be generated using full dynamical, 2-beam dynamical or kinematical models as desired. Alternatively, it could be derived from experimentally collected diffraction patterns. In the case of experimentally collected diffraction patterns, a number of such patterns may be obtained and then, based upon the information present in the experimentally collected patterns, used to produce a generalised master diffraction pattern.

    [0089] The method then proceeds by analysing the experimental EBSD pattern at each location in the grid array in turn, according to the following series of steps performed for each location.

    [0090] At step 310 the electron beam 5 is caused to be incident on the surface of the sample at each location of a 14 by 14 square grid array, with the distance between the locations being 30 nanometres. An electron backscatter diffraction (EBSD) pattern is generated at each location due to the interaction between the electron beam 5 and the sample material, and this is detected by the EBSD detector 25 forming part of the SEM 1. The EBSD pattern is stored by the computer system 50 in the primary memory 75 forming part of the microscope system, together with the position of the relevant location on the sample and the relative positions of the electron beam, sample and the EBSD detector 25. This information is also stored in the secondary memory 80 for later use as required.

    [0091] The purpose of the use of an array of locations is to provide EBSD analysis information from an area of the sample as part of the overall field of view, for example to provide information including one or more of the size, orientation, distribution and relative quantities of the phases within the titanium sample.

    [0092] At step 315 the diffraction patterns are indexed, where possible, using the Hough-indexing method and the phase and orientation data at each location are stored in the primary memory 75 of the computer system 50 (this being for a first set of locations). Where indexing is not possible, or indexing is only possible with a low confidence, no phase and orientation data are stored and the location is labelled as not indexed. The confidence in a measurement can be evaluated using a number of different techniques. In particular these may include any of the following techniques either alone or in combination: [0093] a) a measure of the diffraction pattern quality; [0094] b) the number of detected Kikuchi bands used for the indexing (or potentially the number of groups of 3 or 4 bands used in the indexing process); [0095] c) the misfit (deviation) between the positions of the Kikuchi bands as detected and the equivalent bands in the final solution; and [0096] d) a relationship between the top and second ranking solutions (a greater difference generally indicating a higher confidence in the top ranking solution).

    [0097] It was noted earlier that the method is applied to all pixels in the image that have at least one neighbour pixel which is capable of being indexed. In general the pixels in the image correspond to locations upon the sample from which an individual EBSD pattern is measured. At step 320, some selection or filtering of the data within the dataset may be applied. This may be in accordance with user input or pre-defined settings. For example, typically locations with diffraction patterns below a predefined threshold of pattern quality are excluded from the dataset to be processed (for example, these may be measurement locations in voids, off the edge of the sample or from non-crystalline regions where there should be no valid solution). Rather than applying the method to all possible locations, during this step, data for locations that require improvement or validation may be identified (either automatically or as a result of user selection). These identified locations are typically: [0098] (i) locations with no successful indexing; [0099] (ii) locations with a low data confidence (e.g. as defined by the number of Kikuchi bands used for indexing, or some other confidence metric); and, [0100] locations or small clusters of locations (typically 5 or fewer) that were indexed with a different phase and/or orientation to the neighbouring locations.

    [0101] It will be appreciated that the relevant data for locations at which the indexing is desired to be improved will typically be a minority of locations within the total of the grid array. As such, the selection of these locations during this step is beneficial to the overall quantity of computing resources used.

    [0102] At step 325, for those locations identified in the previous step 320, any locations which do not have at least one successfully indexed neighbouring measurement are eliminated, with the remaining data forming a dataset of a second set of locations. We note here that the successful indexing is in accordance with step 315 in which locations may be marked as not indexed even if an indexing solution exists, albeit with low confidence.

    [0103] With reference to the neighbouring locations, in the present case of a grid array and thinking of each location as a square such that in combination the locations in the array are space-filling, for a nominal location which is at least one location spaced from the edge of the grid array, the neighbouring locations in this case comprise all locations which share an edge or corner with the present nominal location. With a square grid array there are therefore eight neighbours (four linked to the nominal location by sides and four linked by corners).

    [0104] At step 330, for the first (or next) measurement location in the processing dataset, the experimental diffraction pattern is loaded into the primary memory 75. Note the pattern is usually loaded in its full, stored resolution but it can be reduced in size via pixel-binning to increase the speed of subsequent template matching.

    [0105] If the measurement location was originally indexed successfully (but requires validation as might be the case for an isolated location or a member of a small cluster), then the method proceeds according to steps 335 to 370. If, however, there was no successful indexing of the pattern from this measurement location, then the method proceeds to step 375 to 410.

    Indexing Data Exists For the Location

    [0106] In situations where there is an existing indexing solution for the current location then the steps 335 to 370 described below, with reference to FIG. 4, are directed at refining the indexing solution so as to improve its accuracy. The refined solution will then be compared with the solutions using data from neighbouring locations. Whilst there is an inherent benefit in improving the solution to the indexing from a scientific analysis perspective, this also serves to improve the indexing of any relevant neighbouring locations for which there is currently no indexing (see the section below: Indexing data from nearby locations), if the method is repeated.

    [0107] At step 335, the relative geometry of the measurement location on the sample surface with respect to the detector 25 is defined. This is typically expressed as the position of the EBSD pattern centre on the detector (the pattern centre being defined as the point on the detector that is closest to the electron beam—sample interaction point, i.e. the “current location” which is the origin of the diffraction pattern) and the detector distance (the distance from the detector to the electron beam—sample interaction point). These geometry calibration values are calculated from the detector calibration values taking into account the focal plane of the electron beam (“working distance”) and the detector insertion distance in the chamber of the SEM 1.

    [0108] At step 340, from the simulated master diffraction pattern (step 305) corresponding to the initially indexed phase at this location, a simulated diffraction pattern template is derived for the stored crystallographic orientation (from the earlier indexing), using the geometry calibration values for the relevant point and at the same resolution as the experimental diffraction pattern.

    [0109] At step 345 the simulated template is then correlated to the experimental pattern within the primary memory 75. The similarity between the two images is calculated, in this case using the normalised cross correlation coefficient (NCCC) technique. This gives a value between 0 (images are completely different) and 1 (images are identical, or an inverse of each other).

    [0110] At step 350 the NCCC value and corresponding orientation (for which the template has been simulated) are stored in the primary memory and the template is discarded.

    [0111] At step 355 a new template is generated for a slightly modified crystallographic orientation and is matched to the experimental pattern and the corresponding NCCC value is calculated. A number of different approaches can be used to decide upon how the orientation is modified. The NCCC value is compared to that measured in the previous step to determine whether the match has improved or worsened. The template is then discarded from the primary memory 75.

    [0112] At step 360 a new template is generated for a further slightly modified crystallographic orientation, where the direction of crystallographic rotation is determined by the change in NCCC value in step 350 and 355, and according to the overall approach being used to improve the NCCC value. The new template is matched to the experimental pattern and a new NCCC value calculated. The template is again discarded from the primary memory 75.

    [0113] At step 365, steps 355 and 360 are repeated, using the chosen optimisation approach (e.g. Nelder-Mead or Downhill Simplex) to find the crystallographic orientation that gives the highest NCCC value. In the Nelder-Mead method for example, the orientation parameter angles are each modified individually to generate each template, in a first stage, and then combinations of these are considered in a later stage. The orientation changes are made progressively smaller between each new template until the change in NCCC between successive solutions is below a predetermined threshold or convergence tolerance such as 0.0005.

    [0114] At step 370 the phase, orientation and refined NCCC value corresponding to the best matching template in the previous step are stored. Having improved the indexing solution using the optimisation approach, the method then goes on to seek other potential solutions for the indexing by considering the indexing of nearby locations.

    Indexing Data From Nearby Locations

    [0115] Steps 375 to 415 described below are followed, with reference to FIG. 5, when either there already exists an indexing solution (and steps 335 to 370 have already been performed), or, where there is no existing indexing solution, for the current location (which is in the second set of locations).

    [0116] At step 375, in a similar way to step 335, the relative geometry of the measurement location on the sample surface with respect to the detector 25 is defined. The data from step 335 may be used in this step if step 335 was performed previously. This is typically expressed as the position of the EBSD pattern centre on the detector (the pattern centre being defined as the point on the detector that is closest to the electron beam—sample interaction point, i.e. the “current location” which is the origin of the diffraction pattern) and the detector distance (the distance from the detector to the electron beam—sample interaction point). These geometry calibration values are calculated from the detector calibration values taking into account the focal plane of the electron beam (“working distance”) and the detector insertion distance in the chamber of the SEM 1.

    [0117] At step 380, a first (or next) neighbouring measurement location that has been successfully indexed already, either by virtue of the Hough indexing at step 315, or as a result of earlier refining steps 335 to 370 (excluding any performed for the current location), is selected. From the simulated master diffraction pattern of the initially indexed phase at this neighbouring location, a simulated diffraction pattern template is derived for the stored crystallographic orientation at the neighbouring location, using the geometry calibration values as defined in step 375 and at the same resolution as the experimental diffraction pattern.

    [0118] The next steps 385 to 410 are similar to steps 345 to 370, using the indexed solution from the neighbouring location and comparing it with the experimental diffraction pattern from the current non-indexed location, and proceeding through the similar refinement process.

    [0119] At step 385 the simulated template is then correlated to the experimental pattern for the current location within the primary memory 75. The similarity between the two images is calculated, for example using the normalised cross correlation coefficient (NCCC) technique. This gives a value between 0 (images are completely different) and 1 (images are identical, or an inverse of each other).

    [0120] At step 390 the NCCC value and corresponding orientation (for which the template has been simulated) are stored in the primary memory 75 and the template is discarded.

    [0121] At step 395 a new template is generated for a slightly modified crystallographic orientation and is matched to the experimental pattern and the corresponding NCCC value is calculated. A number of different approaches can be used to decide upon how the orientation is modified. The NCCC value is compared to that measured in the previous step to determine whether the match has improved or worsened. The template is discarded from the primary memory 75.

    [0122] At step 400 a new template is generated for a further slightly modified crystallographic orientation, where the direction of crystallographic rotation is determined by the change in NCCC value in step 390 and 395 and according to the overall approach being used to improve the NCCC value. The new template is matched to the experimental pattern and a new NCCC value calculated. The template is again discarded from the primary memory 75.

    [0123] At step 405, steps 395 and 400 are repeated, using the chosen optimisation approach (e.g. Nelder-Mead or Downhill Simplex) to find the crystallographic orientation that gives the highest NCCC value. In the Nelder-Mead method for example, the orientation parameter angles are each modified individually to generate each template, in a first stage, and then combinations of these are considered in a later stage. The orientation changes are made progressively smaller between each new template until the change in NCCC between successive solutions is below a predetermined threshold or convergence tolerance such as 0.0005.

    [0124] At step 410 the phase, orientation and refined NCCC value corresponding to the best matching template in the previous step are stored.

    [0125] At step 415 the previous steps 380 to 410, are repeated, using the phase and orientation data from each neighbouring location that was previously indexed. The NCCC values and corresponding phase/orientations are stored for each previously indexed location. If the “nearest neighbour” locations are used then, for example when the locations are in a grid array, the maximum number of indexed locations for use as a starting point for indexing the non-indexed location is eight. Of course, where the non-indexed location is adjacent to the edge of the array (such as a side or corner position), or where not all neighbours have resulted in successful indexing, then the number of repetitions in this step 415 is reduced from eight.

    [0126] In either case of where the present location was originally indexed or not indexed, the method then proceeds as discussed below and as illustrated in FIG. 6.

    [0127] At step 420 the phase and orientation of the template that best matches the experimental pattern at each location (highest refined NCCC value) is stored. In the case that the nominal location was not originally indexed, then there will be no solution from steps 335 to 370 and so the resultant solution for the nominal location that is stored will be the best of the number of solutions that resulted from the nearby locations considered in steps 375 to 415. In the case that the nominal location was originally indexed then there will be a solution from steps 335 to 370, together with a number of solutions from the locations considered in steps 375 to 415. In this case the best solution from all of these solutions is selected and stored as the resultant solution for the nominal location. This may therefore be the original solution (which has been refined using the optimisation), or one of the solutions originating from consideration of a nearby location.

    [0128] At step 425 the NCCC of the resultant solution from step 420 above (the best matching phase and orientation) is compared to a predefined threshold (e.g. NCCC=0.15). If the NCCC value equals or exceeds this threshold, then the phase and orientation values are assigned to the measurement location and then stored to the computer primary memory 75. If the NCCC is below the threshold, then the results are discarded and the measurement is designated as “not indexed” in the primary memory 75.

    [0129] At step 430 the method according to steps 330 to 425 is repeated for each of the locations identified in step 320. This typically results in one or more of: [0130] 1) a decrease in the number of locations for which there is no indexing result output; [0131] 2) an increase in the accuracy of the indexing for some indexed locations; and, [0132] 3) an increase in confidence that isolated locations or small clusters of locations have been correctly indexed.

    [0133] At an optional step 435, the method may be repeated from step 320, where the data for the locations now includes changes to the data resulting from a previous iteration. In particular this may now allow additional locations which were not selected for the previous dataset to be analysed because successful indexing of new locations from the previous iteration, now allows new locations to meet the requirement of being locations where at least one neighbouring location has been indexed. The optional step 435 may be executed one, two, three or more times and still cause an improvement in the overall indexing without introducing errors to an unacceptable level.

    [0134] At step 440, once any optional iterations of the process have been completed according to step 435, the process then proceeds by outputting a “repaired” dataset for the locations in the grid array. Such a repaired dataset may be subjected to various further analytical processing. It is also typically displayed to a user of the SEM 1.

    [0135] An example of the improvement in the quality of the indexing data resulting from the application of the method is shown in FIG. 7. An original orientation map is shown on the left-hand side of FIG. 7. Black pixels in the left-hand orientation map indicate where no original indexing was achieved, whereas the lighter shaded pixels are clusters of pixels (or isolated single pixels) that differ in orientation from all of their neighbours. The data was reprocessed using the steps outlined above, with a single iteration (not using step 435) and validating any cluster less than 5 pixels in area according to step 320. This resulted in the repaired map to the right-hand side of FIG. 7. The remaining black pixels are locations where either the refined template matching did not result in a NCCC above the threshold value (0.15) or are locations that did not have neighbouring locations with an indexed orientation/phase.

    [0136] A further example of the effectiveness of the method is illustrated in FIG. 8. The method described above does not require identification of Kikuchi band positions (as would be the case for Hough indexing) but instead looks at the pixel-to-pixel correlation of patterns. This pixel-to-pixel comparison provides a far more robust match between experiment and simulation even when the pattern quality is extremely poor (i.e. when Kikuchi bands are not clearly visible). The image in FIG. 8 labelled “A” demonstrates this in that it shows an example experimental dataset, where a diffraction pattern with almost no visible Kikuchi bands can still be matched to a best fitting template (labelled “B”) and subsequently refined using the method presented above. An indication of the differences between the images A and B is shown in image C. The scale adjacent to each image is given in standard deviations from the mean value in each image.

    [0137] FIG. 9 illustrates the effectiveness of the method in analysing a sample which has undergone substantial deformation. A large area of a deformed Ti sample was analysed using EBSD. The extreme deformation resulted in a poor EBSD pattern quality which in turn resulted in only 82.16% of the locations being indexed. The original orientation map is shown on the left-hand side of FIG. 9 with black pixels indicating points where the diffraction patterns could not be indexed. Reprocessing the non-indexed locations using brute force pattern matching methods, with no constraints on possible orientations, would take approximately 90 minutes on a personal computer with a low performance GPU. On the same computer, repairing the dataset using the method described above, using 5 pixels as the maximum cluster size and with two iterations across the whole dataset, took 4 minutes without needing a GPU. The resulting orientation map, after the present method has been applied, is shown on the right-hand side of FIG. 9. It can be seen that the number of black pixels has been reduced significantly, with a final indexing rate of 99.64% (i.e. 812 pixels left unsolved, shown in black).