Mantid
Loading...
Searching...
No Matches
Framework
PythonInterface
mantid
api
src
Exports
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 +
7
#include "
MantidAPI/SpectrumInfoItem.h
"
8
#include "
MantidKernel/V3D.h
"
9
10
#include "
MantidAPI/SpectrumInfo.h
"
11
#include <boost/python/class.hpp>
12
#include <boost/python/module.hpp>
13
14
using
Mantid::API::SpectrumInfo
;
15
using
Mantid::API::SpectrumInfoItem
;
16
using
Mantid::Kernel::V3D
;
17
using namespace
boost::python
;
18
19
// Export SpectrumInfoItem
20
void
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
}
export_SpectrumInfoItem
void export_SpectrumInfoItem()
Definition:
SpectrumInfoItem.cpp:20
SpectrumInfoItem.h
SpectrumInfo.h
V3D.h
Mantid::API::SpectrumInfoItem
SpectrumInfoItem.
Definition:
SpectrumInfoItem.h:37
Mantid::API::SpectrumInfo
API::SpectrumInfo is an intermediate step towards a SpectrumInfo that is part of Instrument-2....
Definition:
SpectrumInfo.h:53
Mantid::Kernel::V3D
Class for 3D vectors.
Definition:
V3D.h:34
boost::python
Definition:
NDArray.h:50
Generated on Tue Jan 3 2023 11:57:58 for Mantid by
1.9.5