Skip to content
Snippets Groups Projects
Commit 3d580900 authored by Bhuvan Bezawada's avatar Bhuvan Bezawada
Browse files

Removed setPosition and setRotation function pointers

re #22885
parent ada4880d
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,6 @@ void export_DetectorInfo() {
double (DetectorInfo::*twoTheta)(const size_t) const =
&DetectorInfo::twoTheta;
double (DetectorInfo::*signedTwoTheta)(const size_t) const =
&DetectorInfo::signedTwoTheta;
Mantid::Kernel::V3D (DetectorInfo::*position)(const size_t) const =
&DetectorInfo::position;
......@@ -33,12 +30,6 @@ void export_DetectorInfo() {
void (DetectorInfo::*setMasked)(const size_t, bool) =
&DetectorInfo::setMasked;
void (DetectorInfo::*setPosition)(const size_t, const Mantid::Kernel::V3D &) =
&DetectorInfo::setPosition;
void (DetectorInfo::*setRotation)(
const size_t, const Mantid::Kernel::Quat &) = &DetectorInfo::setRotation;
// Export to Python
class_<DetectorInfo, boost::noncopyable>("DetectorInfo", no_init)
.def("__len__", &DetectorInfo::size, (arg("self")),
......
......@@ -43,11 +43,6 @@ class DetectorInfoTest(unittest.TestCase):
info = self._ws.detectorInfo()
self.assertEquals(type(info.twoTheta(0)), float)
def test_signedTwoTheta(self):
""" See if the returned value is a double (float in Python). """
info = self._ws.detectorInfo()
self.assertEquals(type(info.signedTwoTheta(0)), float)
def test_setMasked(self):
""" Test that the detector's masking can be set to True. """
info = self._ws.detectorInfo()
......@@ -77,22 +72,6 @@ class DetectorInfoTest(unittest.TestCase):
info = self._ws.detectorInfo()
self.assertEquals(type(info.rotation(0)), Quat)
def test_setPosition(self):
""" Test that the detector's position can be set correctly. """
info = self._ws.detectorInfo()
pos = V3D(0,0,0)
info.setPosition(0, pos)
retPos = info.position(0)
self.assertEquals(pos, retPos)
def test_setRotation(self):
""" Test that the detector's rotation can be set correctly. """
info = self._ws.detectorInfo()
quat = Quat(0,0,0,0)
info.setRotation(0, quat)
retQuat = info.rotation(0)
self.assertEquals(quat, retQuat)
def test_createWorkspaceAndDetectorInfo(self):
""" Try to create a workspace and see if DetectorInfo object
is accessable """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment