Mantid
Loading...
Searching...
No Matches
GridDetector.cpp
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2020 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 +
12#include <boost/python/class.hpp>
13#include <boost/python/register_ptr_to_python.hpp>
14
16using namespace Mantid::Geometry;
17using namespace boost::python;
18
20
21
26 register_ptr_to_python<std::shared_ptr<GridDetector>>();
27 register_ptr_to_python<GridDetector_const_sptr>();
28
29 std_vector_exporter<GridDetector_const_sptr, /*NoProxy=*/true>::wrap("std_vector_grid_detector");
30
31 class_<GridDetector, bases<CompAssembly, IObjComponent>, boost::noncopyable>("GridDetector", no_init)
32 .def("xpixels", &GridDetector::xpixels, arg("self"), "Returns the number of pixels in the X direction")
33 .def("ypixels", &GridDetector::ypixels, arg("self"), "Returns the number of pixels in the Y direction")
34 .def("zpixels", &GridDetector::zpixels, arg("self"), "Returns the number of pixels in the Z direction")
35 .def("xstep", &GridDetector::xstep, arg("self"), "Returns the step size in the X direction")
36 .def("ystep", &GridDetector::ystep, arg("self"), "Returns the step size in the Y direction")
37 .def("zstep", &GridDetector::zstep, arg("self"), "Returns the step size in the Z direction")
38 .def("xsize", &GridDetector::xsize, arg("self"), "Returns the size in the X direction")
39 .def("ysize", &GridDetector::ysize, arg("self"), "Returns the size in the Y direction")
40 .def("zsize", &GridDetector::zsize, arg("self"), "Returns the size in the Z direction")
41 .def("xstart", &GridDetector::xstart, arg("self"), "Returns the start position in the X direction")
42 .def("ystart", &GridDetector::ystart, arg("self"), "Returns the start position in the Y direction")
43 .def("zstart", &GridDetector::zstart, arg("self"), "Returns the start position in the Z direction")
44 .def("idstart", &GridDetector::idstart, arg("self"), "Returns the idstart")
45 .def("idFillOrder", &GridDetector::idFillOrder, arg("self"), "Returns the idFillOrder")
46 .def("idstepbyrow", &GridDetector::idstepbyrow, arg("self"), "Returns the idstepbyrow")
47 .def("idstep", &GridDetector::idstep, arg("self"), "Returns the idstep")
48 .def("minDetectorID", &GridDetector::minDetectorID, arg("self"), "Returns the minimum detector id")
49 .def("maxDetectorID", &GridDetector::maxDetectorID, arg("self"), "Returns the maximum detector id");
50}
51
53 class_<GridDetectorPixel, bases<Detector>, boost::noncopyable>("GridDetectorPixel", no_init);
54}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition GetPointer.h:17
void export_GridDetector()
Enables boost.python to automatically "cast" an object up to the appropriate Detector leaf type.
void export_GridDetectorPixel()
GridDetector is a type of CompAssembly, an assembly of components.
detid_t maxDetectorID()
maximum detector id
double ystart() const
Returns the start position in the Y direction.
double ysize() const
Size in Y of the detector.
double xsize() const
Size in X of the detector.
int xpixels() const
Returns the number of pixels in the X direction.
std::string idFillOrder() const
Returns the id fill order.
int idstep() const
Returns the idstep.
int idstart() const
Returns the idstart.
double ystep() const
Returns the step size in the Y direction.
double xstep() const
Returns the step size in the X direction.
int ypixels() const
Returns the number of pixels in the Y direction.
double xstart() const
Returns the start position in the X direction.
int idstepbyrow() const
Returns the idstepbyrow.
double zstart() const
Returns the start position in the Z direction.
double zsize() const
Size in Z of the detector.
detid_t minDetectorID()
minimum detector id
int zpixels() const
Returns the number of pixels in the Z direction.
double zstep() const
Returns the step size in the Z direction.
std::shared_ptr< const GridDetector > GridDetector_const_sptr
A struct to help export std::vector types.