Source code for hexrd.utils.hkl

import numpy as np

from hexrd.material.crystallography import hklToStr


[docs]def hkl_to_str(hkl): # Must be a list for consistency hkl = hkl.tolist() if isinstance(hkl, np.ndarray) else hkl return hklToStr(hkl)
[docs]def str_to_hkl(hkl_str): return list(map(int, hkl_str.split()))