mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-15 00:37:13 +02:00
Feature/reactivate python bindings (#74)
major changes: - add python bindings for all c++ features except network_io - changes to cross compile on windows,linux and macos - fix bugs with cluster_finder - use Dtype in Frame instead of bitdepth - remove boost::program_options and replace with our implementation - add Transforms class that applies a sequence of functions (c++ or python functions) on a Frame. - remove frame reorder and flip from SubFile.cpp. use Transforms instead - Test clusterFinder and Pedestal results in comparison with slsDetectorCalibration --------- Co-authored-by: Bechir <bechir.brahem420@gmail.com> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
@ -15,7 +15,7 @@ int main() {
|
||||
logger::info("RAW file");
|
||||
logger::info("file rows:", file.rows(), "cols:", file.cols());
|
||||
logger::info(file.total_frames());
|
||||
Frame frame(0, 0, 0);
|
||||
Frame frame(0, 0, Dtype::NONE);
|
||||
for (auto i = 0; i < 10000; i++) {
|
||||
if (file.frame_number(i) == 23389) {
|
||||
logger::info("frame_number:", file.frame_number(i));
|
||||
@ -41,18 +41,18 @@ int main() {
|
||||
logger::info("Pedestal mean:", p.mean(0, 0), "std:", p.standard_deviation(0, 0));
|
||||
logger::info("Pedestal mean:", p.mean(200, 200), "std:", p.standard_deviation(200, 200));
|
||||
FileConfig cfg;
|
||||
cfg.dtype = DType(typeid(double));
|
||||
cfg.dtype = Dtype(typeid(double));
|
||||
cfg.rows = p.rows();
|
||||
cfg.cols = p.cols();
|
||||
|
||||
NumpyFile np_pedestal("/home/l_bechir/tmp/testNewFW20230714/pedestal.npy", "w", cfg);
|
||||
cfg.dtype = DType(typeid(uint16_t));
|
||||
cfg.dtype = Dtype(typeid(uint16_t));
|
||||
NumpyFile np_frame("/home/l_bechir/tmp/testNewFW20230714/frame.npy", "w", cfg);
|
||||
|
||||
np_pedestal.write(p.mean());
|
||||
np_frame.write(frame.view<uint16_t>());
|
||||
|
||||
auto clusters = clusterFinder.find_clusters(frame.view<uint16_t>(), p);
|
||||
auto clusters = clusterFinder.find_clusters_without_threshold(frame.view<uint16_t>(), p);
|
||||
logger::info("nclusters:", clusters.size());
|
||||
|
||||
// aare::logger::info("nclusters:", clusters.size());
|
||||
|
Reference in New Issue
Block a user