def crystal_from_matching_results(matching_results):
"""Takes matching results for a single navigation position and returns the
best matching phase and orientation with correlation and reliability to
define a crystallographic map.
"""
res_arr = np.zeros(6)
top_index = np.where(matching_results.T[-1]==matching_results.T[-1].max())
res_arr[:5] = matching_results[top_index][0]
res_arr[5] = res_arr[4] - np.partition(matching_results.T[-1], -2)[-2]
return res_arr
评论列表
文章目录