Materials

Having a proper understanding of the material structure being studied is key to extracting usable information to map. The scimap.XRDMap() class accepts a Phases=[] argument, which is a list of scimap.Phase subclasses. The modules scimap.lmo and scimap.nca include pre-defined phases for LiMn2O4 and LiNi0.8Co0.15Al0.05O2 respectively. Unless you happen to be working with these materials, you will likely need to define some classes in order to perform a thorough analysis.

from scimap import Phase, TetragonalUnitCell, XRDMap

# Create a new class for our material
class Unobtainium(Phase):
    unit_cell = TetragonalUnitCell()
    # Define a list of hkl planes that define this strcture
    reflection_list = [
        Reflection('000', qrange=(2.75, 2.82)),
    ]

 # Now use our new class to analyze mapping data
 mymap = XRDMap(Phases=[Unobtainium])

Notice that the Unobtainium class is not instantiated before being passed to XRDMap. This is because each mapping position gets a new phase object that can be refined.

The reflection_list attribute describes the crystallographic reflection planes for this crystal system. Each entry in this list is a Reflection object. The first argument is a string with the hkl indices. Additionally, a qrange argument (2-tuple) should be given that gives the scattering vector (q) limits. Q can be calculated from 2θ values at a given wavelength λ:

\[q = \frac{4\pi}{\lambda} sin \Big(\frac{2\theta}{2}\Big)\]

As a shortcut, the function scimap.twotheta_to_q can also be used.