Commit 0322a61b authored by Danny Hindson's avatar Danny Hindson Committed by Zhang, Chen
Browse files

Fix merge conflict

parent f3d62770
......@@ -163,7 +163,6 @@ void SaveGDA::exec() {
{Kernel::UnitParams::tzero, bankCalibParams.tzero}});
std::transform(x.begin(), x.end(), std::back_inserter(tofScaled),
[](const double tofVal) { return tofVal * tofScale; });
const auto averageDeltaTByT = computeAverageDeltaTByT(tofScaled);
const auto &intensity = matrixWS->y(0);
......
......@@ -236,6 +236,12 @@ protected:
virtual void validateUnitParams(const int emode,
const UnitParametersMap &params);
// validate the contents of the unit parameters map. Throw
// std::invalid_argument if it's a global error or std::runtime_error if it's
// a detector specific error
virtual void validateUnitParams(const int emode,
const UnitParametersMap &params);
/// The unit values have been initialized
bool initialized;
/// l1 :: The source-sample distance (in metres)
......
......@@ -824,6 +824,22 @@ void dSpacingPerpendicular::validateUnitParams(
}
}
void dSpacingPerpendicular::validateUnitParams(
const int, const UnitParametersMap &params) {
if (!ParamPresent(params, UnitParams::l2)) {
throw std::runtime_error(
"A l2 value must be supplied in the extra parameters when "
"initialising " +
this->unitID() + " for conversion via TOF");
}
if (!ParamPresent(params, UnitParams::twoTheta)) {
throw std::runtime_error(
"A two theta value must be supplied in the extra parameters when "
"initialising " +
this->unitID() + " for conversion via TOF");
}
}
void dSpacingPerpendicular::init() {
double l2 = 0.0;
ParamPresentAndSet(m_params, UnitParams::l2, l2);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment