Commit 55041ab8 authored by Whitfield, Ross's avatar Whitfield, Ross
Browse files

Reduce the columns shown for LeanElasticPeaksWorksace

parent 869f145c
......@@ -112,7 +112,10 @@ void LeanElasticPeak::setDetectorID(int) {
//----------------------------------------------------------------------------------------------
/** Get the ID of the detector at the center of the peak */
int LeanElasticPeak::getDetectorID() const { return -1; }
int LeanElasticPeak::getDetectorID() const {
throw Exception::NotImplementedError(
"LeanElasticPeak::getDetectorID(): no detector ID on LeanElasticPeak");
}
//----------------------------------------------------------------------------------------------
/** Set the instrument (and save the source/sample pos).
......@@ -161,7 +164,8 @@ double LeanElasticPeak::getWavelength() const { return m_wavelength; }
* peak,
* using the geometry of the detector */
double LeanElasticPeak::getTOF() const {
return std::numeric_limits<double>::quiet_NaN();
throw Exception::NotImplementedError(
"LeanElasticPeak::getTOF(): no detector infomation in LeanElasticPeak");
}
// -------------------------------------------------------------------------------------
......
......@@ -403,25 +403,19 @@ LeanElasticPeaksWorkspace::createDetectorTable() const {
void LeanElasticPeaksWorkspace::initColumns() {
// Note: The column types are controlled in PeakColumn.cpp
addPeakColumn("RunNumber");
addPeakColumn("DetID");
addPeakColumn("h");
addPeakColumn("k");
addPeakColumn("l");
addPeakColumn("Wavelength");
addPeakColumn("Energy");
addPeakColumn("TOF");
addPeakColumn("DSpacing");
addPeakColumn("Intens");
addPeakColumn("SigInt");
addPeakColumn("Intens/SigInt");
addPeakColumn("BinCount");
addPeakColumn("BankName");
addPeakColumn("Row");
addPeakColumn("Col");
addPeakColumn("QLab");
addPeakColumn("QSample");
addPeakColumn("PeakNumber");
addPeakColumn("TBar");
}
//---------------------------------------------------------------------------------------------
......
......@@ -38,7 +38,7 @@ public:
TS_ASSERT_EQUALS(p.getQSampleFrame(), V3D(0, 0, 0))
TS_ASSERT_EQUALS(p.getQLabFrame(), V3D())
TS_ASSERT_EQUALS(p.getDetectorID(), -1)
TS_ASSERT_THROWS(p.getDetectorID(), const Exception::NotImplementedError &)
TS_ASSERT_THROWS(p.getDetector(), const Exception::NotImplementedError &)
TS_ASSERT_THROWS(p.getInstrument(), const Exception::NotImplementedError &)
TS_ASSERT_THROWS(p.findDetector(), const Exception::NotImplementedError &)
......@@ -48,7 +48,7 @@ public:
const Exception::NotImplementedError &)
TS_ASSERT_THROWS(p.getDetPos(), const Exception::NotImplementedError &)
TS_ASSERT_THROWS(p.getSamplePos(), const Exception::NotImplementedError &)
TS_ASSERT(std::isnan(p.getTOF()))
TS_ASSERT_THROWS(p.getTOF(), const Exception::NotImplementedError &)
TS_ASSERT_EQUALS(p.getScattering(), 0.)
TS_ASSERT_EQUALS(p.getAzimuthal(), -M_PI)
TS_ASSERT_THROWS(p.getL1(), const Exception::NotImplementedError &)
......
......@@ -41,7 +41,7 @@ public:
LeanElasticPeak p(V3D(1, 0, 0), 3.0);
pw->addPeak(p);
TS_ASSERT_EQUALS(pw->columnCount(), 20);
TS_ASSERT_EQUALS(pw->columnCount(), 14);
TS_ASSERT_EQUALS(pw->rowCount(), 1);
TS_ASSERT_EQUALS(pw->getNumberPeaks(), 1);
TS_ASSERT_DELTA(pw->getPeak(0).getWavelength(), 3.0, 1e-9);
......
Supports Markdown
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