{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `kikuchipy` documentation https://kikuchipy.org.\n", "Links to the documentation won't work from the notebook." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Orientation-dependence of the projection center\n", "\n", "In this tutorial, we will see that the error in the projection center (PC) estimated from pattern matching can be orientation-dependent.\n", "When finding an average PC to use for indexing, it is therefore important to average PCs from not only many patterns, but from many patterns from different grains as well, if possible.\n", "\n", "The orientation-dependence of the PC error is nicely demonstrated by Pang et al. (2020).\n", "They simulateneously optimize the orientation and PCs of experimental nickel patterns from an openly available dataset, released by Jackson et al. (2019).\n", "To test their optimization routine, they compare optimized PCs to those expected from geometrical considerations.\n", "\n", "When the dataset was acquired, the sample was tilted $\\sigma = 75.7^{\\circ}$ towards the detector, while the detector was tilted $\\theta = 10^{\\circ}$ away from the sample.\n", "These tilts give a combined $\\alpha = 90^{\\circ} - \\sigma + \\theta$ tilt about the detector $X_d$ axis, which brings the sample normal parallel to the detector normal.\n", "A scan of (n rows, m columns) = (151, 181) patterns with a nominal step size of 1.5 μm was acquired in a nominally regular grid on the sample.\n", "The sample $y$-direction increases \"up the sample\".\n", "Given these geometrical considerations, the PC is expected to change following the following equations:\n", "\n", "\\begin{align}\n", "\\frac{PC_x}{\\Delta y} &= 1,\\\\\n", "\\frac{PC_y}{\\Delta y} &= \\cos{\\alpha} \\cdot \\frac{1}{\\delta},\\\\\n", "\\frac{PC_z}{\\Delta y} &= \\sin{\\alpha}.\n", "\\end{align}\n", "\n", "Here, Bruker's PC convention is used (see the [reference frame tutorial](reference_frames.rst)).\n", "$\\delta$ is the detector pixel size.\n", "The detector used in this experiment has a pixel size of $\\delta = 59.2$ μm.\n", "\n", "Pang and co-workers optimize the orientation solutions and PCs saved with the experimental data as determined from Hough indexing with EDAX OIM.\n", "In this tutorial, we do the following:\n", "\n", "1. Obtain a good starting PC for the refinement:\n", " 1. Optimize the PC of 49 patterns extracted in a grid from the full dataset using Hough indexing. We will use the EDAX OIM PC as the initial guess.\n", " 2. Index the grid patterns using Hough indexing.\n", " 3. Refine the orientations and PCs using pattern matching.\n", " 4. Calculate an average PC using the reliably refined PCs.\n", "2. Index all (151, 181) patterns using Hough indexing with the average PC.\n", "3. Refine Hough indexed orientations and average PC using pattern matching. This is only be done for a vertical slice of the full dataset (the same slice used by Pang and co-workers). The slice has shape (151, 10).\n", "\n", "To validate our results, we average the refined PCs along the horizontal (giving one PC per 151 vertical position) and compare them to the ones expected from the equations above.\n", "\n", "Pang and co-workers use the global optimization algorithm SNOBFIT to optimize orientations and PCs simultaneously.\n", "Here, we will use the local optimization algorithm Nelder-Mead, as implemented in NLopt, and see that we obtain comparable results." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n",
"
| \n",
" \n",
"
| \n",
"