Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

11039 fix failing poldi doctest #191

Merged
merged 2 commits into from Feb 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -58,9 +58,13 @@ class MANTID_SINQ_DLL PoldiSpectrumConstantBackground
const API::FunctionDomain1D &domain,
API::FunctionValues &values) const;

void setParameter(const std::string &name, const double &value, bool explicitlySet = true);
void setParameter(const std::string &name, const double &value,
bool explicitlySet = true);
void setParameter(size_t i, const double &value, bool explicitlySet = true);

double getParameter(const std::string &name) const;
double getParameter(size_t i) const;

protected:
void init();

Expand Down
Expand Up @@ -80,6 +80,19 @@ void PoldiSpectrumConstantBackground::setParameter(size_t i,
}
}

double
PoldiSpectrumConstantBackground::getParameter(const std::string &name) const {
return ParamFunction::getParameter(name);
}

double PoldiSpectrumConstantBackground::getParameter(size_t i) const {
if (m_flatBackground) {
return m_flatBackground->getParameter(i);
}

return 0;
}

void PoldiSpectrumConstantBackground::init() {
m_flatBackground = boost::dynamic_pointer_cast<IFunction1D>(
FunctionFactory::Instance().createFunction("FlatBackground"));
Expand Down