Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. EMsoft (before version 5.0, in which a NORDIF reader was added) cannot read the patterns stored in NORDIF's format, so, read the Pattern.dat file into KikuchiPy and write them to an .h5 file (HDF5), which can be read by EMsoft using the EMEBSD reader.
  2. EMsoft has no static background correction, so, before writing the patterns to the .h5 file, use the static_background_correction() method in KikuchiPy.

Comparing simulated patterns from an indexing run to the experimental patterns

After a successful indexing run, the dynamically simulated patterns that best matched the experimental patterns can be simulated for a visual comparison by following these steps using both EMsoft and KikuchiPy:

  1. Simulate the patterns
    1. Create a text file with the best matching patterns' orientations using the EMsoft program EMgetEulers.
    2. Simulate the patterns using EMEBSD. This will create an HDF5 file (.h5) with the simulated patterns with the file size equal to the file size of experimental pattern file if patterns were simulated to 8-bit depth (0-255).
  2. Visualise the simulated and experimental patterns. The patterns can be read into KikuchiPy by for now (a reader for the simulated patterns will be created so the file can be loaded with the kikuchipy.load() function) using the following, followed by plotting the two data sets together, using:

    import kikuchipy as kp
    import h5py
    import hyperspy.api as hs
    s = kp.load('/path/to/experimental/patterns/Pattern.dat')
    with h5py.File('/path/to/emebsd/file/simulated_patterns.h5', mode='r') as f:
        simulated_patterns = f['EMData/EBSD/EBSDPatterns][()]
    s_sim = kp.signals.EBSD(simulated_patterns.reshape(s.data.shape))
    hs.plot.plot_signals([s, s_sim])

Resources