Commit 920d7d6b authored by Samuel Jackson's avatar Samuel Jackson
Browse files

Add doc references to IPeak

parent 858cf2d8
......@@ -47,9 +47,11 @@ void export_IPeak() {
class_<IPeak, boost::noncopyable>("IPeak", no_init)
.def("getDetectorID", &IPeak::getDetectorID, arg("self"),
"Get the ID of the detector at the center of the peak")
"Get the ID of the :class:`~mantid.geometry.Detector` at the center "
"of the peak")
.def("setDetectorID", &IPeak::setDetectorID, (arg("self"), arg("det_id")),
"Set the detector ID and look up and cache values related to it.")
"Set the :class:`~mantid.geometry.Detector` ID and look up and "
"cache values related to it.")
.def("getRunNumber", &IPeak::getRunNumber, arg("self"),
"Return the run number this peak was measured at")
.def("setRunNumber", &IPeak::setRunNumber,
......@@ -63,7 +65,8 @@ void export_IPeak() {
.def("getH", &IPeak::getH, arg("self"), "Get the H index of the peak")
.def("getK", &IPeak::getK, arg("self"), "Get the K index of the peak")
.def("getL", &IPeak::getL, arg("self"), "Get the L index of the peak")
.def("getHKL", &IPeak::getHKL, arg("self"), "Get HKL as a V3D object")
.def("getHKL", &IPeak::getHKL, arg("self"),
"Get HKL as a :class:`~mantid.kernel.V3D` object")
.def("setHKL", (void (IPeak::*)(double, double, double)) & IPeak::setHKL,
(arg("self"), arg("h"), arg("k"), arg("l")),
"Set the HKL values of this peak")
......@@ -75,15 +78,18 @@ void export_IPeak() {
"Get the L index of the peak")
.def("getQLabFrame", &IPeak::getQLabFrame, arg("self"),
"Return the Q change (of the lattice, k_i - k_f) for this peak.\n"
"The Q is in the Lab frame: the goniometer rotation was NOT taken "
"The Q is in the Lab frame: the "
":class:`~mantid.geometry.Goniometer` rotation was NOT taken "
"out.\n"
"Note: There is no 2*pi factor used, so \\|Q| = 1/wavelength.")
.def("findDetector", &IPeak::findDetector, arg("self"),
"Using the instrument set in the peak, perform ray tracing to find "
"the exact detector.")
"Using the :class:`~mantid.geometry.Instrument` set in the peak, "
"perform ray tracing to find "
"the exact :class:`~mantid.geometry.Detector`.")
.def("getQSampleFrame", &IPeak::getQSampleFrame, arg("self"),
"Return the Q change (of the lattice, k_i - k_f) for this peak."
"The Q is in the Sample frame: the goniometer rotation WAS taken "
"The Q is in the Sample frame: the "
":class:`~mantid.geometry.Goniometer` rotation WAS taken "
"out. ")
.def("setQLabFrame", setQLabFrame1, (arg("self"), arg("qlab_frame")),
"Set the peak using the peak's "
......@@ -92,16 +98,19 @@ void export_IPeak() {
.def("setQLabFrame", setQLabFrame2,
(arg("self"), arg("qlab_frame"), arg("distance")),
"Set the peak using the peak's position in reciprocal space, in the "
"lab frame. Detector distance explicitly supplied.") // two argument
// overload
"lab frame. :class:`~mantid.geometry.Detector` distance explicitly "
"supplied.") // two argument
// overload
.def("setQSampleFrame", setQSampleFrame1,
(arg("self"), arg("qsample_frame")), "Set the peak using the peak's "
"position in reciprocal space, "
"in the sample frame.")
(arg("self"), arg("qsample_frame")),
"Set the peak using the peak's "
"position in reciprocal space, "
"in the sample frame.")
.def("setQSampleFrame", setQSampleFrame2,
(arg("self"), arg("qsample_frame"), arg("distance")),
"Set the peak using the peak's position in reciprocal space, in the "
"sample frame. Detector distance explicitly supplied.")
"sample frame. :class:`~mantid.geometry.Detector` distance "
"explicitly supplied.")
.def("setWavelength", &IPeak::setWavelength,
(arg("self"), arg("wave_length")),
"Set the incident wavelength of the neutron. Calculates the energy "
......@@ -140,20 +149,22 @@ void export_IPeak() {
"Set the # of counts in the bin at its peak")
.def("setGoniometerMatrix", &setGoniometerMatrix,
(arg("self"), arg("goniometerMatrix")),
"Set the goniometer of the peak")
"Set the :class:`~mantid.geometry.Goniometer` of the peak")
.def("getRow", &IPeak::getRow, arg("self"),
"For RectangularDetectors only, returns "
"For :class:`~mantid.geometry.RectangularDetector` s only, returns "
"the row (y) of the pixel of the "
"detector.")
.def("getCol", &IPeak::getCol, arg("self"),
"For RectangularDetectors only, returns "
"For :class:`~mantid.geometry.RectangularDetector` s only, returns "
"the column (x) of the pixel of the "
"detector.")
":class:`~mantid.geometry.Detector`.")
.def("getDetPos", &IPeak::getDetPos, arg("self"),
"Return the detector position vector")
"Return the :class:`~mantid.geometry.Detector` position vector")
.def("getL1", &IPeak::getL1, arg("self"),
"Return the L1 flight path length (source to sample), in meters. ")
"Return the L1 flight path length (source to "
":class:`~mantid.api.Sample`), in meters. ")
.def("getL2", &IPeak::getL2, arg("self"),
"Return the L2 flight path length (sample to detector), in meters.")
"Return the L2 flight path length (:class:`~mantid.api.Sample` to "
":class:`~mantid.geometry.Detector`), in meters.")
.def("getPeakShape", getPeakShape, arg("self"), "Get the peak shape");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment