Commit b751edec authored by Whitfield, Ross's avatar Whitfield, Ross
Browse files

Move logging out of Goniometer

parent 435f96a5
......@@ -40,6 +40,8 @@ namespace DataObjects {
/// Register the workspace as a type
DECLARE_WORKSPACE(PeaksWorkspace)
Mantid::Kernel::Logger g_log("PeaksWorkspace");
//---------------------------------------------------------------------------------------------
/** Constructor. Create a table with all the required columns.
*
......@@ -296,6 +298,9 @@ Peak *PeaksWorkspace::createPeakQSample(const V3D &position) const {
wavelength = props->getPropertyValueAsType<double>("wavelength");
}
goniometer.calcFromQSampleAndWavelength(position, wavelength);
g_log.information() << "Found goniometer rotation to be "
<< goniometer.getEulerAngles()[0]
<< " degrees for Q sample = " << position << "\n";
} else {
goniometer = run().getGoniometer();
}
......
......@@ -204,8 +204,6 @@ void Goniometer::calcFromQSampleAndWavelength(
std::vector<double> B{Q_lab[0], Q_lab[2]};
std::vector<double> X = A * B;
double rot = atan2(X[1], X[0]);
g_log.information() << "Found goniometer rotation to be " << rot * 180 / M_PI
<< " degrees for Q sample = " << Q << "\n";
Matrix<double> goniometer(3, 3, true);
goniometer[0][0] = cos(rot);
......
......@@ -298,6 +298,9 @@ FindPeaksMD::createPeak(const Mantid::Kernel::V3D &Q, const double binCount,
double wavelength = getProperty("Wavelength");
Geometry::Goniometer goniometer;
goniometer.calcFromQSampleAndWavelength(Q, wavelength);
g_log.information() << "Found goniometer rotation to be "
<< goniometer.getEulerAngles()[0]
<< " degrees for Q sample = " << Q << "\n";
p = boost::make_shared<Peak>(inst, Q, goniometer.getR());
} else {
......
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