diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a12fe6..804b2f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,7 @@ if(AARE_FETCH_LMFIT) ) endif() + #Disable what we don't need from lmfit set(BUILD_TESTING OFF CACHE BOOL "") set(LMFIT_CPPTEST OFF CACHE BOOL "") diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 3630b29..560e831 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -5,6 +5,7 @@ package: + source: path: .. diff --git a/include/aare/ClusterFile.hpp b/include/aare/ClusterFile.hpp index 22f4183..bea9f48 100644 --- a/include/aare/ClusterFile.hpp +++ b/include/aare/ClusterFile.hpp @@ -10,6 +10,7 @@ namespace aare { + //TODO! Legacy enums, migrate to enum class typedef enum { cBottomLeft = 0, @@ -90,6 +91,8 @@ class ClusterFile { */ ClusterVector read_clusters(size_t n_clusters); + ClusterVector read_clusters(size_t n_clusters, ROI roi); + /** * @brief Read a single frame from the file and return the clusters. The * cluster vector will have the frame number set. @@ -146,5 +149,4 @@ Eta2 calculate_eta2(Cluster3x3 &cl); Eta2 calculate_eta2(Cluster2x2 &cl); - } // namespace aare diff --git a/pyproject.toml b/pyproject.toml index 0b6d2af..60128c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ version = "2025.4.1" + [tool.scikit-build] cmake.verbose = true diff --git a/python/src/cluster_file.hpp b/python/src/cluster_file.hpp index ff46043..b807712 100644 --- a/python/src/cluster_file.hpp +++ b/python/src/cluster_file.hpp @@ -31,6 +31,11 @@ void define_cluster_file_io_bindings(py::module &m) { auto v = new ClusterVector(self.read_clusters(n_clusters)); return v; },py::return_value_policy::take_ownership) + .def("read_clusters", + [](ClusterFile &self, size_t n_clusters, ROI roi) { + auto v = new ClusterVector(self.read_clusters(n_clusters, roi)); + return v; + },py::return_value_policy::take_ownership) .def("read_frame", [](ClusterFile &self) { auto v = new ClusterVector(self.read_frame()); diff --git a/src/ClusterFile.cpp b/src/ClusterFile.cpp index f4ef0ae..f77ac92 100644 --- a/src/ClusterFile.cpp +++ b/src/ClusterFile.cpp @@ -147,7 +147,6 @@ ClusterVector ClusterFile::read_clusters_without_cut(size_t n_clusters) } - ClusterVector ClusterFile::read_clusters_with_cut(size_t n_clusters) { ClusterVector clusters(3,3); clusters.reserve(n_clusters);