Commit 5e131b36 authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #22420 rename variables

parent ac32221d
......@@ -42,14 +42,17 @@ void PredictSatellitePeaks::init() {
Direction::Output),
"Workspace of Peaks with peaks with fractional h,k, and/or l values");
declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
string("OffsetVector1"), "0.0,0.0,0.0,0"),
"Offsets for h, k, l directions and order");
string("ModVector1"), "0.0,0.0,0.0"),
"Offsets for h, k, l directions ");
declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
string("OffsetVector2"), "0.0,0.0,0.0,0"),
"Offsets for h, k, l directions and order");
string("ModVector2"), "0.0,0.0,0.0"),
"Offsets for h, k, l directions ");
declareProperty(Kernel::make_unique<Kernel::ArrayProperty<double>>(
string("OffsetVector3"), "0.0,0.0,0.0,0"),
"Offsets for h, k, l directions and order");
string("ModVector3"), "0.0,0.0,0.0"),
"Offsets for h, k, l directions ");
declareProperty(make_unique<PropertyWithValue<int>>("MaxOrder", 0,
Direction::Input),
"Maximum order to apply ModVectors. Default = 0");
declareProperty(
"IncludeIntegerHKL", true,
......@@ -101,26 +104,24 @@ void PredictSatellitePeaks::exec() {
throw std::invalid_argument(
"Input workspace is not a PeaksWorkspace. Type=" + Peaks->id());
vector<double> offsets1 = getProperty("OffsetVector1");
vector<double> offsets2 = getProperty("OffsetVector2");
vector<double> offsets3 = getProperty("OffsetVector3");
vector<double> offsets1 = getProperty("ModVector1");
vector<double> offsets2 = getProperty("ModVector2");
vector<double> offsets3 = getProperty("ModVector3");
int maxOrder = getProperty("MaxOrder");
if (offsets1.empty()) {
offsets1.push_back(0.0);
offsets1.push_back(0.0);
offsets1.push_back(0.0);
offsets1.push_back(0.0);
}
if (offsets2.empty()) {
offsets2.push_back(0.0);
offsets2.push_back(0.0);
offsets2.push_back(0.0);
offsets2.push_back(0.0);
}
if (offsets3.empty()) {
offsets3.push_back(0.0);
offsets3.push_back(0.0);
offsets3.push_back(0.0);
offsets3.push_back(0.0);
}
bool includePeaksInRange = getProperty("IncludeAllPeaksInRange");
......@@ -183,7 +184,7 @@ void PredictSatellitePeaks::exec() {
}
size_t N =
NPeaks * (1 + int(offsets1[3] * 2 + offsets2[3] * 2 + offsets3[3] * 2));
NPeaks * (1 + 2 * maxOrder);
if (includePeaksInRange) {
N = possibleHKLs.size();
N = max<size_t>(100, N);
......@@ -201,8 +202,7 @@ void PredictSatellitePeaks::exec() {
int seqNum = 0;
size_t next = 0;
while (!done) {
for (int order = -static_cast<int>(offsets1[3]);
order <= static_cast<int>(offsets1[3]); order++) {
for (int order = -maxOrder; order <= maxOrder; order++) {
if (order == 0 && !includeOrderZero)
continue; // exclude order 0
try {
......@@ -255,8 +255,7 @@ void PredictSatellitePeaks::exec() {
throw std::invalid_argument("Invalid data at this point");
}
}
for (int order = -static_cast<int>(offsets2[3]);
order <= static_cast<int>(offsets2[3]); order++) {
for (int order = -maxOrder; order <= maxOrder; order++) {
if (order == 0)
continue; // already added with 1st vector
try {
......@@ -307,8 +306,7 @@ void PredictSatellitePeaks::exec() {
throw std::invalid_argument("Invalid data at this point");
}
}
for (int order = -static_cast<int>(offsets3[3]);
order <= static_cast<int>(offsets3[3]); order++) {
for (int order = -maxOrder; order <= maxOrder; order++) {
if (order == 0)
continue; // already added with 1st vector
try {
......
......@@ -119,7 +119,7 @@ void SaveIsawPeaks::exec() {
}
if (m_ModStru)
header =
"2 SEQN H K L ORD1 ORD2 ORD3 COL ROW CHAN "
"2 SEQN H K L M N P COL ROW CHAN "
" L2 2_THETA AZ WL D IPK "
" INTI SIGI RFLG";
......@@ -277,7 +277,7 @@ void SaveIsawPeaks::exec() {
offset1 = run.getPropertyValueAsType<std::vector<double>>("Offset1");
offset2 = run.getPropertyValueAsType<std::vector<double>>("Offset2");
offset3 = run.getPropertyValueAsType<std::vector<double>>("Offset3");
out << "9 OFFSETS ";
out << "9 MODVECTOR ";
out << std::setw(12) << std::fixed << std::setprecision(6)
<< qSign * offset1[0] << " ";
out << std::setw(12) << std::fixed << std::setprecision(6)
......
......@@ -115,6 +115,7 @@ void CentroidPeaksMD2::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws) {
centroid[d] /= static_cast<coord_t>(signal);
V3D vecCentroid(centroid[0], centroid[1], centroid[2]);
p.setBinCount(static_cast<double>(signal));
// Save it back in the peak object, in the dimension specified.
try {
......
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