22 #include "pybind11/pybind11.h" 23 #include "pybind11/stl.h" 25 #include "numpy/arrayobject.h" 26 #include "ndarray/pybind11.h" 30 namespace py = pybind11;
39 template <
typename PixelT>
40 static void declareApplyLookupTable(py::module& mod) {
41 mod.def(
"applyLookupTable", &applyLookupTable<PixelT>,
"image"_a,
"table"_a,
"indOffset"_a);
47 py::module mod(
"applyLookupTable");
50 if (_import_array() < 0) {
51 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
55 declareApplyLookupTable<float>(mod);
56 declareApplyLookupTable<double>(mod);
PYBIND11_PLUGIN(applyLookupTable)
Remove all non-astronomical counts from the Chunk Exposure's pixels.