15#include "MantidGeometry/DllConfig.h"
37 double required_tolerance,
int base_index,
size_t num_initial,
double degrees_per_step,
38 bool fixAll =
false,
int iterations = 1);
42 static double Find_UB(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &q_vectors,
double min_d,
double max_d,
43 double required_tolerance,
int base_index,
size_t num_initial,
double degrees_per_step);
47 static double Find_UB(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &q_vectors,
double min_d,
double max_d,
48 double required_tolerance,
double degrees_per_step,
int iterations = 4);
51 static double Optimize_UB(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &hkl_vectors,
52 const std::vector<Kernel::V3D> &q_vectors, std::vector<double> &sigabc);
55 static double Optimize_UB(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &hkl_vectors,
56 const std::vector<Kernel::V3D> &q_vectors);
59 const std::vector<Kernel::V3D> &hkl_vectors,
const std::vector<Kernel::V3D> &mnp_vectors,
60 const int &ModDim,
const std::vector<Kernel::V3D> &q_vectors, std::vector<double> &sigabc,
61 std::vector<double> &sigq);
64 const std::vector<Kernel::V3D> &hkl_vectors,
const std::vector<Kernel::V3D> &mnp_vectors,
65 const int &ModDim,
const std::vector<Kernel::V3D> &q_vectors);
68 static double Optimize_Direction(
Kernel::V3D &best_vec,
const std::vector<int> &index_values,
69 const std::vector<Kernel::V3D> &q_vectors);
73 double degrees_per_step,
double required_tolerance);
76 static size_t ScanFor_Directions(std::vector<Kernel::V3D> &directions,
const std::vector<Kernel::V3D> &q_vectors,
77 double min_d,
double max_d,
double required_tolerance,
double degrees_per_step);
81 static size_t FFTScanFor_Directions(std::vector<Kernel::V3D> &directions,
const std::vector<Kernel::V3D> &q_vectors,
82 double min_d,
double max_d,
double required_tolerance,
double degrees_per_step);
86 static double GetMagFFT(
const std::vector<Kernel::V3D> &q_vectors,
const Kernel::V3D ¤t_dir,
const size_t N,
87 double projections[],
double index_factor,
double magnitude_fft[]);
91 static double GetFirstMaxIndex(
const double magnitude_fft[],
size_t N,
double threshold);
95 static bool FormUB_From_abc_Vectors(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &directions,
size_t a_index,
96 double min_d,
double max_d);
100 static bool FormUB_From_abc_Vectors(
Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &directions,
101 const std::vector<Kernel::V3D> &q_vectors,
double req_tolerance,
double min_vol);
105 const double cosBeta,
const double cosGamma,
const double sinGamma);
109 static void DiscardDuplicates(std::vector<Kernel::V3D> &new_list, std::vector<Kernel::V3D> &directions,
110 const std::vector<Kernel::V3D> &q_vectors,
double required_tolerance,
double len_tol,
117 static void RoundHKLs(std::vector<Kernel::V3D> &hkl_list);
123 static int NumberOfValidIndexes(
const std::vector<Kernel::V3D> &hkls,
double tolerance,
double &average_error);
126 static double IndexingError(
const Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &hkls,
127 const std::vector<Kernel::V3D> &q_vectors);
137 static int NumberIndexed_1D(
const Kernel::V3D &direction,
const std::vector<Kernel::V3D> &q_vectors,
143 const std::vector<Kernel::V3D> &q_vectors,
double tolerance);
146 static int CalculateMillerIndices(
const Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &q_vectors,
147 double tolerance, std::vector<Kernel::V3D> &miller_indices,
double &ave_error);
157 static int GetIndexedPeaks_1D(
const Kernel::V3D &direction,
const std::vector<Kernel::V3D> &q_vectors,
158 double required_tolerance, std::vector<int> &index_vals,
159 std::vector<Kernel::V3D> &indexed_qs,
double &fit_error);
163 const Kernel::V3D &direction_3,
const std::vector<Kernel::V3D> &q_vectors,
164 double required_tolerance, std::vector<Kernel::V3D> &miller_indices,
165 std::vector<Kernel::V3D> &indexed_qs,
double &fit_error);
168 static int GetIndexedPeaks(
const Kernel::DblMatrix &UB,
const std::vector<Kernel::V3D> &q_vectors,
169 double required_tolerance, std::vector<Kernel::V3D> &miller_indices,
170 std::vector<Kernel::V3D> &indexed_qs,
double &fit_error);
173 static std::vector<Kernel::V3D> MakeHemisphereDirections(
int n_steps);
177 static std::vector<Kernel::V3D> MakeCircleDirections(
int n_steps,
const Kernel::V3D &axis,
double angle_degrees);
181 static int SelectDirection(
Kernel::V3D &best_direction,
const std::vector<Kernel::V3D> &q_vectors,
182 const std::vector<Kernel::V3D> &direction_list,
double plane_spacing,
183 double required_tolerance);
186 static bool GetLatticeParameters(
const Kernel::DblMatrix &UB, std::vector<double> &lattice_par);
This class contains static utility methods for indexing peaks and finding the UB matrix.
static Mantid::Kernel::Logger & g_Log
Static reference to the logger class.
Class to implement UB matrix.
Class to implement unit cell of crystals.
The Logger class is in charge of the publishing messages from the framework through various channels.
Helper class which provides the Collimation Length for SANS instruments.