Mantid
Loading...
Searching...
No Matches
PeakAlgorithmHelpers.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
9
10namespace Mantid::Kernel {
11class V3D;
12}
13
14namespace Mantid::Crystal {
15
17double qConventionFactor(const std::string &convention);
18
20double qConventionFactor();
21
23using MNPOffset = std::tuple<double, double, double, Kernel::V3D>;
24
27 inline const static std::string ModVector1{"ModVector1"};
28 inline const static std::string ModVector2{"ModVector2"};
29 inline const static std::string ModVector3{"ModVector3"};
30 inline const static std::string MaxOrder{"MaxOrder"};
31 inline const static std::string CrossTerms{"CrossTerms"};
32
33 static void appendTo(API::IAlgorithm *alg);
34 static ModulationProperties create(const API::IAlgorithm &alg);
35
36 std::vector<MNPOffset> offsets;
40};
41
43std::vector<Kernel::V3D> validModulationVectors(const std::vector<double> &modVector1,
44 const std::vector<double> &modVector2,
45 const std::vector<double> &modVector3);
46
48std::vector<Kernel::V3D> addModulationVectors(const std::vector<double> &modVector1,
49 const std::vector<double> &modVector2,
50 const std::vector<double> &modVector3);
51
53std::vector<MNPOffset> generateOffsetVectors(const std::vector<Kernel::V3D> &modVectors, const int maxOrder,
54 const bool crossTerms);
56std::vector<MNPOffset> generateOffsetVectors(const std::vector<double> &hOffsets, const std::vector<double> &kOffsets,
57 const std::vector<double> &lOffsets);
58} // namespace Mantid::Crystal
const std::vector< V3D > modVectors
Definition: IndexPeaks.cpp:56
const bool crossTerms
Definition: IndexPeaks.cpp:57
const int maxOrder
Definition: IndexPeaks.cpp:55
IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:45
std::vector< Kernel::V3D > addModulationVectors(const std::vector< double > &modVector1, const std::vector< double > &modVector2, const std::vector< double > &modVector3)
Create a list of valid modulation vectors from the input.
std::vector< MNPOffset > generateOffsetVectors(const std::vector< Kernel::V3D > &modVectors, const int maxOrder, const bool crossTerms)
Calculate a list of HKL offsets from the given modulation vectors.
double qConventionFactor()
convenience overload to pull the convention from the config service
std::vector< Kernel::V3D > validModulationVectors(const std::vector< double > &modVector1, const std::vector< double > &modVector2, const std::vector< double > &modVector3)
Create a list of valid modulation vectors from the input.
std::tuple< double, double, double, Kernel::V3D > MNPOffset
Tie together a modulated peak number with its offset.
Tie together the names of the properties for the modulation vectors.
static void appendTo(API::IAlgorithm *alg)
Append the common set of properties that relate to modulation vectors to the given algorithm.