Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
55041ab8
Commit
55041ab8
authored
Mar 11, 2021
by
Whitfield, Ross
Browse files
Reduce the columns shown for LeanElasticPeaksWorksace
parent
869f145c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Framework/DataObjects/src/LeanElasticPeak.cpp
View file @
55041ab8
...
...
@@ -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"
);
}
// -------------------------------------------------------------------------------------
...
...
Framework/DataObjects/src/LeanElasticPeaksWorkspace.cpp
View file @
55041ab8
...
...
@@ -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"
);
}
//---------------------------------------------------------------------------------------------
...
...
Framework/DataObjects/test/LeanElasticPeakTest.h
View file @
55041ab8
...
...
@@ -38,7 +38,7 @@ public:
TS_ASSERT_EQUALS
(
p
.
getQSampleFrame
(),
V3D
(
0
,
0
,
0
))
TS_ASSERT_EQUALS
(
p
.
getQLabFrame
(),
V3D
())
TS_ASSERT_
EQUAL
S
(
p
.
getDetectorID
(),
-
1
)
TS_ASSERT_
THROW
S
(
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
&
)
...
...
Framework/DataObjects/test/LeanElasticPeaksWorkspaceTest.h
View file @
55041ab8
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment