From ada4880dae0c8959feeacfa6abddf54c3af78939 Mon Sep 17 00:00:00 2001 From: Bhuvan Bezawada <bhuvan_777@outlook.com> Date: Tue, 17 Jul 2018 10:06:35 +0100 Subject: [PATCH] Updated DetectorInfo.rst file re #22885 --- .../geometry/src/Exports/DetectorInfo.cpp | 48 +++++++++---------- .../python/mantid/geometry/DetectorInfo.rst | 11 +++++ 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp index 7520c357aae..03c498928d8 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorInfo.cpp @@ -41,37 +41,37 @@ void export_DetectorInfo() { // Export to Python class_<DetectorInfo, boost::noncopyable>("DetectorInfo", no_init) - .def("__len__", &DetectorInfo::size, (arg("self")), - "Returns the size of the DetectorInfo, i.e., the number of " - "detectors in the instrument.") + .def("__len__", &DetectorInfo::size, (arg("self")), + "Returns the size of the DetectorInfo, i.e., the number of " + "detectors in the instrument.") - .def("size", &DetectorInfo::size, (arg("self")), - "Returns the size of the DetectorInfo, i.e., the number of " - "detectors in the instrument.") + .def("size", &DetectorInfo::size, (arg("self")), + "Returns the size of the DetectorInfo, i.e., the number of " + "detectors in the instrument.") - .def("isMonitor", isMonitor, (arg("self"), arg("index")), - "Returns True if the detector is a monitor.") + .def("isMonitor", isMonitor, (arg("self"), arg("index")), + "Returns True if the detector is a monitor.") - .def("isMasked", isMasked, (arg("self"), arg("index")), - "Returns True if the detector is masked.") + .def("isMasked", isMasked, (arg("self"), arg("index")), + "Returns True if the detector is masked.") - .def("isEquivalent", &DetectorInfo::isEquivalent, - (arg("self"), arg("other")), - "Returns true if the content of this is equivalent to the content " - "of other.") + .def("isEquivalent", &DetectorInfo::isEquivalent, + (arg("self"), arg("other")), + "Returns true if the content of this is equivalent to the content " + "of other.") - .def("twoTheta", twoTheta, (arg("self"), arg("index")), - "Returns 2 theta (scattering angle w.r.t beam direction).") + .def("twoTheta", twoTheta, (arg("self"), arg("index")), + "Returns 2 theta (scattering angle w.r.t beam direction).") - .def("position", position, (arg("self"), arg("index")), - "Returns the absolute position of the detector with given index.") + .def("position", position, (arg("self"), arg("index")), + "Returns the absolute position of the detector with given index.") - .def("rotation", rotation, (arg("self"), arg("index")), - "Returns the absolute rotation of the detector with given index.") + .def("rotation", rotation, (arg("self"), arg("index")), + "Returns the absolute rotation of the detector with given index.") - .def("setMasked", setMasked, (arg("self"), arg("index"), arg("masked")), - "Set the mask flag of the detector with given index.") + .def("setMasked", setMasked, (arg("self"), arg("index"), arg("masked")), + "Set the mask flag of the detector with given index.") - .def("clearMaskFlags", &DetectorInfo::clearMaskFlags, (arg("self")), - "Sets all mask flags to false (unmasked)."); + .def("clearMaskFlags", &DetectorInfo::clearMaskFlags, (arg("self")), + "Sets all mask flags to false (unmasked)."); } diff --git a/docs/source/api/python/mantid/geometry/DetectorInfo.rst b/docs/source/api/python/mantid/geometry/DetectorInfo.rst index 8359fea8503..63080a0c869 100644 --- a/docs/source/api/python/mantid/geometry/DetectorInfo.rst +++ b/docs/source/api/python/mantid/geometry/DetectorInfo.rst @@ -4,6 +4,17 @@ This is a python binding to the C++ class Mantid::Geometry::DetectorInfo. +-------- +Purpose +-------- +The purpose of the DetectorInfo object is to allow the user to access information about the detector(s) being used in an experiment. The DetectorInfo object can be used to access information such as the number of detectors in the instrument, the absolute position of a detector as well as the absolute rotation of a detector. There are many other methods available as well. + +Many users may need this extra information so that they can have a better understanding of the instrument they are using. This extra information is also easy and fast to access meaning the users can make improvements to their experimental design with ease. + +DetectorInfo is one of three objects that the user can gain access to from a Workspace. The other two are: +* SpectrumInfo +* ComponentInfo + *bases:* :py:obj:`mantid.geometry.DetectorInfo` .. module:`mantid.geometry` -- GitLab