mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-20 23:38:42 +01:00
WIP
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "aare/ClusterFinder.hpp"
|
#include "aare/ClusterFinder.hpp"
|
||||||
#include "aare/NDArray.hpp"
|
#include "aare/NDArray.hpp"
|
||||||
|
#include "aare/logger.hpp"
|
||||||
#include "aare/ProducerConsumerQueue.hpp"
|
#include "aare/ProducerConsumerQueue.hpp"
|
||||||
|
|
||||||
namespace aare {
|
namespace aare {
|
||||||
@@ -123,6 +124,12 @@ class ClusterFinderMT {
|
|||||||
size_t capacity = 2000, size_t n_threads = 3)
|
size_t capacity = 2000, size_t n_threads = 3)
|
||||||
: m_n_threads(n_threads) {
|
: m_n_threads(n_threads) {
|
||||||
|
|
||||||
|
LOG(logDEBUG1) << "ClusterFinderMT: "
|
||||||
|
<< "image_size: " << image_size[0] << "x" << image_size[1]
|
||||||
|
<< ", nSigma: " << nSigma
|
||||||
|
<< ", capacity: " << capacity
|
||||||
|
<< ", n_threads: " << n_threads;
|
||||||
|
|
||||||
for (size_t i = 0; i < n_threads; i++) {
|
for (size_t i = 0; i < n_threads; i++) {
|
||||||
m_cluster_finders.push_back(
|
m_cluster_finders.push_back(
|
||||||
std::make_unique<
|
std::make_unique<
|
||||||
|
|||||||
@@ -71,4 +71,14 @@ def ClusterFileSink(clusterfindermt, cluster_file, dtype=np.int32):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
cls = _get_class("ClusterFileSink", clusterfindermt.cluster_size, dtype)
|
cls = _get_class("ClusterFileSink", clusterfindermt.cluster_size, dtype)
|
||||||
return cls(clusterfindermt, cluster_file)
|
return cls(clusterfindermt, cluster_file)
|
||||||
|
|
||||||
|
|
||||||
|
def ClusterFile(fname, cluster_size=(3,3), dtype=np.int32):
|
||||||
|
"""
|
||||||
|
Factory function to create a ClusterFile object. Provides a cleaner syntax for
|
||||||
|
the templated ClusterFile in C++.
|
||||||
|
"""
|
||||||
|
|
||||||
|
cls = _get_class("ClusterFile", cluster_size, dtype)
|
||||||
|
return cls(fname)
|
||||||
|
|||||||
@@ -5,13 +5,12 @@ from . import _aare
|
|||||||
from ._aare import File, RawMasterFile, RawSubFile, JungfrauDataFile
|
from ._aare import File, RawMasterFile, RawSubFile, JungfrauDataFile
|
||||||
from ._aare import Pedestal_d, Pedestal_f, ClusterFinder_Cluster3x3i, VarClusterFinder
|
from ._aare import Pedestal_d, Pedestal_f, ClusterFinder_Cluster3x3i, VarClusterFinder
|
||||||
from ._aare import DetectorType
|
from ._aare import DetectorType
|
||||||
from ._aare import ClusterFile_Cluster3x3i as ClusterFile
|
|
||||||
from ._aare import hitmap
|
from ._aare import hitmap
|
||||||
from ._aare import ROI
|
from ._aare import ROI
|
||||||
|
|
||||||
# from ._aare import ClusterFinderMT, ClusterCollector, ClusterFileSink, ClusterVector_i
|
# from ._aare import ClusterFinderMT, ClusterCollector, ClusterFileSink, ClusterVector_i
|
||||||
|
|
||||||
from .ClusterFinder import ClusterFinder, ClusterCollector, ClusterFinderMT, ClusterFileSink
|
from .ClusterFinder import ClusterFinder, ClusterCollector, ClusterFinderMT, ClusterFileSink, ClusterFile
|
||||||
from .ClusterVector import ClusterVector
|
from .ClusterVector import ClusterVector
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user