8#include <boost/python/class.hpp>
9#include <boost/python/suite/indexing/map_indexing_suite.hpp>
15double deprecatedSignature(
const std::string &src,
const std::string &dest,
const double srcValue,
const double l1,
16 const double l2,
const double theta,
const DeltaEMode::Type emode,
const double efixed) {
17 PyErr_Warn(PyExc_DeprecationWarning,
".run(src, dest, srcValue, l1, l2, theta, emode, efixed) is deprecated. "
18 "Use .run(src, dest, srcValue, l1, emode, params) instead.");
24 using newStringVersion = double (*)(
const std::string &,
const std::string &,
const double,
const double,
27 class_<std::unordered_map<Mantid::Kernel::UnitParams, double>>(
"UnitParametersMap")
28 .def(map_indexing_suite<std::unordered_map<Mantid::Kernel::UnitParams, double>>());
30 class_<UnitConversion, boost::noncopyable>(
"UnitConversion", no_init)
32 (arg(
"src"), arg(
"dest"), arg(
"srcValue"), arg(
"l1"), arg(
"l2"), arg(
"theta"), arg(
"emode"), arg(
"efixed")),
33 "Performs a unit conversion on a single value (deprecated).")
35 (arg(
"src"), arg(
"dest"), arg(
"srcValue"), arg(
"l1"), arg(
"emode"), arg(
"params")),
36 "Performs a unit conversion on a single value.")
double deprecatedSignature(const std::string &src, const std::string &dest, const double srcValue, const double l1, const double l2, const double theta, const DeltaEMode::Type emode, const double efixed)
void export_UnitConversion()
A set of static helper methods to perform conversions between units.
static double run(const std::string &src, const std::string &dest, const double srcValue, const double l1, const double l2, const double theta, const DeltaEMode::Type emode, const double efixed)
Convert a single value between the given units (as strings)
std::unordered_map< UnitParams, double > UnitParametersMap
Defines the possible energy transfer modes:
Type
Define the available energy transfer modes It is important to assign enums proper numbers,...