14#include <boost/python/class.hpp>
15#include <boost/python/overloads.hpp>
16#include <boost/python/register_ptr_to_python.hpp>
38 register_ptr_to_python<std::shared_ptr<Instrument>>();
40 class_<Instrument, bases<CompAssembly>, boost::noncopyable>(
"Instrument", no_init)
42 "Return the :class:`~mantid.geometry.Component` object that "
43 "represents the sample")
46 "Return the :class:`~mantid.geometry.Component` object that "
47 "represents the source")
49 .def(
"getComponentByName",
50 (std::shared_ptr<const IComponent>(
Instrument::*)(
const std::string &,
int)
const) &
51 Instrument::getComponentByName,
52 (arg(
"self"), arg(
"cname"), arg(
"nlevels") = 0),
"Returns the named :class:`~mantid.geometry.Component`")
56 (arg(
"self"), arg(
"detector_id")),
"Returns the :class:`~mantid.geometry.Detector` with the given ID")
59 Instrument_getNumberDetectors((arg(
"self"), arg(
"skipMonitors") =
false)))
61 .def(
"getReferenceFrame",
63 return_value_policy<RemoveConstSharedPtr>(),
64 "Returns the :class:`~mantid.geometry.ReferenceFrame` attached that "
65 "defines the instrument "
69 "Return the valid from :class:`~mantid.kernel.DateAndTime` of the "
73 "Return the valid to :class:`~mantid.kernel.DateAndTime` of the "
77 "Return reference to the base instrument")
#define GET_POINTER_SPECIALIZATION(TYPE)
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(valueAsPrettyStrOverloader, valueAsPrettyStr, 0, 2) void export_Property()
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
std::size_t getNumberDetectors(bool skipMonitors=false) const
IComponent_const_sptr getSource() const
Gets a pointer to the source.
std::shared_ptr< const Instrument > baseInstrument() const
Pointer to the 'real' instrument, for parametrized instruments.
std::vector< RectangularDetector_const_sptr > findRectDetectors() const
Types::Core::DateAndTime getValidFromDate() const
std::shared_ptr< const ReferenceFrame > getReferenceFrame() const
Get refernce Frame.
IDetector_const_sptr getDetector(const detid_t &detector_id) const
Gets a pointer to the detector from its ID Note that for getting the detector associated with a spect...
Types::Core::DateAndTime getValidToDate() const
IComponent_const_sptr getSample() const
Gets a pointer to the Sample Position.
int32_t detid_t
Typedef for a detector ID.
Implements the RemoveConstSharedPtr policy.