13#include <boost/python/class.hpp>
14#include <boost/python/copy_const_reference.hpp>
15#include <boost/python/overloads.hpp>
16#include <boost/python/register_ptr_to_python.hpp>
31BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Instrument_getNumberDetectors,
Instrument::getNumberDetectors, 0, 1)
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`")
57 (arg(
"self"), arg(
"detector_id")),
"Returns the :class:`~mantid.geometry.Detector` with the given ID")
60 "Return the name of the preferred view in instrument view.")
63 Instrument_getNumberDetectors((arg(
"self"), arg(
"skipMonitors") =
false)))
66 arg(
"self"), return_value_policy<RemoveConstSharedPtr>(),
67 "Returns the :class:`~mantid.geometry.ReferenceFrame` attached that "
68 "defines the instrument "
72 "Return the valid from :class:`~mantid.kernel.DateAndTime` of the "
76 "Return the valid to :class:`~mantid.kernel.DateAndTime` of the "
80 "Return the name of the file that the original IDF was from")
83 "Set the name of the file that the original IDF was from")
86 "Return reference to the base instrument")
#define GET_POINTER_SPECIALIZATION(TYPE)
#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::vector< GridDetector_const_sptr > findGridDetectors() const
std::shared_ptr< const Instrument > baseInstrument() const
Pointer to the 'real' instrument, for parametrized instruments.
std::vector< RectangularDetector_const_sptr > findRectDetectors() const
const std::string & getFilename() const
const std::string & getDefaultView() const
Get the default type of the instrument view.
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...
void setFilename(const std::string &filename)
Set the path to the original IDF .xml file that was loaded for this instrument.
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.