forgot to add jungfraucalibration
Build on RHEL9 / build (push) Successful in 2m35s
Build on RHEL8 / build (push) Successful in 3m8s
Run tests using data on local RHEL8 / build (push) Successful in 3m54s

This commit is contained in:
2026-07-01 14:38:10 +02:00
parent bb55b54a1f
commit ebf06e09e1
2 changed files with 48 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "aare/utils/SparseMask.hpp"
#include <pybind11/pybind11.h>
namespace py = pybind11;
using namespace aare;
void define_sparse_mask_bindings(py::module &m) {
py::class_<SparseMask>(m, "SparseMask")
.def(py::init<STORAGEFORMAT, size_t, size_t>(),
py::arg("storage_format"), py::arg("rows"), py::arg("cols"))
.def("insert", &SparseMask::insert, py::arg("row"), py::arg("col"))
.def("is_masked", &SparseMask::is_masked, py::arg("row"),
py::arg("col"));
}
+32
View File
@@ -0,0 +1,32 @@
#pragma once
#include <pybind11/pybind11.h>
// #include <pybind11/stl.h>
// #include <pybind11/stl_bind.h>
#include <vector>
namespace py = pybind11;
// TODO add index, itemize
template <typename Type>
void define_Vector(py::module &m, const std::string &type_str,
const std::string &format_string) {
auto class_name = "Vector_" + type_str;
py::class_<std::vector<Type>>(m, class_name.c_str(), py::buffer_protocol())
.def(py::init())
.def_buffer([&format_string](
std::vector<Type> &self) -> py::buffer_info {
return py::buffer_info(
self.data(), static_cast<py::ssize_t>(sizeof(Type)),
format_string, static_cast<py::ssize_t>(1),
std::vector<py::ssize_t>{static_cast<py::ssize_t>(self.size())},
std::vector<py::ssize_t>{
static_cast<py::ssize_t>(sizeof(Type))});
});
}
void define_Struct(py::module &m, )
// fmt::format("T{{{}:sum:i:index}}",py::format_descriptor<Type>::format())