14#include <boost/python/class.hpp>
15#include <boost/python/register_ptr_to_python.hpp>
52void setGoniometerMatrix(
IPeak &self,
const object &data) {
60 using return_copy_to_numpy = return_value_policy<Policies::MatrixToNumpy>;
62 register_ptr_to_python<IPeak *>();
64 class_<IPeak, boost::noncopyable>(
"IPeak", no_init)
65 .def(
"getRunNumber", &
IPeak::getRunNumber, arg(
"self"),
"Return the run number this peak was measured at")
66 .def(
"getIntMNP", &
IPeak::getIntMNP, arg(
"self"),
"Return the modulated scructure for this peak")
67 .def(
"getPeakNumber", &
IPeak::getPeakNumber, arg(
"self"),
"Return the peak number for this peak")
69 "Set the run number that measured this peak")
70 .def(
"setIntMNP", &
IPeak::setIntMNP, (arg(
"self"), arg(
"modulated_structure")),
71 "Set the modulated structure for this peak")
73 "Set the peak number for this peak")
76 "Set the monitor count for this peak")
77 .def(
"getH", &
IPeak::getH, arg(
"self"),
"Get the H index of the peak")
78 .def(
"getK", &
IPeak::getK, arg(
"self"),
"Get the K index of the peak")
79 .def(
"getL", &
IPeak::getL, arg(
"self"),
"Get the L index of the peak")
80 .def(
"getHKL", &
IPeak::getHKL, arg(
"self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
81 .def(
"getIntHKL", &
IPeak::getIntHKL, arg(
"self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
82 .def(
"setIntHKL", &
IPeak::setIntHKL, (arg(
"self"), arg(
"hkl")),
"Set the integer HKL for this peak")
84 "Get the cached samplePos as a :class:`~mantid.kernel.V3D` object")
86 (arg(
"self"), arg(
"h"), arg(
"k"), arg(
"l")),
"Set the HKL values of this peak")
88 (arg(
"self"), arg(
"samX"), arg(
"samY"), arg(
"samZ")),
89 "Set the samplePos value of this peak. It does not set the "
90 "instrument sample position.")
92 (arg(
"self"), arg(
"newPos")),
93 "Set the samplePos value of this peak. It does not set the "
94 "instrument sample position.")
95 .def(
"setH", &
IPeak::setH, (arg(
"self"), arg(
"h")),
"Get the H index of the peak")
96 .def(
"setK", &
IPeak::setK, (arg(
"self"), arg(
"k")),
"Get the K index of the peak")
97 .def(
"setL", &
IPeak::setL, (arg(
"self"), arg(
"l")),
"Get the L index of the peak")
99 "Return the Q change (of the lattice, k_i - k_f) for this peak.\n"
100 "The Q is in the Lab frame: the "
101 ":class:`~mantid.geometry.Goniometer` rotation was NOT taken "
103 "Note: There is no 2*pi factor used, so \\|Q| = 1/wavelength.")
105 "Return the Q change (of the lattice, k_i - k_f) for this peak."
106 "The Q is in the Sample frame: the "
107 ":class:`~mantid.geometry.Goniometer` rotation WAS taken "
109 .def(
"setQLabFrame", setQLabFrame1, (arg(
"self"), arg(
"qlab_frame")),
110 "Set the peak using the peak's "
111 "position in reciprocal space, in "
113 .def(
"setQLabFrame", setQLabFrame2, (arg(
"self"), arg(
"qlab_frame"), arg(
"distance")),
114 "Set the peak using the peak's position in reciprocal space, in the "
115 "lab frame. :class:`~mantid.geometry.Detector` distance explicitly "
118 .def(
"setQSampleFrame", setQSampleFrame1, (arg(
"self"), arg(
"qsample_frame")),
119 "Set the peak using the peak's "
120 "position in reciprocal space, "
121 "in the sample frame.")
122 .def(
"setQSampleFrame", setQSampleFrame2, (arg(
"self"), arg(
"qsample_frame"), arg(
"distance")),
123 "Set the peak using the peak's position in reciprocal space, in the "
124 "sample frame. :class:`~mantid.geometry.Detector` distance "
125 "explicitly supplied.")
127 "Set the incident wavelength of the neutron. Calculates the energy "
128 "from this assuming elastic scattering.")
130 .def(
"getScattering", &
IPeak::getScattering, arg(
"self"),
"Calculate the scattering angle of the peak")
131 .def(
"getAzimuthal", &
IPeak::getAzimuthal, arg(
"self"),
"Calculate the azimuthal angle of the peak")
132 .def(
"getDSpacing", &
IPeak::getDSpacing, arg(
"self"),
"Calculate the d-spacing of the peak, in 1/Angstroms")
134 "Calculate the time of flight (in "
135 "microseconds) of the neutrons for this "
138 "Get the initial (incident) neutron energy in meV.")
141 "Get the initial neutron energy minus the final neutron energy in "
143 "\n\n.. versionadded:: 3.12.0")
145 "Set the initial (incident) neutron energy in meV.")
147 "Set the final neutron energy in meV.")
148 .def(
"getIntensity", &
IPeak::getIntensity, arg(
"self"),
"Return the integrated peak intensity")
150 "Return the error on the integrated peak intensity")
152 "Return the error on the integrated peak intensity divided by the "
153 "error in intensity.\n\n.. versionadded:: 3.12.0")
154 .def(
"setIntensity", &
IPeak::setIntensity, (arg(
"self"), arg(
"intensity")),
"Set the integrated peak intensity")
156 "Set the error on the integrated peak intensity")
158 "Set the absorption weighted path length")
159 .def(
"getBinCount", &
IPeak::getBinCount, arg(
"self"),
"Return the # of counts in the bin at its peak")
161 "Set the # of counts in the bin at its peak")
163 "Get the :class:`~mantid.geometry.Goniometer` rotation matrix of "
165 "\n\n.. versionadded:: 3.12.0")
166 .def(
"setGoniometerMatrix", &setGoniometerMatrix, (arg(
"self"), arg(
"goniometerMatrix")),
167 "Set the :class:`~mantid.geometry.Goniometer` rotation matrix of "
169 .def(
"getDetectorID", &
IPeak::getDetectorID, arg(
"self"),
"Return thhe pixel ID of the detector.")
171 "For :class:`~mantid.geometry.RectangularDetector` s only, returns "
172 "the row (y) of the pixel of the "
175 "For :class:`~mantid.geometry.RectangularDetector` s only, returns "
176 "the column (x) of the pixel of the "
177 ":class:`~mantid.geometry.Detector`.")
179 "Return the L1 flight path length (source to "
180 ":class:`~mantid.api.Sample`), in meters. ")
182 "Return the L2 flight path length (:class:`~mantid.api.Sample` to "
183 ":class:`~mantid.geometry.Detector`), in meters.")
184 .def(
"getPeakShape", getPeakShape, arg(
"self"),
"Get the peak shape")
185 .def(
"setPeakShape", setPeakShape, (arg(
"self"), arg(
"shape")),
"Set the peak shape")
187 "Get the absorption weighted path length")
189 arg(
"self"), return_value_policy<RemoveConstSharedPtr>(),
190 "Returns the :class:`~mantid.geometry.ReferenceFrame` attached that "
191 "defines the instrument axes")
193 "Return the direction of the scattered beam for this peak."
194 "The direction is in the Sample frame: the "
195 ":class:`~mantid.geometry.Goniometer` rotation WAS taken "
198 "Return the direction of the reverse incident beam for this peak."
199 "The direction is in the Sample frame: the "
200 ":class:`~mantid.geometry.Goniometer` rotation WAS taken "
#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 void setQLabFrame(const Mantid::Kernel::V3D &QLabFrame, std::optional< double > detectorDistance)=0
virtual double getSigmaIntensity() const =0
virtual void setPeakShape(Mantid::Geometry::PeakShape *shape)=0
virtual int getDetectorID() const =0
virtual double getWavelength() const =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 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 void setQSampleFrame(const Mantid::Kernel::V3D &QSampleFrame, std::optional< double > detectorDistance)=0
virtual double getIntensityOverSigma() const =0
virtual Mantid::Kernel::V3D getDetectorDirectionSampleFrame() const =0
virtual Mantid::Kernel::V3D getSourceDirectionSampleFrame() 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.