14#include <boost/optional.hpp>
15#include <boost/python/class.hpp>
16#include <boost/python/register_ptr_to_python.hpp>
51void setGoniometerMatrix(
IPeak &self,
const object &data) {
59 using return_copy_to_numpy = return_value_policy<Policies::MatrixToNumpy>;
61 register_ptr_to_python<IPeak *>();
63 class_<IPeak, boost::noncopyable>(
"IPeak", no_init)
64 .def(
"getRunNumber", &
IPeak::getRunNumber, arg(
"self"),
"Return the run number this peak was measured at")
65 .def(
"getIntMNP", &
IPeak::getIntMNP, arg(
"self"),
"Return the modulated scructure for this peak")
66 .def(
"getPeakNumber", &
IPeak::getPeakNumber, arg(
"self"),
"Return the peak number for this peak")
68 "Set the run number that measured this peak")
69 .def(
"setIntMNP", &
IPeak::setIntMNP, (arg(
"self"), arg(
"modulated_structure")),
70 "Set the modulated structure for this peak")
72 "Set the peak number for this peak")
75 "Set the monitor count for this peak")
76 .def(
"getH", &
IPeak::getH, arg(
"self"),
"Get the H index of the peak")
77 .def(
"getK", &
IPeak::getK, arg(
"self"),
"Get the K index of the peak")
78 .def(
"getL", &
IPeak::getL, arg(
"self"),
"Get the L index of the peak")
79 .def(
"getHKL", &
IPeak::getHKL, arg(
"self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
80 .def(
"getIntHKL", &
IPeak::getIntHKL, arg(
"self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
81 .def(
"setIntHKL", &
IPeak::setIntHKL, (arg(
"self"), arg(
"hkl")),
"Set the integer HKL for this peak")
83 "Get the cached samplePos as a :class:`~mantid.kernel.V3D` object")
85 (arg(
"self"), arg(
"h"), arg(
"k"), arg(
"l")),
"Set the HKL values of this peak")
87 (arg(
"self"), arg(
"samX"), arg(
"samY"), arg(
"samZ")),
88 "Set the samplePos value of this peak. It does not set the "
89 "instrument sample position.")
91 (arg(
"self"), arg(
"newPos")),
92 "Set the samplePos value of this peak. It does not set the "
93 "instrument sample position.")
94 .def(
"setH", &
IPeak::setH, (arg(
"self"), arg(
"h")),
"Get the H index of the peak")
95 .def(
"setK", &
IPeak::setK, (arg(
"self"), arg(
"k")),
"Get the K index of the peak")
96 .def(
"setL", &
IPeak::setL, (arg(
"self"), arg(
"l")),
"Get the L index of the peak")
98 "Return the Q change (of the lattice, k_i - k_f) for this peak.\n"
99 "The Q is in the Lab frame: the "
100 ":class:`~mantid.geometry.Goniometer` rotation was NOT taken "
102 "Note: There is no 2*pi factor used, so \\|Q| = 1/wavelength.")
104 "Return the Q change (of the lattice, k_i - k_f) for this peak."
105 "The Q is in the Sample frame: the "
106 ":class:`~mantid.geometry.Goniometer` rotation WAS taken "
108 .def(
"setQLabFrame", setQLabFrame1, (arg(
"self"), arg(
"qlab_frame")),
109 "Set the peak using the peak's "
110 "position in reciprocal space, in "
112 .def(
"setQLabFrame", setQLabFrame2, (arg(
"self"), arg(
"qlab_frame"), arg(
"distance")),
113 "Set the peak using the peak's position in reciprocal space, in the "
114 "lab frame. :class:`~mantid.geometry.Detector` distance explicitly "
117 .def(
"setQSampleFrame", setQSampleFrame1, (arg(
"self"), arg(
"qsample_frame")),
118 "Set the peak using the peak's "
119 "position in reciprocal space, "
120 "in the sample frame.")
121 .def(
"setQSampleFrame", setQSampleFrame2, (arg(
"self"), arg(
"qsample_frame"), arg(
"distance")),
122 "Set the peak using the peak's position in reciprocal space, in the "
123 "sample frame. :class:`~mantid.geometry.Detector` distance "
124 "explicitly supplied.")
126 "Set the incident wavelength of the neutron. Calculates the energy "
127 "from this assuming elastic scattering.")
129 .def(
"getScattering", &
IPeak::getScattering, arg(
"self"),
"Calculate the scattering angle of the peak")
130 .def(
"getAzimuthal", &
IPeak::getAzimuthal, arg(
"self"),
"Calculate the azimuthal angle of the peak")
131 .def(
"getDSpacing", &
IPeak::getDSpacing, arg(
"self"),
"Calculate the d-spacing of the peak, in 1/Angstroms")
133 "Calculate the time of flight (in "
134 "microseconds) of the neutrons for this "
137 "Get the initial (incident) neutron energy in meV.")
140 "Get the initial neutron energy minus the final neutron energy in "
142 "\n\n.. versionadded:: 3.12.0")
144 "Set the initial (incident) neutron energy in meV.")
146 "Set the final neutron energy in meV.")
147 .def(
"getIntensity", &
IPeak::getIntensity, arg(
"self"),
"Return the integrated peak intensity")
149 "Return the error on the integrated peak intensity")
151 "Return the error on the integrated peak intensity divided by the "
152 "error in intensity.\n\n.. versionadded:: 3.12.0")
153 .def(
"setIntensity", &
IPeak::setIntensity, (arg(
"self"), arg(
"intensity")),
"Set the integrated peak intensity")
155 "Set the error on the integrated peak intensity")
157 "Set the absorption weighted path length")
158 .def(
"getBinCount", &
IPeak::getBinCount, arg(
"self"),
"Return the # of counts in the bin at its peak")
160 "Set the # of counts in the bin at its peak")
162 "Get the :class:`~mantid.geometry.Goniometer` rotation matrix of "
164 "\n\n.. versionadded:: 3.12.0")
165 .def(
"setGoniometerMatrix", &setGoniometerMatrix, (arg(
"self"), arg(
"goniometerMatrix")),
166 "Set the :class:`~mantid.geometry.Goniometer` rotation matrix of "
169 "For :class:`~mantid.geometry.RectangularDetector` s only, returns "
170 "the row (y) of the pixel of the "
173 "For :class:`~mantid.geometry.RectangularDetector` s only, returns "
174 "the column (x) of the pixel of the "
175 ":class:`~mantid.geometry.Detector`.")
177 "Return the L1 flight path length (source to "
178 ":class:`~mantid.api.Sample`), in meters. ")
180 "Return the L2 flight path length (:class:`~mantid.api.Sample` to "
181 ":class:`~mantid.geometry.Detector`), in meters.")
182 .def(
"getPeakShape", getPeakShape, arg(
"self"),
"Get the peak shape")
184 "Get the absorption weighted path length")
186 arg(
"self"), return_value_policy<RemoveConstSharedPtr>(),
187 "Returns the :class:`~mantid.geometry.ReferenceFrame` attached that "
188 "defines the instrument axes");
#define GET_POINTER_SPECIALIZATION(TYPE)
Structure describing a single-crystal peak.
virtual double getH() const =0
virtual void setHKL(double H, double K, double L)=0
virtual void setIntensity(double m_Intensity)=0
virtual double getTOF() const =0
virtual void setK(double m_K)=0
virtual double getScattering() const =0
virtual Mantid::Kernel::Matrix< double > getGoniometerMatrix() const =0
virtual void setBinCount(double m_BinCount)=0
virtual double getSigmaIntensity() const =0
virtual double getWavelength() const =0
virtual void setQLabFrame(const Mantid::Kernel::V3D &QLabFrame, boost::optional< double > detectorDistance)=0
virtual int getPeakNumber() const =0
virtual Mantid::Kernel::V3D getSamplePos() const =0
virtual void setH(double m_H)=0
virtual double getDSpacing() const =0
virtual void setGoniometerMatrix(const Mantid::Kernel::Matrix< double > &m_GoniometerMatrix)=0
virtual void setPeakNumber(int m_PeakNumber)=0
virtual double getBinCount() const =0
virtual Mantid::Kernel::V3D getIntHKL() const =0
virtual double getInitialEnergy() const =0
virtual double getK() const =0
virtual void setIntMNP(const Mantid::Kernel::V3D &MNP)=0
virtual int getRow() const =0
virtual double getEnergyTransfer() const =0
virtual double getAbsorptionWeightedPathLength() const =0
virtual double getL2() const =0
virtual void setAbsorptionWeightedPathLength(double pathLength)=0
virtual void setFinalEnergy(double m_FinalEnergy)=0
virtual int getCol() const =0
virtual std::shared_ptr< const Geometry::ReferenceFrame > getReferenceFrame() const =0
virtual void setInitialEnergy(double m_InitialEnergy)=0
virtual void setMonitorCount(double m_MonitorCount)=0
virtual int getRunNumber() const =0
virtual Mantid::Kernel::V3D getQSampleFrame() const =0
virtual double getIntensity() const =0
virtual double getL() const =0
virtual void setSigmaIntensity(double m_SigmaIntensity)=0
virtual const Mantid::Geometry::PeakShape & getPeakShape() const =0
virtual double getFinalEnergy() const =0
virtual double getAzimuthal() const =0
virtual void setL(double m_L)=0
virtual Mantid::Kernel::V3D getQLabFrame() const =0
virtual double getL1() const =0
virtual void setQSampleFrame(const Mantid::Kernel::V3D &QSampleFrame, boost::optional< double > detectorDistance)=0
virtual void setSamplePos(double samX, double samY, double samZ)=0
virtual void setRunNumber(int m_RunNumber)=0
virtual void setIntHKL(const Mantid::Kernel::V3D &HKL)=0
virtual Mantid::Kernel::V3D getHKL() const =0
virtual Mantid::Kernel::V3D getIntMNP() const =0
virtual double getIntensityOverSigma() const =0
virtual void setWavelength(double wavelength)=0
virtual double getMonitorCount() const =0
virtual PeakShape * clone() const =0
Deep copy this.
ReferenceFrame : Holds reference frame information from the geometry description file.
std::shared_ptr< PeakShape > PeakShape_sptr
Takes a Python object and if it supports indexing and is two dimensional it attempts to convert it to...
Implements the RemoveConstSharedPtr policy.