|
30 | 30 | #include "MantidKernel/ArrayProperty.h"
|
31 | 31 | #include "MantidKernel/BoundedValidator.h"
|
32 | 32 | #include "MantidKernel/CompositeValidator.h"
|
33 |
| -#include "MantidKernel/EnumeratedString.h" |
34 |
| -#include "MantidKernel/EnumeratedStringProperty.h" |
35 | 33 | #include "MantidKernel/ListValidator.h"
|
36 | 34 | #include "MantidKernel/MandatoryValidator.h"
|
37 | 35 | #include "MantidKernel/RebinParamsValidator.h"
|
@@ -75,17 +73,6 @@ DECLARE_ALGORITHM(PDCalibration)
|
75 | 73 |
|
76 | 74 | namespace { // anonymous
|
77 | 75 | const auto isNonZero = [](const double value) { return value != 0.; };
|
78 |
| - |
79 |
| -// properties about peak positions to fit |
80 |
| -const std::vector<std::string> peakTypesNames{"BackToBackExponential", "Gaussian", "Lorentzian", "PseudoVoigt", |
81 |
| - "IkedaCarpenterPV"}; |
82 |
| -enum class PeakMode { BackToBackExponential, Gaussian, Lorentzian, PseudoVoigt, IkedaCarpenterPV, enum_count }; |
83 |
| -typedef Mantid::Kernel::EnumeratedString<PeakMode, &peakTypesNames> PEAKMODE; |
84 |
| - |
85 |
| -const vector<std::string> backgroundTypesNames{"Flat", "Linear", "Quadratic"}; |
86 |
| -enum class BackgroundMode { FLAT, LINEAR, QUADRATIC, enum_count }; |
87 |
| -typedef Mantid::Kernel::EnumeratedString<BackgroundMode, &backgroundTypesNames> BACKGROUND_MODE; |
88 |
| - |
89 | 76 | } // namespace
|
90 | 77 |
|
91 | 78 | /// private inner class
|
@@ -231,13 +218,13 @@ void PDCalibration::init() {
|
231 | 218 | "This property has precedence over PreviousCalibrationFile.");
|
232 | 219 |
|
233 | 220 | // properties about peak positions to fit
|
234 |
| - declareProperty(std::make_unique<Mantid::Kernel::EnumeratedStringProperty<PeakMode, &peakTypesNames>>("PeakFunction"), |
| 221 | + std::vector<std::string> peaktypes{"BackToBackExponential", "Gaussian", "Lorentzian", "PseudoVoigt", |
| 222 | + "IkedaCarpenterPV"}; |
| 223 | + declareProperty("PeakFunction", "Gaussian", std::make_shared<StringListValidator>(peaktypes), |
235 | 224 | "Function to fit input peaks.");
|
236 |
| - setProperty("PeakFunction", "Gaussian"); |
237 |
| - declareProperty(std::make_unique<Mantid::Kernel::EnumeratedStringProperty<BackgroundMode, &backgroundTypesNames>>( |
238 |
| - "BackgroundType"), |
| 225 | + vector<std::string> bkgdtypes{"Flat", "Linear", "Quadratic"}; |
| 226 | + declareProperty("BackgroundType", "Linear", std::make_shared<StringListValidator>(bkgdtypes), |
239 | 227 | "Function to fit input peaks background.");
|
240 |
| - setProperty("BackgroundType", "Linear"); |
241 | 228 |
|
242 | 229 | auto peaksValidator = std::make_shared<CompositeValidator>();
|
243 | 230 | auto mustBePosArr = std::make_shared<Kernel::ArrayBoundedValidator<double>>();
|
|
0 commit comments