Mantid
Loading...
Searching...
No Matches
RectangularDetector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
10#include <boost/python/class.hpp>
11#include <boost/python/register_ptr_to_python.hpp>
12
14using namespace Mantid::Geometry;
15using namespace boost::python;
16
18
19
24 register_ptr_to_python<RectangularDetector_sptr>();
25 register_ptr_to_python<RectangularDetector_const_sptr>();
26
27 // vector of RectangularDetector's without an internal proxy
28 std_vector_exporter<RectangularDetector_const_sptr, /*NoProxy=*/true>::wrap("std_vector_rectangular_detector");
29
30 class_<RectangularDetector, bases<GridDetector>, boost::noncopyable>("RectangularDetector", no_init)
31 .def("xpixels", &RectangularDetector::xpixels, arg("self"), "Returns the number of pixels in the X direction")
32 .def("ypixels", &RectangularDetector::ypixels, arg("self"), "Returns the number of pixels in the Y direction")
33 .def("xstep", &RectangularDetector::xstep, arg("self"), "Returns the step size in the X direction")
34 .def("ystep", &RectangularDetector::ystep, arg("self"), "Returns the step size in the Y direction")
35 .def("xsize", &RectangularDetector::xsize, arg("self"), "Returns the size in the X direction")
36 .def("ysize", &RectangularDetector::ysize, arg("self"), "Returns the size in the Y direction")
37 .def("xstart", &RectangularDetector::xstart, arg("self"), "Returns the start position in the X direction")
38 .def("ystart", &RectangularDetector::ystart, arg("self"), "Returns the start position in the Y direction")
39 .def("idstart", &RectangularDetector::idstart, arg("self"), "Returns the idstart")
40 .def("idfillbyfirst_y", &RectangularDetector::idfillbyfirst_y, arg("self"), "Returns the idfillbyfirst_y")
41 .def("idstepbyrow", &RectangularDetector::idstepbyrow, arg("self"), "Returns the idstepbyrow")
42 .def("idstep", &RectangularDetector::idstep, arg("self"), "Returns the idstep")
43 .def("minDetectorID", &RectangularDetector::minDetectorID, arg("self"), "Returns the minimum detector id")
44 .def("maxDetectorID", &RectangularDetector::maxDetectorID, arg("self"), "Returns the maximum detector id");
45}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_RectangularDetector()
Enables boost.python to automatically "cast" an object up to the appropriate Detector leaf type.
RectangularDetector is a type of CompAssembly, an assembly of components.
std::shared_ptr< const RectangularDetector > RectangularDetector_const_sptr
A struct to help export std::vector types.