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

refine_n_best_orientations#

VectorIndexationGenerator.refine_n_best_orientations(orientations, accelarating_voltage, camera_length, n_best=0, 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:
  • orientations (VectorMatchingResults) – List of orientations to refine, must be an instance of VectorMatchingResults.

  • accelerating_voltage (float) – The acceleration voltage with which the data was acquired.

  • camera_length (float) – The camera length in meters.

  • n_best (int) – Refine the best n orientations starting from rank. With n_best=0 (default), all orientations are refined.

  • rank (int) – The rank of the solution to start from.

  • 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