19#include "MantidCrystal/DllConfig.h"
37 std::string
name()
const override {
return std::string(
"PeakHKLErrors"); };
39 virtual int version()
const {
return 1; };
41 const std::string
category()
const override {
return "Calibration"; };
43 void function1D(
double *out,
const double *xValues,
const size_t nData)
const override;
67 double T0,
double L0);
69 static void cLone(std::shared_ptr<Geometry::ParameterMap> &
pmap,
70 const std::shared_ptr<const Geometry::IComponent> &component,
71 std::shared_ptr<const Geometry::ParameterMap> &pmapSv);
83 std::vector<std::string>
getAttributeNames()
const override {
return {
"OptRuns",
"PeakWorkspaceName"}; }
86 if (attName ==
"OptRuns")
89 if (attName ==
"PeakWorkspaceName")
92 throw std::invalid_argument(
"Not a valid attribute name");
96 if (attName ==
"OptRuns") {
97 OptRuns =
value.asString();
102 if (OptRuns.at(0) !=
'/')
103 OptRuns =
"/" + OptRuns;
105 if (OptRuns.at(OptRuns.size() - 1) !=
'/')
111 }
else if (initMode == 2)
112 throw std::invalid_argument(
"OptRuns can only be set once");
117 if (attName ==
"PeakWorkspaceName") {
118 PeakWorkspaceName =
value.asString();
122 throw std::invalid_argument(
"Not a valid attribute name");
126 if (attName ==
"OptRuns")
129 if (attName ==
"PeakWorkspaceName")
146 mutable bool hasParameterMap =
false;
148 mutable std::shared_ptr<const Geometry::ParameterMap>
pmapSv;
double value
The value of the point.
This is a specialization of IFunction for functions of one real argument.
Attribute is a non-fitting parameter.
Represents the Jacobian in IFitFunction::functionDeriv.
Implements the part of IFunction interface dealing with parameters.
size_t nAttributes() const override
Returns the number of attributes associated with the function.
std::string PeakWorkspaceName
std::vector< std::string > getAttributeNames() const override
Returns a list of attribute names.
std::shared_ptr< Geometry::Instrument > instChange
std::string name() const override
Returns the function's name.
IFunction::Attribute getAttribute(const std::string &attName) const override
Return a value of attribute attName.
virtual int version() const
bool hasAttribute(const std::string &attName) const override
Check if attribute attName exists.
const std::string category() const override
The categories the Fit function belong to.
void setAttribute(const std::string &attName, const IFunction::Attribute &value) override
Set a value to attribute attName.
std::shared_ptr< const Geometry::ParameterMap > pmapSv
Structure describing a single-crystal peak.
std::shared_ptr< PeaksWorkspace > PeaksWorkspace_sptr
Typedef for a shared pointer to a peaks workspace.
std::shared_ptr< Instrument > Instrument_sptr
Shared pointer to an instrument object.
Helper class which provides the Collimation Length for SANS instruments.
Generate a tableworkspace to store the calibration results.