Commit db868bcd authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #22420 change ModUB when modulation vectors entered

parent e90dc3bb
......@@ -131,6 +131,12 @@ void IndexPeaksWithSatellites::exec() {
if (maxOrder == 0)
maxOrder = o_lattice.getMaxOrder();
CT = o_lattice.getCrossTerm();
} else {
o_lattice.setModVec1(offsets1);
o_lattice.setModVec2(offsets2);
o_lattice.setModVec3(offsets3);
o_lattice.setMaxOrder(maxOrder);
o_lattice.setCrossTerm(CT);
}
const Matrix<double> &UB = o_lattice.getUB();
......
......@@ -153,12 +153,20 @@ void PredictSatellitePeaks::exec() {
OrientedLattice lattice = sample.getOrientedLattice();
if (getProperty("GetModVectorsFromUB")) {
bool fromUB = getProperty("GetModVectorsFromUB");
if (fromUB) {
offsets1 = lattice.getModVec(0);
offsets2 = lattice.getModVec(1);
offsets3 = lattice.getModVec(2);
if (maxOrder == 0)
maxOrder = lattice.getMaxOrder();
crossTerms = lattice.getCrossTerm();
} else {
lattice.setModVec1(offsets1);
lattice.setModVec2(offsets2);
lattice.setModVec3(offsets3);
lattice.setMaxOrder(maxOrder);
lattice.setCrossTerm(crossTerms);
}
const auto instrument = Peaks->getInstrument();
......@@ -252,12 +260,20 @@ void PredictSatellitePeaks::exec_peaks() {
OrientedLattice lattice = sample.getOrientedLattice();
if (getProperty("GetModVectorsFromUB")) {
bool fromUB = getProperty("GetModVectorsFromUB");
if (fromUB) {
offsets1 = lattice.getModVec(0);
offsets2 = lattice.getModVec(1);
offsets3 = lattice.getModVec(2);
if (maxOrder == 0)
maxOrder = lattice.getMaxOrder();
crossTerms = lattice.getCrossTerm();
} else {
lattice.setModVec1(offsets1);
lattice.setModVec2(offsets2);
lattice.setModVec3(offsets3);
lattice.setMaxOrder(maxOrder);
lattice.setCrossTerm(crossTerms);
}
bool includePeaksInRange = false;
......
......@@ -42,7 +42,7 @@ public:
// Access private variables
const Kernel::DblMatrix &getU() const;
const Kernel::DblMatrix &getUB() const;
const Kernel::DblMatrix &getModUB() const;
Kernel::DblMatrix &getModUB();
void setU(const Kernel::DblMatrix &newU, const bool force = true);
void setUB(const Kernel::DblMatrix &newUB);
void setModUB(const Kernel::DblMatrix &newModUB);
......
......@@ -95,7 +95,10 @@ const DblMatrix &OrientedLattice::getU() const { return U; }
*/
const DblMatrix &OrientedLattice::getUB() const { return UB; }
const DblMatrix &OrientedLattice::getModUB() const { return ModUB; }
DblMatrix &OrientedLattice::getModUB(){
ModUB = UB * getModHKL();
return ModUB;
}
/** Sets the U matrix
@param newU :: the new U matrix
......
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