mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-07-20 07:12:51 +02:00
added sparse mask python bindings
This commit is contained in:
@@ -38,6 +38,9 @@ class SparseMask {
|
||||
|
||||
void write_to_file(const std::filesystem::path &filename) const;
|
||||
|
||||
/// @brief Get number of bad channels
|
||||
size_t num_bad_channels() const;
|
||||
|
||||
private:
|
||||
/// @brief stoarge format of the sparse mask, either row major or column
|
||||
/// major
|
||||
|
||||
@@ -54,3 +54,5 @@ from ._aare import (
|
||||
PixelHistogram_u32,
|
||||
PixelHistogram_u64,
|
||||
)
|
||||
|
||||
from ._aare import SparseMask
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "bind_PixelMap.hpp"
|
||||
#include "bind_RawFile.hpp"
|
||||
#include "bind_calibration.hpp"
|
||||
#include "utils/bind_SparseMask.hpp"
|
||||
|
||||
// TODO! migrate the other names
|
||||
#include "ctb_raw_file.hpp"
|
||||
@@ -73,6 +74,7 @@ PYBIND11_MODULE(_aare, m) {
|
||||
define_fit_bindings(m);
|
||||
define_interpolation_bindings(m);
|
||||
define_jungfrau_data_file_io_bindings(m);
|
||||
define_sparse_mask_bindings(m);
|
||||
|
||||
bind_calibration(m);
|
||||
|
||||
|
||||
@@ -61,4 +61,6 @@ bool SparseMask::is_masked(const size_t row, const size_t col) const {
|
||||
}
|
||||
}
|
||||
|
||||
size_t SparseMask::num_bad_channels() const { return innerindices_.size(); }
|
||||
|
||||
} // namespace aare
|
||||
Reference in New Issue
Block a user