diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp index 47d718238f0c619778f94be92788e7ba868cf79c..52eb111ecf2762d427a04ebb3d880ff732e19084 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/BoundingBox.cpp @@ -9,39 +9,40 @@ using namespace boost::python; void export_BoundingBox() { class_<BoundingBox>("BoundingBox", "Constructs a zero-sized box") .def(init<double, double, double, double, double, double>( - (arg("xmax"), arg("ymax"), arg("zmax"), arg("xmin"), arg("ymin"), - arg("zmin")), + (arg("self"), arg("xmax"), arg("ymax"), arg("zmax"), arg("xmin"), + arg("ymin"), arg("zmin")), "Constructs a box from the six given points")) - .def("minPoint", &BoundingBox::minPoint, + .def("minPoint", &BoundingBox::minPoint, arg("self"), return_value_policy<copy_const_reference>(), "Returns a V3D containing the values of the minimum of the box. See " "mantid.kernel.V3D") - .def("maxPoint", &BoundingBox::maxPoint, + .def("maxPoint", &BoundingBox::maxPoint, arg("self"), return_value_policy<copy_const_reference>(), "Returns a V3D containing the values of the minimum of the box. See " "mantid.kernel.V3D") - .def("centrePoint", &BoundingBox::centrePoint, + .def("centrePoint", &BoundingBox::centrePoint, arg("self"), "Returns a V3D containing the coordinates of the centre point. See " "mantid.kernel.V3D") - .def("width", &BoundingBox::width, "Returns a V3D containing the widths " - "for each dimension. See " - "mantid.kernel.V3D") + .def("width", &BoundingBox::width, arg("self"), + "Returns a V3D containing the widths " + "for each dimension. See " + "mantid.kernel.V3D") - .def("isNull", &BoundingBox::isNull, + .def("isNull", &BoundingBox::isNull, arg("self"), "Returns true if the box has no dimensions that have been set") - .def("isPointInside", &BoundingBox::isPointInside, + .def("isPointInside", &BoundingBox::isPointInside, arg("self"), "Returns true if the given point is inside the object. See " "mantid.kernel.V3D") .def("doesLineIntersect", (bool (BoundingBox::*)(const V3D &, const V3D &) const) & BoundingBox::doesLineIntersect, - (arg("startPoint"), arg("lineDir")), + (arg("self"), arg("startPoint"), arg("lineDir")), "Returns true if the line given by the starting point & direction " "vector passes through the box"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp index 8ea305a1fbecb606b19841418b4092df23149e27..77b295f76a19e855e7abd89b2e65515276e89676 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Component.cpp @@ -48,41 +48,55 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamDescription, void export_Component() { class_<Component, bases<IComponent>, boost::noncopyable>("Component", no_init) .def("getParameterNames", &Component::getParameterNames, - Component_getParameterNames()) - .def("hasParameter", &Component::hasParameter, Component_hasParameter()) + Component_getParameterNames((arg("self"), arg("recursive") = true))) + .def("hasParameter", &Component::hasParameter, + Component_hasParameter( + (arg("self"), arg("name"), arg("recursive") = true))) .def("getNumberParameter", &Component::getNumberParameter, - Component_getNumberParameter()) + Component_getNumberParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getBoolParameter", &Component::getBoolParameter, - Component_getBoolParameter()) + Component_getBoolParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getPositionParameter", &Component::getPositionParameter, - Component_getPositionParameter()) + Component_getPositionParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getRotationParameter", &Component::getRotationParameter, - Component_getRotationParameter()) + Component_getRotationParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getStringParameter", &Component::getStringParameter, - Component_getStringParameter()) + Component_getStringParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getIntParameter", &Component::getIntParameter, - Component_getIntParameter()) + Component_getIntParameter( + (arg("self"), arg("pname"), arg("recursive") = true))) // - .def("getRotation", &Component::getRotation, Component_getRotation()) + .def("getRotation", &Component::getRotation, + Component_getRotation(arg("self"))) .def("getRelativePos", &Component::getRelativePos, - Component_getRelativePos()) + Component_getRelativePos(arg("self"))) // .def("getParamShortDescription", &Component::getParamShortDescription, - Component_getParamShortDescription()) + Component_getParamShortDescription( + (arg("self"), arg("pname"), arg("recursive") = true))) .def("getParamDescription", &Component::getParamDescription, - Component_getParamDescription()) - .def("getShortDescription", &Component::getShortDescription, + Component_getParamDescription( + (arg("self"), arg("pname"), arg("recursive") = true))) + + .def("getShortDescription", &Component::getShortDescription, arg("self"), "Return the short description of current parameterized component") - .def("getDescription", &Component::getDescription, + .def("getDescription", &Component::getDescription, arg("self"), "Return the description of current parameterized component") .def("setDescription", &Component::setDescription, + (arg("self"), arg("descr")), "Set component's description, works only if the component is " "parameterized component") // HACK -- python should return parameters regardless of type. this is // untill rows below do not work .def("getParameterType", &Component::getParameterType, - Component_getParameterType()) + Component_getParameterType( + (arg("self"), arg("pname"), arg("recursive") = true))) //// this does not work for some obvious or not obvious reasons //.def("getParameter", &Component::getNumberParameter, // Component_getNumberParameter()) diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp index fe6107d725d865dd6248c4e34129de1970f47e1d..2a9be545cbb2fc04e75905bdc732db599aa5869b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/DetectorGroup.cpp @@ -8,8 +8,8 @@ using namespace boost::python; void export_DetectorGroup() { class_<DetectorGroup, bases<IDetector>, boost::noncopyable>("DetectorGroup", no_init) - .def("getDetectorIDs", &DetectorGroup::getDetectorIDs, + .def("getDetectorIDs", &DetectorGroup::getDetectorIDs, arg("self"), "Returns the list of detector IDs within this group") - .def("getNameSeparator", &DetectorGroup::getNameSeparator, + .def("getNameSeparator", &DetectorGroup::getNameSeparator, arg("self"), "Returns separator for list of names of detectors"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp index 50993f31ec81d475bb0c211231f29e84f68ca4c4..cf01cad70f650daf90365084fb77c668afc84ed2 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Goniometer.cpp @@ -45,6 +45,6 @@ void export_Goniometer() { getEulerAngles_overloads(args("self", "convention"), "Default convention is \'YZX\'. Universal " "goniometer is \'YZY\'")) - .def("getR", &Goniometer::getR, return_readonly_numpy()) - .def("setR", &setR); + .def("getR", &Goniometer::getR, arg("self"), return_readonly_numpy()) + .def("setR", &setR, (arg("self"), arg("rot"))); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp index cc83d3c6c3de24031536b9e297a3b2049257e35e..28565ab5935ed0fbe38202afe72b96b047313d6d 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Group.cpp @@ -64,25 +64,35 @@ void export_Group() { .value("Associativity", Group::Associativity); class_<Group, boost::noncopyable>("Group", no_init) - .def("__init__", make_constructor(&constructGroupFromString), + .def("__init__", + make_constructor(&constructGroupFromString, default_call_policies(), + (arg("symmetryOperationString"))), "Construct a group from the provided initializer string.") - .def("__init__", make_constructor(&constructGroupFromVector), + .def("__init__", + make_constructor(&constructGroupFromVector, default_call_policies(), + (arg("symmetryOperationVector"))), "Construct a group from the provided symmetry operation list.") - .def("__init__", make_constructor(&constructGroupFromPythonList), + .def("__init__", make_constructor(&constructGroupFromPythonList, + default_call_policies(), + (arg("symmetryOperationList"))), "Construct a group from a python generated symmetry operation list.") - .def("getOrder", &Group::order, "Returns the order of the group.") - .def("getCoordinateSystem", &Group::getCoordinateSystem, + .def("getOrder", &Group::order, arg("self"), + "Returns the order of the group.") + .def("getCoordinateSystem", &Group::getCoordinateSystem, arg("self"), "Returns the type of coordinate system to distinguish groups with " "hexagonal system definition.") - .def("getSymmetryOperations", &Group::getSymmetryOperations, + .def("getSymmetryOperations", &Group::getSymmetryOperations, arg("self"), "Returns the symmetry operations contained in the group.") .def("getSymmetryOperationStrings", &getSymmetryOperationStrings, + arg("self"), "Returns the x,y,z-strings for the contained symmetry operations.") .def("containsOperation", &Group::containsOperation, + (arg("self"), arg("operation")), "Checks whether a SymmetryOperation is included in Group.") - .def("isGroup", &Group::isGroup, "Checks whether the contained symmetry " - "operations fulfill the group axioms.") - .def("fulfillsAxiom", &Group::fulfillsAxiom, + .def("isGroup", &Group::isGroup, arg("self"), + "Checks whether the contained symmetry " + "operations fulfill the group axioms.") + .def("fulfillsAxiom", &Group::fulfillsAxiom, (arg("self"), arg("axiom")), "Checks if the contained symmetry operations fulfill the specified " "group axiom."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp index bc8d4d2cec5779576dd9e2826a345c1cb12821b7..32e39ed16f535e568e236c64ae2cb23c558f3046 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ICompAssembly.cpp @@ -11,8 +11,9 @@ void export_ICompAssembly() { class_<ICompAssembly, boost::python::bases<IComponent>, boost::noncopyable>( "ICompAssembly", no_init) - .def("nelements", &ICompAssembly::nelements, + .def("nelements", &ICompAssembly::nelements, arg("self"), "Returns the number of elements in the assembly") - .def("__getitem__", &ICompAssembly::operator[], + .def("__getitem__", + &ICompAssembly::operator[], (arg("self"), arg("index")), "Return the component at the given index"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp index ff0a91941229fe8a31096d5813371858ab8d374f..d6052b1728b8222a660fcca8861641bc14afa51f 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IComponent.cpp @@ -29,16 +29,18 @@ void export_IComponent() { register_ptr_to_python<boost::shared_ptr<IComponent>>(); class_<IComponent, boost::noncopyable>("IComponent", no_init) - .def("getPos", &IComponent::getPos, + .def("getPos", &IComponent::getPos, arg("self"), "Returns the absolute position of the component") - .def("getDistance", &getDistance, "Returns the distance, in metres, " - "between this and the given component") - .def("getName", &IComponent::getName, "Returns the name of the component") - .def("getFullName", &IComponent::getFullName, + .def("getDistance", &getDistance, (arg("self"), arg("other")), + "Returns the distance, in metres, " + "between this and the given component") + .def("getName", &IComponent::getName, arg("self"), + "Returns the name of the component") + .def("getFullName", &IComponent::getFullName, arg("self"), "Returns full path name of component") - .def("type", &IComponent::type, + .def("type", &IComponent::type, arg("self"), "Returns the type of the component represented as a string") - .def("getRelativeRot", &IComponent::getRelativeRot, + .def("getRelativeRot", &IComponent::getRelativeRot, arg("self"), return_value_policy<copy_const_reference>(), "Returns the relative rotation as a Quat"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp index 8bb8d0299891a3bd402d20f054313c877b2902c8..669fbd06ccd3263a61b79cddffa4ed6e0f5b5795 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IDetector.cpp @@ -11,18 +11,19 @@ void export_IDetector() { class_<IDetector, bases<IObjComponent>, boost::noncopyable>("IDetector", no_init) - .def("getID", &IDetector::getID, "Returns the detector ID") - .def("isMasked", &IDetector::isMasked, "Returns the value of the masked " - "flag. True means ignore this " - "detector") - .def("isMonitor", &IDetector::isMonitor, + .def("getID", &IDetector::getID, arg("self"), "Returns the detector ID") + .def("isMasked", &IDetector::isMasked, arg("self"), + "Returns the value of the masked flag. True means ignore this " + "detector") + .def("isMonitor", &IDetector::isMonitor, arg("self"), "Returns True if the detector is marked as a monitor in the IDF") - .def("solidAngle", &IDetector::solidAngle, "Return the solid angle in " - "steradians between this " - "detector and an observer") + .def("solidAngle", &IDetector::solidAngle, (arg("self"), arg("observer")), + "Return the solid angle in steradians between this " + "detector and an observer") .def("getTwoTheta", &IDetector::getTwoTheta, + (arg("self"), arg("observer"), arg("axis")), "Calculate the angle between this detector, another component and " "an axis") - .def("getPhi", &IDetector::getPhi, + .def("getPhi", &IDetector::getPhi, arg("self"), "Returns the azimuthal angle of this detector"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp index 7f32083e78fdf64734a7f246a1f820ed853d69ee..77f8f1778ea5f7e5b13d3488d92f118368ddae2b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IMDDimension.cpp @@ -39,24 +39,24 @@ void export_IMDDimension() { register_ptr_to_python<boost::shared_ptr<IMDDimension>>(); class_<IMDDimension, boost::noncopyable>("IMDDimension", no_init) - .def("getName", &IMDDimension::getName, "Return the name of the " - "dimension as can be displayed " - "along the axis") - .def("getMaximum", &IMDDimension::getMaximum, + .def("getName", &IMDDimension::getName, arg("self"), + "Return the name of the dimension as can be displayed " + "along the axis") + .def("getMaximum", &IMDDimension::getMaximum, arg("self"), "Return the maximum extent of this dimension") - .def("getMinimum", &IMDDimension::getMinimum, + .def("getMinimum", &IMDDimension::getMinimum, arg("self"), "Return the maximum extent of this dimension") - .def("getNBins", &IMDDimension::getNBins, + .def("getNBins", &IMDDimension::getNBins, arg("self"), "Return the number of bins dimension have (an integrated has one). " "A axis directed along dimension would have getNBins+1 axis points.") - .def("getX", &IMDDimension::getX, + .def("getX", &IMDDimension::getX, (arg("self"), arg("ind")), "Return coordinate of the axis at the given index") - .def("getDimensionId", &IMDDimension::getDimensionId, + .def("getDimensionId", &IMDDimension::getDimensionId, arg("self"), "Return a short name which identify the dimension among other " "dimension." "A dimension can be usually find by its ID and various ") - .def("getUnits", &getUnitsAsStr, + .def("getUnits", &getUnitsAsStr, arg("self"), "Return the units associated with this dimension.") - .def("getMDFrame", &getMDFrame, + .def("getMDFrame", &getMDFrame, arg("self"), "Return the multidimensional frame for this dimension."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp index cf9a708a50efb951e0509784e099ca1c7d90a383..fe184670cb1d98c8599a96ee53409e82c426e0ae 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/IObjComponent.cpp @@ -25,6 +25,7 @@ void export_IObjComponent() { class_<IObjComponent, boost::python::bases<IComponent>, boost::noncopyable>( "IObjComponent", no_init) - .def("shape", &getShape, "Get the object that represents the physical " - "shape of this component"); + .def("shape", &getShape, arg("self"), "Get the object that represents " + "the physical shape of this " + "component"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp index d7ba822270890191a23ac0612aea78464ad82b17..d082519344c6fb4c5b6e68d58ed979e01f4ad589 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Instrument.cpp @@ -15,41 +15,39 @@ void export_Instrument() { class_<Instrument, bases<CompAssembly>, boost::noncopyable>("Instrument", no_init) - .def("getSample", &Instrument::getSample, + .def("getSample", &Instrument::getSample, arg("self"), return_value_policy<RemoveConstSharedPtr>(), "Return the object that represents the sample") - .def("getSource", &Instrument::getSource, + .def("getSource", &Instrument::getSource, arg("self"), return_value_policy<RemoveConstSharedPtr>(), "Return the object that represents the source") .def("getComponentByName", (boost::shared_ptr<IComponent>(Instrument::*)(const std::string &)) & Instrument::getComponentByName, - "Returns the named component") + (arg("self"), arg("cname")), "Returns the named component") .def("getDetector", (boost::shared_ptr<IDetector>( Instrument::*)(const detid_t &) const) & Instrument::getDetector, + (arg("self"), arg("detector_id")), "Returns the detector with the given ID") .def("getReferenceFrame", (boost::shared_ptr<const ReferenceFrame>(Instrument::*)()) & Instrument::getReferenceFrame, - return_value_policy<RemoveConstSharedPtr>(), + arg("self"), return_value_policy<RemoveConstSharedPtr>(), "Returns the reference frame attached that defines the instrument " "axes") - .def("getValidFromDate", &Instrument::getValidFromDate, + .def("getValidFromDate", &Instrument::getValidFromDate, arg("self"), "Return the valid from date of the instrument") - .def("getValidToDate", &Instrument::getValidToDate, + .def("getValidToDate", &Instrument::getValidToDate, arg("self"), "Return the valid to date of the instrument") - .def("getBaseInstrument", &Instrument::baseInstrument, + .def("getBaseInstrument", &Instrument::baseInstrument, arg("self"), return_value_policy<RemoveConstSharedPtr>(), "Return reference to the base instrument"); - ; - - ; } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp index 3f6a3e2ed811775b0019107a4cce1f7a29f1114b..af5dad9763b679e40144822ef79e472624536e42 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/MDFrame.cpp @@ -13,6 +13,6 @@ void export_MDFrame() { register_ptr_to_python<boost::shared_ptr<MDFrame>>(); class_<MDFrame, boost::noncopyable>("MDFrame", no_init) - .def("getUnitLabel", &MDFrame::getUnitLabel) - .def("name", &MDFrame::name); + .def("getUnitLabel", &MDFrame::getUnitLabel, arg("self")) + .def("name", &MDFrame::name, arg("self")); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/Object.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/Object.cpp index 756ed9f2b7d8d8e1a0fed30067fb6c7ca722d43b..33acda45f4d304af7bba24863adb797455708765 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/Object.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/Object.cpp @@ -13,9 +13,9 @@ void export_Object() { class_<Object, boost::noncopyable>("Object", no_init) .def("getBoundingBox", (const BoundingBox &(Object::*)() const) & Object::getBoundingBox, - return_value_policy<copy_const_reference>(), + arg("self"), return_value_policy<copy_const_reference>(), "Return the axis-aligned bounding box for this shape") - .def("getShapeXML", &Object::getShapeXML, + .def("getShapeXML", &Object::getShapeXML, arg("self"), "Returns the XML that was used to create this shape."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp index b392a312a8eefe784c93c74f828db9efda0e334e..14a995b5b9a8a47c38e10f7a23d34f4bd591f057 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/OrientedLattice.cpp @@ -55,13 +55,17 @@ void export_OrientedLattice() { (arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), arg("_gamma"), arg("Unit") = (int)(angDegrees)))) .def(init<UnitCell>(arg("uc"))) - .def("getuVector", (&OrientedLattice::getuVector)) - .def("getvVector", (&OrientedLattice::getvVector)) - .def("getU", &OrientedLattice::getU, return_readonly_numpy()) - .def("setU", &setU) - .def("getUB", &OrientedLattice::getUB, return_readonly_numpy()) - .def("setUB", &setUB) - .def("setUFromVectors", &setUFromVectors) - .def("qFromHKL", &qFromHKL, "Q vector from HKL vector") - .def("hklFromQ", &hklFromQ, "HKL value from Q vector"); + .def("getuVector", (&OrientedLattice::getuVector), arg("self")) + .def("getvVector", (&OrientedLattice::getvVector), arg("self")) + .def("getU", &OrientedLattice::getU, arg("self"), return_readonly_numpy()) + .def("setU", &setU, (arg("self"), arg("newU"))) + .def("getUB", &OrientedLattice::getUB, arg("self"), + return_readonly_numpy()) + .def("setUB", &setUB, (arg("self"), arg("newUB"))) + .def("setUFromVectors", &setUFromVectors, + (arg("self"), arg("u"), arg("v"))) + .def("qFromHKL", &qFromHKL, (arg("self"), arg("vec")), + "Q vector from HKL vector") + .def("hklFromQ", &hklFromQ, (arg("self"), arg("vec")), + "HKL value from Q vector"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp index 420e07c0ea2a4b5fca085a0adb15ba02098b4166..7c8fbf8f63638225abb96f5704d43dbde5b9c84b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PeakShape.cpp @@ -9,10 +9,12 @@ void export_PeakShape() { register_ptr_to_python<Mantid::Geometry::PeakShape_sptr>(); class_<PeakShape, boost::noncopyable>("PeakShape", no_init) - .def("toJSON", &PeakShape::toJSON, "Serialize object to JSON") - .def("shapeName", &PeakShape::shapeName, "Shape name for type of shape") - .def("algorithmVersion", &PeakShape::algorithmVersion, + .def("toJSON", &PeakShape::toJSON, arg("self"), + "Serialize object to JSON") + .def("shapeName", &PeakShape::shapeName, arg("self"), + "Shape name for type of shape") + .def("algorithmVersion", &PeakShape::algorithmVersion, arg("self"), "Number of source integration algorithm version") - .def("algorithmName", &PeakShape::algorithmName, + .def("algorithmName", &PeakShape::algorithmName, arg("self"), "Name of source integration algorithm"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp index 31d222c1a7f857eb4064efe43111e3034283bbdb..612397d3524a54e1a4bfbd7bcdccc5540e14b3d4 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroup.cpp @@ -55,14 +55,16 @@ void export_PointGroup() { .value("Cubic", PointGroup::Cubic); class_<PointGroup, boost::noncopyable, bases<Group>>("PointGroup", no_init) - .def("getName", &PointGroup::getName) - .def("getHMSymbol", &PointGroup::getSymbol) - .def("getCrystalSystem", &PointGroup::crystalSystem) + .def("getName", &PointGroup::getName, arg("self")) + .def("getHMSymbol", &PointGroup::getSymbol, arg("self")) + .def("getCrystalSystem", &PointGroup::crystalSystem, arg("self")) .def("isEquivalent", &isEquivalent, + (arg("self"), arg("hkl1"), arg("hkl2")), "Check whether the two HKLs are symmetrically equivalent.") - .def("getEquivalents", &getEquivalents, "Returns an array with all " - "symmetry equivalents of the " - "supplied HKL.") + .def("getEquivalents", &getEquivalents, (arg("self"), arg("hkl")), + "Returns an array with all symmetry equivalents of the supplied " + "HKL.") .def("getReflectionFamily", &getReflectionFamily, + (arg("self"), arg("hkl")), "Returns the same HKL for all symmetry equivalents."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp index 0ec8f5c51de65da80f1ffe5e224800ae214dc0e9..07ef88cf35da0139bc8344b68d2b0ca4761a4906 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/PointGroupFactory.cpp @@ -25,19 +25,23 @@ void export_PointGroupFactory() { class_<PointGroupFactoryImpl, boost::noncopyable>("PointGroupFactoryImpl", no_init) .def("isSubscribed", &PointGroupFactoryImpl::isSubscribed, + (arg("self"), arg("hmSymbol")), "Returns true of the point group with the given symbol is " "subscribed.") .def("createPointGroup", &PointGroupFactoryImpl::createPointGroup, + (arg("self"), arg("hmSymbol")), "Creates a point group if registered.") .def("createPointGroupFromSpaceGroup", &getPointGroupFromSpaceGroup, + (arg("self"), arg("group")), "Creates the point group that corresponds to the given space group.") .def("createPointGroupFromSpaceGroupSymbol", - &getPointGroupFromSpaceGroupSymbol, + &getPointGroupFromSpaceGroupSymbol, (arg("self"), arg("group")), "Creates a point group directly from the space group symbol.") .def("getAllPointGroupSymbols", - &PointGroupFactoryImpl::getAllPointGroupSymbols, + &PointGroupFactoryImpl::getAllPointGroupSymbols, arg("self"), "Returns all registered point group symbols.") .def("getPointGroupSymbols", &PointGroupFactoryImpl::getPointGroupSymbols, + (arg("self"), arg("crystalsystem")), "Returns all point groups registered for the given crystal system.") .def("Instance", &PointGroupFactory::Instance, return_value_policy<reference_existing_object>(), diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp index 01cf57f0361b3758262a8f13e8461379ec964353..8738dd36438adefb21edaf65818cf8196e0c93b4 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/RectangularDetector.cpp @@ -16,31 +16,33 @@ void export_RectangularDetector() { class_<RectangularDetector, bases<CompAssembly, IObjComponent>, boost::noncopyable>("RectangularDetector", no_init) - .def("xpixels", &RectangularDetector::xpixels, + .def("xpixels", &RectangularDetector::xpixels, arg("self"), "Returns the number of pixels in the X direction") - .def("ypixels", &RectangularDetector::ypixels, + .def("ypixels", &RectangularDetector::ypixels, arg("self"), "Returns the number of pixels in the Y direction") - .def("xstep", &RectangularDetector::xstep, + .def("xstep", &RectangularDetector::xstep, arg("self"), "Returns the step size in the X direction") - .def("ystep", &RectangularDetector::ystep, + .def("ystep", &RectangularDetector::ystep, arg("self"), "Returns the step size in the Y direction") - .def("xsize", &RectangularDetector::xsize, + .def("xsize", &RectangularDetector::xsize, arg("self"), "Returns the size in the X direction") - .def("ysize", &RectangularDetector::ysize, + .def("ysize", &RectangularDetector::ysize, arg("self"), "Returns the size in the Y direction") - .def("xstart", &RectangularDetector::xstart, + .def("xstart", &RectangularDetector::xstart, arg("self"), "Returns the start position in the X direction") - .def("ystart", &RectangularDetector::ystart, + .def("ystart", &RectangularDetector::ystart, arg("self"), "Returns the start position in the Y direction") - .def("idstart", &RectangularDetector::idstart, "Returns the idstart") + .def("idstart", &RectangularDetector::idstart, arg("self"), + "Returns the idstart") .def("idfillbyfirst_y", &RectangularDetector::idfillbyfirst_y, - "Returns the idfillbyfirst_y") - .def("idstepbyrow", &RectangularDetector::idstepbyrow, + arg("self"), "Returns the idfillbyfirst_y") + .def("idstepbyrow", &RectangularDetector::idstepbyrow, arg("self"), "Returns the idstepbyrow") - .def("idstep", &RectangularDetector::idstep, "Returns the idstep") - .def("minDetectorID", &RectangularDetector::minDetectorID, + .def("idstep", &RectangularDetector::idstep, arg("self"), + "Returns the idstep") + .def("minDetectorID", &RectangularDetector::minDetectorID, arg("self"), "Returns the minimum detector id") - .def("maxDetectorID", &RectangularDetector::maxDetectorID, + .def("maxDetectorID", &RectangularDetector::maxDetectorID, arg("self"), "Returns the maximum detector id"); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp index be19d8047e4e04829fe7773e7f6ec54823f0f4ab..c8a79ddbbc76e80bf9bf83a2eb08ba863c6b6c7f 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/ReferenceFrame.cpp @@ -21,13 +21,14 @@ void export_ReferenceFrame() { .export_values(); class_<ReferenceFrame, boost::noncopyable>("ReferenceFrame", no_init) - .def("pointingAlongBeam", &ReferenceFrame::pointingAlongBeam) - .def("pointingUp", &ReferenceFrame::pointingUp) - .def("vecPointingUp", &ReferenceFrame::vecPointingUp) - .def("vecPointingAlongBeam", &ReferenceFrame::vecPointingAlongBeam) - .def("pointingAlongBeamAxis", &ReferenceFrame::pointingAlongBeamAxis) - .def("pointingUpAxis", &ReferenceFrame::pointingUpAxis) - .def("pointingHorizontalAxis", &ReferenceFrame::pointingHorizontalAxis) - - ; + .def("pointingAlongBeam", &ReferenceFrame::pointingAlongBeam, arg("self")) + .def("pointingUp", &ReferenceFrame::pointingUp, arg("self")) + .def("vecPointingUp", &ReferenceFrame::vecPointingUp, arg("self")) + .def("vecPointingAlongBeam", &ReferenceFrame::vecPointingAlongBeam, + arg("self")) + .def("pointingAlongBeamAxis", &ReferenceFrame::pointingAlongBeamAxis, + arg("self")) + .def("pointingUpAxis", &ReferenceFrame::pointingUpAxis, arg("self")) + .def("pointingHorizontalAxis", &ReferenceFrame::pointingHorizontalAxis, + arg("self")); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp index 9b83cabe216135b66e9d7a04c8aa141c5c0c5282..919d784341e24fcb868e2eff89e92e5523843112 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroup.cpp @@ -53,16 +53,19 @@ void export_SpaceGroup() { register_ptr_to_python<boost::shared_ptr<SpaceGroup>>(); class_<SpaceGroup, boost::noncopyable, bases<Group>>("SpaceGroup", no_init) - .def("getNumber", &SpaceGroup::number) - .def("getHMSymbol", &SpaceGroup::hmSymbol) + .def("getNumber", &SpaceGroup::number, arg("self")) + .def("getHMSymbol", &SpaceGroup::hmSymbol, arg("self")) .def("getEquivalentPositions", &getEquivalentPositions, + (arg("self"), arg("point")), "Returns an array with all symmetry equivalents of the supplied " "HKL.") .def("isAllowedReflection", &isAllowedReflection, + (arg("self"), arg("hkl")), "Returns True if the supplied reflection is allowed with respect to " "space group symmetry operations.") - .def("getPointGroup", &SpaceGroup::getPointGroup, + .def("getPointGroup", &SpaceGroup::getPointGroup, arg("self"), "Returns the point group of the space group.") .def("getSiteSymmetryGroup", &getSiteSymmetryGroup, + (arg("self"), arg("position")), "Returns the site symmetry group for supplied point coordinates."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp index 365d6e02a78ba2b35863b83effebb5d24cca5fe1..2b0a5b54e8302334ba9785e5c532f2d6dd51c2b8 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SpaceGroupFactory.cpp @@ -45,19 +45,24 @@ void export_SpaceGroupFactory() { class_<SpaceGroupFactoryImpl, boost::noncopyable>("SpaceGroupFactoryImpl", no_init) .def("isSubscribedSymbol", &isSubscribedSymbol, + (arg("self"), arg("symbol")), "Returns true if the space group the supplied symbol is subscribed.") .def("isSubscribedNumber", &isSubscribedNumber, + (arg("self"), arg("number")), "Returns true if a space group with the given number is subscribed.") - .def("createSpaceGroup", &createSpaceGroup, "Creates a space group.") - .def("getAllSpaceGroupSymbols", &allSpaceGroupSymbols, + .def("createSpaceGroup", &createSpaceGroup, (arg("self"), arg("symbol")), + "Creates a space group.") + .def("getAllSpaceGroupSymbols", &allSpaceGroupSymbols, arg("self"), "Returns all subscribed space group symbols.") .def("getAllSpaceGroupNumbers", - &SpaceGroupFactoryImpl::subscribedSpaceGroupNumbers, + &SpaceGroupFactoryImpl::subscribedSpaceGroupNumbers, arg("self"), "Returns all subscribed space group numbers.") .def("subscribedSpaceGroupSymbols", &spaceGroupSymbolsForNumber, + (arg("self"), arg("number")), "Returns all space group symbols that are registered under the " "given number.") - .def("getSpaceGroupsForPointGroup", &spaceGroupSymbolsForPointGroup) + .def("getSpaceGroupsForPointGroup", &spaceGroupSymbolsForPointGroup, + (arg("self"), arg("pointGroup"))) .def("Instance", &SpaceGroupFactory::Instance, return_value_policy<reference_existing_object>(), "Returns a reference to the SpaceGroupFactory singleton") diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp index be79196c0fee3a15bbded1fa0030b42437bef456..f520a92edac03e3880ecc318023e2736efbe506f 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElement.cpp @@ -42,12 +42,12 @@ void export_SymmetryElement() { .value("None", SymmetryElementRotation::None); class_<SymmetryElement, boost::noncopyable>("SymmetryElement", no_init) - .def("getHMSymbol", &SymmetryElement::hmSymbol, + .def("getHMSymbol", &SymmetryElement::hmSymbol, arg("self"), "Returns the Hermann-Mauguin symbol for the element.") - .def("getAxis", &getAxis, "Returns the symmetry axis or [0,0,0] for " - "identiy, inversion and translations.") - .def("getRotationSense", &getRotationSense, - "Returns the rotation sense" - "of a rotation axis or None" + .def("getAxis", &getAxis, arg("self"), + "Returns the symmetry axis or [0,0,0] for " + "identiy, inversion and translations.") + .def("getRotationSense", &getRotationSense, arg("self"), + "Returns the rotation sense of a rotation axis or None" "if the element is not a rotation."); } diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp index 59db23c9a35c62af611787e2ac2dc1b17e056fde..5804ab01d36d8075314e745c262736fbfa215372 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryElementFactory.cpp @@ -9,6 +9,7 @@ void export_SymmetryElementFactory() { class_<SymmetryElementFactoryImpl, boost::noncopyable>( "SymmetryElementFactoryImpl", no_init) .def("createSymElement", &SymmetryElementFactoryImpl::createSymElement, + (arg("self"), arg("operation")), "Creates the symmetry element that corresponds to the supplied " "symmetry operation.") .def("Instance", &SymmetryElementFactory::Instance, diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp index 180a9153aa917276f8037cf9c0e0d1d8943dd0d7..d20617ea9576b16d6affdb008c4cb89aeb5beb1b 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperation.cpp @@ -34,19 +34,21 @@ void export_SymmetryOperation() { register_ptr_to_python<boost::shared_ptr<SymmetryOperation>>(); class_<SymmetryOperation>("SymmetryOperation") - .def("getOrder", &SymmetryOperation::order, + .def("getOrder", &SymmetryOperation::order, arg("self"), "Returns the order of the symmetry operation, which indicates how " "often the operation needs to be applied to a point to arrive at " "identity.") - .def("getIdentifier", &SymmetryOperation::identifier, + .def("getIdentifier", &SymmetryOperation::identifier, arg("self"), "The identifier of the operation in x,y,z-notation.") .def("transformCoordinates", &applyToCoordinates, + (arg("self"), arg("coordinates")), "Returns transformed coordinates. For transforming HKLs, use " "transformHKL.") - .def("transformHKL", &applyToVector, "Returns transformed HKLs. For " - "transformation of coordinates use " - "transformCoordinates.") - .def("apply", &applyToVector, "An alias for transformHKL."); + .def("transformHKL", &applyToVector, (arg("self"), arg("hkl")), + "Returns transformed HKLs. For transformation of coordinates use " + "transformCoordinates.") + .def("apply", &applyToVector, (arg("self"), arg("hkl")), + "An alias for transformHKL."); std_vector_exporter<Mantid::Geometry::SymmetryOperation>::wrap( "std_vector_symmetryoperation"); diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp index dc78c2bcd5d569943f0c08956a9802974591fb1d..147ff1e85375cdc32b7c96902b8a1d4fb9ab5104 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/SymmetryOperationFactory.cpp @@ -25,14 +25,16 @@ void export_SymmetryOperationFactory() { class_<SymmetryOperationFactoryImpl, boost::noncopyable>( "SymmetryOperationFactoryImpl", no_init) .def("exists", &SymmetryOperationFactoryImpl::isSubscribed, + (arg("self"), arg("identifier")), "Returns true if the symmetry operation is supplied.") .def("createSymOp", &SymmetryOperationFactoryImpl::createSymOp, + (arg("self"), arg("identifier")), "Creates the symmetry operation from the supplied x,y,z-identifier.") - .def("createSymOps", &createSymOps, + .def("createSymOps", &createSymOps, (arg("self"), arg("identifier")), "Creates a vector of SymmetryOperation objects from a semi-colon " "separated list of x,y,z-identifiers.") .def("subscribedSymbols", - &SymmetryOperationFactoryImpl::subscribedSymbols, + &SymmetryOperationFactoryImpl::subscribedSymbols, arg("self"), "Return all subscribed symbols.") .def("Instance", &SymmetryOperationFactory::Instance, return_value_policy<reference_existing_object>(), diff --git a/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp b/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp index 9da36354a38d67012a65986d4586822ff4e7e1a9..326b247bb1c7a501a2711efd64b5728f94ec028a 100644 --- a/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp +++ b/Framework/PythonInterface/mantid/geometry/src/Exports/UnitCell.cpp @@ -38,103 +38,129 @@ void export_UnitCell() { return_readonly_numpy; class_<UnitCell>("UnitCell", init<>()) - .def(init<UnitCell const &>(arg("other"))) - .def(init<double, double, double>((arg("_a"), arg("_b"), arg("_c")))) + .def(init<UnitCell const &>((arg("self"), arg("other")))) + .def(init<double, double, double>( + (arg("self"), arg("_a"), arg("_b"), arg("_c")))) .def(init<double, double, double, double, double, double, optional<int>>( - (arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), - arg("_gamma"), arg("Unit") = (int)(angDegrees)))) - .def("a", (double (UnitCell::*)() const) & UnitCell::a) - .def("a1", (double (UnitCell::*)() const) & UnitCell::a1) - .def("a2", (double (UnitCell::*)() const) & UnitCell::a2) - .def("a3", (double (UnitCell::*)() const) & UnitCell::a3) - .def("alpha", (double (UnitCell::*)() const) & UnitCell::alpha) - .def("alpha1", (double (UnitCell::*)() const) & UnitCell::alpha1) - .def("alpha2", (double (UnitCell::*)() const) & UnitCell::alpha2) - .def("alpha3", (double (UnitCell::*)() const) & UnitCell::alpha3) - .def("alphastar", (double (UnitCell::*)() const) & UnitCell::alphastar) - .def("astar", (double (UnitCell::*)() const) & UnitCell::astar) - .def("b", (double (UnitCell::*)() const) & UnitCell::b) - .def("b1", (double (UnitCell::*)() const) & UnitCell::b1) - .def("b2", (double (UnitCell::*)() const) & UnitCell::b2) - .def("b3", (double (UnitCell::*)() const) & UnitCell::b3) - .def("beta", (double (UnitCell::*)() const) & UnitCell::beta) - .def("beta1", (double (UnitCell::*)() const) & UnitCell::beta1) - .def("beta2", (double (UnitCell::*)() const) & UnitCell::beta2) - .def("beta3", (double (UnitCell::*)() const) & UnitCell::beta3) - .def("betastar", (double (UnitCell::*)() const) & UnitCell::betastar) - .def("bstar", (double (UnitCell::*)() const) & UnitCell::bstar) - .def("c", (double (UnitCell::*)() const) & UnitCell::c) - .def("cstar", (double (UnitCell::*)() const) & UnitCell::cstar) + (arg("self"), arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), + arg("_beta"), arg("_gamma"), arg("Unit") = (int)(angDegrees)))) + .def("a", (double (UnitCell::*)() const) & UnitCell::a, arg("self")) + .def("a1", (double (UnitCell::*)() const) & UnitCell::a1, arg("self")) + .def("a2", (double (UnitCell::*)() const) & UnitCell::a2, arg("self")) + .def("a3", (double (UnitCell::*)() const) & UnitCell::a3, arg("self")) + .def("alpha", (double (UnitCell::*)() const) & UnitCell::alpha, + arg("self")) + .def("alpha1", (double (UnitCell::*)() const) & UnitCell::alpha1, + arg("self")) + .def("alpha2", (double (UnitCell::*)() const) & UnitCell::alpha2, + arg("self")) + .def("alpha3", (double (UnitCell::*)() const) & UnitCell::alpha3, + arg("self")) + .def("alphastar", (double (UnitCell::*)() const) & UnitCell::alphastar, + arg("self")) + .def("astar", (double (UnitCell::*)() const) & UnitCell::astar, + arg("self")) + .def("b", (double (UnitCell::*)() const) & UnitCell::b, arg("self")) + .def("b1", (double (UnitCell::*)() const) & UnitCell::b1, arg("self")) + .def("b2", (double (UnitCell::*)() const) & UnitCell::b2, arg("self")) + .def("b3", (double (UnitCell::*)() const) & UnitCell::b3, arg("self")) + .def("beta", (double (UnitCell::*)() const) & UnitCell::beta, arg("self")) + .def("beta1", (double (UnitCell::*)() const) & UnitCell::beta1, + arg("self")) + .def("beta2", (double (UnitCell::*)() const) & UnitCell::beta2, + arg("self")) + .def("beta3", (double (UnitCell::*)() const) & UnitCell::beta3, + arg("self")) + .def("betastar", (double (UnitCell::*)() const) & UnitCell::betastar, + arg("self")) + .def("bstar", (double (UnitCell::*)() const) & UnitCell::bstar, + arg("self")) + .def("c", (double (UnitCell::*)() const) & UnitCell::c, arg("self")) + .def("cstar", (double (UnitCell::*)() const) & UnitCell::cstar, + arg("self")) .def("d", (double (UnitCell::*)(double, double, double) const) & UnitCell::d, - (arg("h"), arg("k"), arg("l"))) + (arg("self"), arg("h"), arg("k"), arg("l"))) .def("d", (double (UnitCell::*)(const V3D &) const) & UnitCell::d, - (arg("hkl"))) + (arg("self"), arg("hkl"))) .def("dstar", (double (UnitCell::*)(double, double, double) const) & UnitCell::dstar, - (arg("h"), arg("k"), arg("l"))) - .def("errora", (double (UnitCell::*)() const) & UnitCell::errora) - .def("errorb", (double (UnitCell::*)() const) & UnitCell::errorb) - .def("errorc", (double (UnitCell::*)() const) & UnitCell::errorc) + (arg("self"), arg("h"), arg("k"), arg("l"))) + .def("errora", (double (UnitCell::*)() const) & UnitCell::errora, + arg("self")) + .def("errorb", (double (UnitCell::*)() const) & UnitCell::errorb, + arg("self")) + .def("errorc", (double (UnitCell::*)() const) & UnitCell::errorc, + arg("self")) .def("erroralpha", (double (UnitCell::*)(int const) const) & UnitCell::erroralpha, - (arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("Unit") = (int)(angDegrees))) .def("errorbeta", (double (UnitCell::*)(int const) const) & UnitCell::errorbeta, - (arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("Unit") = (int)(angDegrees))) .def("errorgamma", (double (UnitCell::*)(int const) const) & UnitCell::errorgamma, - (arg("Unit") = (int)(angDegrees))) - .def("gamma", (double (UnitCell::*)() const) & UnitCell::gamma) - .def("gammastar", (double (UnitCell::*)() const) & UnitCell::gammastar) + (arg("self"), arg("Unit") = (int)(angDegrees))) + .def("gamma", (double (UnitCell::*)() const) & UnitCell::gamma, + arg("self")) + .def("gammastar", (double (UnitCell::*)() const) & UnitCell::gammastar, + arg("self")) .def("recAngle", (double (UnitCell::*)(double, double, double, double, double, double, int const) const) & UnitCell::recAngle, - (arg("h1"), arg("k1"), arg("l1"), arg("h2"), arg("k2"), arg("l2"), - arg("Unit") = (int)(angDegrees))) - .def("recVolume", (double (UnitCell::*)() const) & UnitCell::recVolume) + (arg("self"), arg("h1"), arg("k1"), arg("l1"), arg("h2"), arg("k2"), + arg("l2"), arg("Unit") = (int)(angDegrees))) + .def("recVolume", (double (UnitCell::*)() const) & UnitCell::recVolume, + arg("self")) .def("set", (void (UnitCell::*)(double, double, double, double, double, double, int const)) & UnitCell::set, - (arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), arg("_beta"), - arg("_gamma"), arg("Unit") = (int)(angDegrees))) - .def("seta", (void (UnitCell::*)(double))(&UnitCell::seta), (arg("_a"))) + (arg("self"), arg("_a"), arg("_b"), arg("_c"), arg("_alpha"), + arg("_beta"), arg("_gamma"), arg("Unit") = (int)(angDegrees))) + .def("seta", (void (UnitCell::*)(double))(&UnitCell::seta), + (arg("self"), arg("_a"))) .def("setalpha", (void (UnitCell::*)(double, int const))(&UnitCell::setalpha), - (arg("_alpha"), arg("Unit") = (int)(angDegrees))) - .def("setb", (void (UnitCell::*)(double))(&UnitCell::setb), (arg("_b"))) + (arg("self"), arg("_alpha"), arg("Unit") = (int)(angDegrees))) + .def("setb", (void (UnitCell::*)(double))(&UnitCell::setb), + (arg("self"), arg("_b"))) .def("setbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setbeta), - (arg("_beta"), arg("Unit") = (int)(angDegrees))) - .def("setc", (void (UnitCell::*)(double))(&UnitCell::setc), (arg("_c"))) + (arg("self"), arg("_beta"), arg("Unit") = (int)(angDegrees))) + .def("setc", (void (UnitCell::*)(double))(&UnitCell::setc), + (arg("self"), arg("_c"))) .def("setgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setgamma), - (arg("_gamma"), arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("_gamma"), arg("Unit") = (int)(angDegrees))) .def("setError", (void (UnitCell::*)(double, double, double, double, double, double, int const)) & UnitCell::setError, - (arg("_aerr"), arg("_berr"), arg("_cerr"), arg("_alphaerr"), - arg("_betaerr"), arg("_gammaerr"), arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("_aerr"), arg("_berr"), arg("_cerr"), + arg("_alphaerr"), arg("_betaerr"), arg("_gammaerr"), + arg("Unit") = (int)(angDegrees))) .def("setErrora", (void (UnitCell::*)(double))(&UnitCell::setErrora), - (arg("_aerr"))) + (arg("self"), arg("_aerr"))) .def("setErroralpha", (void (UnitCell::*)(double, int const))(&UnitCell::setErroralpha), - (arg("_alphaerr"), arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("_alphaerr"), arg("Unit") = (int)(angDegrees))) .def("setErrorb", (void (UnitCell::*)(double))(&UnitCell::setErrorb), - (arg("_berr"))) + (arg("self"), arg("_berr"))) .def("setErrorbeta", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorbeta), - (arg("_betaerr"), arg("Unit") = (int)(angDegrees))) + (arg("self"), arg("_betaerr"), arg("Unit") = (int)(angDegrees))) .def("setErrorc", (void (UnitCell::*)(double))(&UnitCell::setErrorc), - (arg("_cerr"))) + (arg("self"), arg("_cerr"))) .def("setErrorgamma", (void (UnitCell::*)(double, int const))(&UnitCell::setErrorgamma), - (arg("_gammaerr"), arg("Unit") = (int)(angDegrees))) - .def("volume", (double (UnitCell::*)() const) & UnitCell::volume) - .def("getG", &UnitCell::getG, return_readonly_numpy()) - .def("getGstar", &UnitCell::getGstar, return_readonly_numpy()) - .def("getB", &UnitCell::getB, return_readonly_numpy()) - .def("recalculateFromGstar", &recalculateFromGstar); + (arg("self"), arg("_gammaerr"), arg("Unit") = (int)(angDegrees))) + .def("volume", (double (UnitCell::*)() const) & UnitCell::volume, + arg("self")) + .def("getG", &UnitCell::getG, arg("self"), return_readonly_numpy()) + .def("getGstar", &UnitCell::getGstar, arg("self"), + return_readonly_numpy()) + .def("getB", &UnitCell::getB, arg("self"), return_readonly_numpy()) + .def("recalculateFromGstar", &recalculateFromGstar, + (arg("self"), arg("NewGstar"))); scope().attr("deg2rad") = Mantid::Geometry::deg2rad; scope().attr("rad2deg") = Mantid::Geometry::rad2deg;