Mantid
Loading...
Searching...
No Matches
SpectrumInfoItem.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 +
8#include "MantidKernel/V3D.h"
9
11#include <boost/python/class.hpp>
12#include <boost/python/module.hpp>
13
17using namespace boost::python;
18
19// Export SpectrumInfoItem
21
22 // Export to Python
23 class_<SpectrumInfoItem<SpectrumInfo>>("SpectrumInfoItem", no_init)
24 .add_property("isMonitor", &SpectrumInfoItem<SpectrumInfo>::isMonitor)
25 .add_property("isMasked", &SpectrumInfoItem<SpectrumInfo>::isMasked)
26 .add_property("twoTheta", &SpectrumInfoItem<SpectrumInfo>::twoTheta)
27 .add_property("signedTwoTheta", &SpectrumInfoItem<SpectrumInfo>::signedTwoTheta)
28 .add_property("l2", &SpectrumInfoItem<SpectrumInfo>::l2)
29 .add_property("hasDetectors", &SpectrumInfoItem<SpectrumInfo>::hasDetectors)
30 .add_property("hasUniqueDetector", &SpectrumInfoItem<SpectrumInfo>::hasUniqueDetector)
31 .add_property("spectrumDefinition",
32 make_function(&SpectrumInfoItem<SpectrumInfo>::spectrumDefinition, return_internal_reference<>()))
33 .add_property("position", &SpectrumInfoItem<SpectrumInfo>::position)
34 .def("setMasked", &SpectrumInfoItem<SpectrumInfo>::setMasked, (arg("self"), arg("masked")),
35 "Set the mask flag for the spectrum");
36}
void export_SpectrumInfoItem()
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2....
Definition: SpectrumInfo.h:53
Class for 3D vectors.
Definition: V3D.h:34