Skip to content

Commit

Permalink
mantid convention fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleQianliMa committed Feb 7, 2025
1 parent bab805a commit 3fedbca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Framework/MDAlgorithms/src/DebyeWallerFactorCorrectionMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void DebyeWallerFactorCorrectionMD::init() {
QTransform::init();
auto mustBePositive = std::make_shared<BoundedValidator<double>>();
mustBePositive->setLower(0.0);
declareProperty(std::make_unique<PropertyWithValue<double>>("Mean squared displacement", EMPTY_DBL(),
declareProperty(std::make_unique<PropertyWithValue<double>>("MeanSquaredDisplacement", EMPTY_DBL(),
std::move(mustBePositive), Direction::Input),
"Mandatory: Mean squared displacement <u^2>. Often obtained from Rietveld refinement.");
}
Expand All @@ -53,7 +53,7 @@ void DebyeWallerFactorCorrectionMD::exec() { QTransform::exec(); }

// implement correction method
double DebyeWallerFactorCorrectionMD::correction(const double q2) const {
const double u2 = getProperty("Mean squared displacement");
const double u2 = getProperty("MeanSquaredDisplacement");
const double inverse_DWF = exp(u2 * q2 / 3.0);
return inverse_DWF;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DebyeWallerFactorCorrectionMDTest : public CxxTest::TestSuite {
TS_ASSERT(alg.isInitialized())
TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspace", inputWS));
TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("OutputWorkspace", "_unused_for_child"));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("Mean squared displacement", 0.1));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("MeanSquaredDisplacement", 0.1));
TS_ASSERT_THROWS_NOTHING(alg.execute(););
TS_ASSERT(alg.isExecuted());
Mantid::API::IMDEventWorkspace_sptr outputWS = alg.getProperty("OutputWorkspace");
Expand Down Expand Up @@ -100,7 +100,7 @@ class DebyeWallerFactorCorrectionMDTest : public CxxTest::TestSuite {
TS_ASSERT(alg.isInitialized())
TS_ASSERT_THROWS_NOTHING(alg.setProperty("InputWorkspace", inputWS));
TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("OutputWorkspace", "_unused_for_child"));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("Mean squared displacement", "0.15"));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("MeanSquaredDisplacement", "0.15"));
TS_ASSERT_THROWS_NOTHING(alg.execute(););
TS_ASSERT(alg.isExecuted());
Mantid::API::IMDEventWorkspace_sptr outputWS = alg.getProperty("OutputWorkspace");
Expand Down
4 changes: 2 additions & 2 deletions docs/source/algorithms/DebyeWallerFactorCorrectionMD-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Description
-----------

Scales the the signal and error of MD events by the inverse of Debye-Waller Factor :math:`exp(<q>^2 \times <u^2>)` where :math:`<u^2>` is
the `Mean squared displacement`.
the `MeanSquaredDisplacement`.

`Mean squared displacement` must be a positive float number.
`MeanSquaredDisplacement` must be a positive float number.

Input workspace must be in Q with either 1 dimension of \|Q\| or 3 Q_sample/Q_lab dimensions.
It is assumed that the Q dimensions come first follow by any number of other dimensions.
Expand Down

0 comments on commit 3fedbca

Please sign in to comment.