Skip to content

Commit

Permalink
Re #8497. Added in a missing factor of 2pi.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Dec 11, 2013
1 parent 19b3681 commit 170480a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/Crystal/src/PredictPeaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ namespace Crystal
{
// ---------------- Determine which HKL to look for -------------------------------------
// Inverse d-spacing that is the limit to look for.
double dstar = 1.0/minD;
double Qmax = 2.*M_PI/minD;
V3D hklMin(0,0,0);
V3D hklMax(0,0,0);
for (double qx=-1; qx < 2; qx += 2)
Expand All @@ -327,7 +327,7 @@ namespace Crystal
{
// Build a q-vector for this corner of a cube
V3D Q(qx,qy,qz);
Q *= dstar;
Q *= Qmax;
V3D hkl = crystal.hklFromQ(Q);
// Find the limits of each hkl
for (size_t i=0; i<3; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ namespace Geometry
{
DblMatrix UBinv = this->getUB();
UBinv.Invert();
V3D out = UBinv*Q; //transform back to HKL
V3D out = UBinv*Q/TWO_PI; //transform back to HKL
return out;
}

Expand Down

0 comments on commit 170480a

Please sign in to comment.