Check out the Hyperspy Workshop May 13-17, 2024 Online

refine_best_orientation#

VectorIndexationGenerator.refine_best_orientation(orientations, accelarating_voltage, camera_length, rank=0, index_error_tol=0.2, vary_angles=True, vary_center=False, vary_scale=False, method='leastsq')[source]#

Refines the best orientation and assigns hkl indices to diffraction vectors.

Parameters:
  • rank (int) – The rank of the solution, i.e. rank=2 refines the third best solution

  • index_error_tol (float) – Max allowed error in peak indexation for classifying it as indexed, calculated as \(|hkl_calculated - round(hkl_calculated)|\).

  • method (str) – Minimization algorithm to use, choose from: ‘leastsq’, ‘nelder’, ‘powell’, ‘cobyla’, ‘least-squares’. See lmfit documentation (https://lmfit.github.io/lmfit-py/fitting.html) for more information.

  • vary_angles (bool,) – Free the euler angles (rotation matrix) during the refinement.

  • vary_center (bool) – Free the center of the diffraction pattern (beam center) during the refinement.

  • vary_scale (bool) – Free the scale (i.e. pixel size) of the diffraction vectors during refinement.

Returns:

indexation_results – Navigation axes of the diffraction vectors signal containing vector indexation results for each probe position.

Return type:

VectorMatchingResults