Mantid
Loading...
Searching...
No Matches
IMDWorkspace.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
11#include <boost/python/class.hpp>
12#include <boost/python/enum.hpp>
13
14using namespace Mantid::API;
16using namespace boost::python;
17
19
21 boost::python::enum_<Mantid::API::MDNormalization>("MDNormalization")
22 .value("NoNormalization", Mantid::API::NoNormalization)
23 .value("VolumeNormalization", Mantid::API::VolumeNormalization)
24 .value("NumEventsNormalization", Mantid::API::NumEventsNormalization);
25
26 // EventWorkspace class
27 class_<IMDWorkspace, bases<Workspace, MDGeometry>, boost::noncopyable>("IMDWorkspace", no_init)
28 .def("getNPoints", &IMDWorkspace::getNPoints, arg("self"),
29 "Returns the total number of points within the workspace")
30 .def("getNEvents", &IMDWorkspace::getNEvents, arg("self"),
31 "Returns the total number of events, contributed to the workspace")
32 .def("getSpecialCoordinateSystem", &IMDWorkspace::getSpecialCoordinateSystem, arg("self"),
33 "Returns the special coordinate system of the workspace")
34 .def("isMDHistoWorkspace", &IMDWorkspace::isMDHistoWorkspace, arg("self"),
35 "Returns True if this is considered to be binned data.")
36 .def("displayNormalization", &IMDWorkspace::displayNormalization, args("self"),
37 "Returns the visual "
38 ":class:`~mantid.api.MDNormalization` of the "
39 "workspace.")
40 .def("displayNormalizationHisto", &IMDWorkspace::displayNormalizationHisto, arg("self"),
41 "For MDEventWorkspaces returns the visual "
42 ":class:`~mantid.api.MDNormalization` of derived "
43 "MDHistoWorkspaces. For all others returns the same as "
44 "displayNormalization.");
45
47}
#define GET_POINTER_SPECIALIZATION(TYPE)
Definition: GetPointer.h:17
void export_IMDWorkspace()
Basic MD Workspace Abstract Class.
Definition: IMDWorkspace.h:40
virtual bool isMDHistoWorkspace() const
Definition: IMDWorkspace.h:126
virtual uint64_t getNEvents() const =0
virtual Kernel::SpecialCoordinateSystem getSpecialCoordinateSystem() const =0
virtual MDNormalization displayNormalizationHisto() const
virtual uint64_t getNPoints() const =0
Get the number of points associated with the workspace.
virtual MDNormalization displayNormalization() const
@ VolumeNormalization
Divide the signal by the volume of the box/bin.
Definition: IMDIterator.h:29
@ NumEventsNormalization
Divide the signal by the number of events that contributed to it.
Definition: IMDIterator.h:31
@ NoNormalization
Don't normalize = return raw counts.
Definition: IMDIterator.h:27
Encapsulates the registration required for an interface type T that sits on top of a Kernel::DataItem...