From d51f71d95095e50bc35e5468dda6db04fc031f21 Mon Sep 17 00:00:00 2001 From: hrosiak Date: Mon, 25 Nov 2019 19:26:16 +0100 Subject: [PATCH] py functions --- pymodule/pycatima.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pymodule/pycatima.cpp b/pymodule/pycatima.cpp index dac1b71..6ed1143 100644 --- a/pymodule/pycatima.cpp +++ b/pymodule/pycatima.cpp @@ -125,7 +125,7 @@ PYBIND11_MODULE(pycatima,m){ .def_readwrite("A",&Target::A) .def_readwrite("Z",&Target::Z) .def_readwrite("stn",&Target::stn); - + py::class_(m,"Material") .def(py::init<>(),"constructor") @@ -289,6 +289,8 @@ PYBIND11_MODULE(pycatima,m){ m.def("range",py::overload_cast(&range), "range",py::arg("projectile"), py::arg("material"), py::arg("config")=default_config); m.def("energy_out",py::overload_cast&, const Material&, const Config&>(&energy_out),"energy_out",py::arg("projectile"), py::arg("energy") ,py::arg("material"), py::arg("config")=default_config); m.def("energy_out",py::overload_cast(&energy_out),"energy_out",py::arg("projectile"), py::arg("material"), py::arg("config")=default_config); + m.def("lindhard",&bethek_lindhard); + m.def("lindhard_X",&bethek_lindhard_X); m.def("get_material",py::overload_cast(&get_material)); m.def("get_data",py::overload_cast(get_data),"list of data",py::arg("projectile"),py::arg("material"),py::arg("config")=default_config); m.def("w_magnification",[](Projectile& p, double energy, const Material& m, const Config& c){