Commit 313831b9 authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #22420 clang-format

parent 3508c350
......@@ -9,8 +9,8 @@
#include "MantidDataObjects/PeaksWorkspace.h"
#include "MantidGeometry/Crystal/IndexingUtils.h"
#include "MantidGeometry/Crystal/OrientedLattice.h"
#include "MantidKernel/BoundedValidator.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidKernel/BoundedValidator.h"
namespace Mantid {
namespace Crystal {
......@@ -48,27 +48,27 @@ void IndexPeaksWithSatellites::init() {
this->declareProperty("CommonUBForAll", false,
"Index all orientations with a common UB");
this->declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
std::string("ModVector1"), "0.0,0.0,0.0"),
"Modulation Vector 1: dh, dk, dl");
std::string("ModVector1"), "0.0,0.0,0.0"),
"Modulation Vector 1: dh, dk, dl");
this->declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
std::string("ModVector2"), "0.0,0.0,0.0"),
"Modulation Vector 2: dh, dk, dl");
std::string("ModVector2"), "0.0,0.0,0.0"),
"Modulation Vector 2: dh, dk, dl");
this->declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
std::string("ModVector3"), "0.0,0.0,0.0"),
"Modulation Vector 3: dh, dk, dl");
std::string("ModVector3"), "0.0,0.0,0.0"),
"Modulation Vector 3: dh, dk, dl");
this->declareProperty(
make_unique<PropertyWithValue<int>>("MaxOrder", 0, Direction::Input),
"Maximum order to apply Modulation Vectors. Default = 0");
this->declareProperty("GetModVectorsFromUB", false,
"If false Modulation Vectors will be read from input");
"If false Modulation Vectors will be read from input");
this->declareProperty(make_unique<PropertyWithValue<bool>>("CrossTerms", false,
Direction::Input),
"Include cross terms (false)");
this->declareProperty(make_unique<PropertyWithValue<bool>>(
"CrossTerms", false, Direction::Input),
"Include cross terms (false)");
this->declareProperty(
make_unique<PropertyWithValue<int>>("NumIndexed", 0, Direction::Output),
......
......@@ -41,13 +41,12 @@ double get_factor_for_q_convention(const std::string &convention) {
}
} // namespace
/** Constructor
*/
PredictSatellitePeaks::PredictSatellitePeaks()
: m_qConventionFactor(get_factor_for_q_convention(
ConfigService::Instance().getString("Q.convention"))) { }
ConfigService::Instance().getString("Q.convention"))) {}
/// Initialise the properties
void PredictSatellitePeaks::init() {
......@@ -346,7 +345,8 @@ void PredictSatellitePeaks::predictOffsets(
if (!lambdaFilter.isAllowed(satelliteHKL) && includePeaksInRange)
continue;
Kernel::V3D Qs = goniometer * UB * satelliteHKL * 2.0 * M_PI * m_qConventionFactor;
Kernel::V3D Qs =
goniometer * UB * satelliteHKL * 2.0 * M_PI * m_qConventionFactor;
// Check if Q is non-physical
if (Qs[2] * m_qConventionFactor <= 0)
......@@ -419,7 +419,8 @@ void PredictSatellitePeaks::predictOffsetsWithCrossTerms(
if (!lambdaFilter.isAllowed(satelliteHKL) && includePeaksInRange)
continue;
Kernel::V3D Qs = goniometer * UB * satelliteHKL * 2.0 * M_PI * m_qConventionFactor;
Kernel::V3D Qs =
goniometer * UB * satelliteHKL * 2.0 * M_PI * m_qConventionFactor;
// Check if Q is non-physical
if (Qs[2] <= 0)
......
......@@ -361,7 +361,8 @@ void SaveIsawPeaks::exec() {
out << firstNumber << std::setw(7) << sequenceNumber;
sequenceNumber++;
} else {
out << firstNumber << std::setw(7) << p.getPeakNumber() + appendPeakNumb;
out << firstNumber << std::setw(7)
<< p.getPeakNumber() + appendPeakNumb;
}
// HKL's are flipped by -1 because of the internal Q convention
......
......@@ -227,27 +227,27 @@ void SaveIsawUB::exec() {
out << "\n";
if (ModDim == 0)
{
out << "The above matrix is the Transpose of the UB Matrix. ";
out << "The UB matrix maps the column\n";
out << "vector (h,k,l ) to the column vector ";
out << "(q'x,q'y,q'z).\n";
out << "|Q'|=1/dspacing and its coordinates are a ";
out << "right-hand coordinate system where\n";
out << " x is the beam direction and z is vertically ";
out << "upward.(IPNS convention)\n";
}
else
{
out << "The above matrix is the Transpose of the UB Matrix and the Transpose of ModUB. ";
out << "The UB matrix together with ModUB maps the column vector (h,k,l,m,n,p) \n";
out << "to the column vector (q'x,q'y,q'z).\n";
out << "The columns of ModUB are the coordinates of modulation vectors in Qlab. \n";
out << "|Q'|=1/dspacing and its coordinates are a ";
out << "right-hand coordinate system where";
out << " x is the beam direction and z is vertically ";
out << "upward.(IPNS convention)\n";
if (ModDim == 0) {
out << "The above matrix is the Transpose of the UB Matrix. ";
out << "The UB matrix maps the column\n";
out << "vector (h,k,l ) to the column vector ";
out << "(q'x,q'y,q'z).\n";
out << "|Q'|=1/dspacing and its coordinates are a ";
out << "right-hand coordinate system where\n";
out << " x is the beam direction and z is vertically ";
out << "upward.(IPNS convention)\n";
} else {
out << "The above matrix is the Transpose of the UB Matrix and the "
"Transpose of ModUB. ";
out << "The UB matrix together with ModUB maps the column vector "
"(h,k,l,m,n,p) \n";
out << "to the column vector (q'x,q'y,q'z).\n";
out << "The columns of ModUB are the coordinates of modulation vectors "
"in Qlab. \n";
out << "|Q'|=1/dspacing and its coordinates are a ";
out << "right-hand coordinate system where";
out << " x is the beam direction and z is vertically ";
out << "upward.(IPNS convention)\n";
}
out.close();
......
......@@ -10,8 +10,8 @@
#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/FrameworkManager.h"
#include "MantidCrystal/IndexPeaksWithSatellites.h"
#include "MantidCrystal/FindUBUsingIndexedPeaks.h"
#include "MantidCrystal/IndexPeaksWithSatellites.h"
#include "MantidCrystal/LoadIsawPeaks.h"
#include "MantidCrystal/LoadIsawUB.h"
#include "MantidDataObjects/PeaksWorkspace.h"
......@@ -34,7 +34,7 @@ public:
}
void test_exec() {
LoadIsawPeaks alg1;
LoadIsawPeaks alg1;
TS_ASSERT_THROWS_NOTHING(alg1.initialize())
TS_ASSERT(alg1.isInitialized())
alg1.setPropertyValue("Filename", "Modulated.peaks");
......@@ -54,7 +54,8 @@ public:
FindUBUsingIndexedPeaks alg2;
TS_ASSERT_THROWS_NOTHING(alg2.initialize())
TS_ASSERT(alg2.isInitialized())
TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("ToleranceForSatellite", "0.05"));
TS_ASSERT_THROWS_NOTHING(
alg2.setPropertyValue("ToleranceForSatellite", "0.05"));
TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("PeaksWorkspace", "peaks"));
TS_ASSERT_THROWS_NOTHING(alg2.execute(););
TS_ASSERT(alg2.isExecuted());
......@@ -89,7 +90,6 @@ public:
TS_ASSERT_DELTA(peak3.getK(), -0.56, .01);
TS_ASSERT_DELTA(peak3.getL(), 1.61, .01);
AnalysisDataService::Instance().remove("peaks");
}
};
......
......@@ -57,8 +57,10 @@ public:
FindUBUsingIndexedPeaks alg2;
TS_ASSERT_THROWS_NOTHING(alg2.initialize())
TS_ASSERT(alg2.isInitialized())
TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("ToleranceForSatellite", "0.05"));
TS_ASSERT_THROWS_NOTHING(alg2.setPropertyValue("PeaksWorkspace", "Modulated"));
TS_ASSERT_THROWS_NOTHING(
alg2.setPropertyValue("ToleranceForSatellite", "0.05"));
TS_ASSERT_THROWS_NOTHING(
alg2.setPropertyValue("PeaksWorkspace", "Modulated"));
TS_ASSERT_THROWS_NOTHING(alg2.execute(););
TS_ASSERT(alg2.isExecuted());
......
......@@ -1220,7 +1220,8 @@ API::Workspace_sptr LoadNexusProcessed::loadPeaksEntry(NXEntry &entry) {
}
// After all columns read set IntHKL
for (int r = 0; r < numberPeaks; r++) {
V3D intHKL = V3D(peakWS->getPeak(r).getH(),peakWS->getPeak(r).getK(),peakWS->getPeak(r).getL());
V3D intHKL = V3D(peakWS->getPeak(r).getH(), peakWS->getPeak(r).getK(),
peakWS->getPeak(r).getL());
peakWS->getPeak(r).setIntHKL(intHKL);
}
}
......
This diff is collapsed.
......@@ -94,8 +94,7 @@ void export_IPeak() {
"Get HKL as a :class:`~mantid.kernel.V3D` object")
.def("getIntHKL", &IPeak::getIntHKL, arg("self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
.def("setIntHKL", &IPeak::setIntHKL,
(arg("self"), arg("hkl")),
.def("setIntHKL", &IPeak::setIntHKL, (arg("self"), arg("hkl")),
"Set the integer HKL for this peak")
.def("setHKL", (void (IPeak::*)(double, double, double)) & IPeak::setHKL,
(arg("self"), arg("h"), arg("k"), arg("l")),
......
Markdown is supported
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