mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-17 17:57:13 +02:00
added back chunk_size in python (#199)
When refactoring the dispatch of the python binding for ClusterFile I forgot chunk_size. Adding it back in. Excluded from release notes since the bug was introduced after the last release and now fixed before the next release. 1. added back chunk_size 2. removed a few commented out lines closes #197
This commit is contained in:
@ -1,16 +1,8 @@
|
|||||||
|
|
||||||
# from ._aare import ClusterFinder_Cluster3x3i, ClusterFinder_Cluster2x2i, ClusterFinderMT_Cluster3x3i, ClusterFinderMT_Cluster2x2i, ClusterCollector_Cluster3x3i, ClusterCollector_Cluster2x2i
|
|
||||||
|
|
||||||
|
|
||||||
# from ._aare import ClusterFileSink_Cluster3x3i, ClusterFileSink_Cluster2x2i
|
|
||||||
|
|
||||||
from . import _aare
|
from . import _aare
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
_supported_cluster_sizes = [(2,2), (3,3), (5,5), (7,7), (9,9),]
|
_supported_cluster_sizes = [(2,2), (3,3), (5,5), (7,7), (9,9),]
|
||||||
|
|
||||||
# def _get_class()
|
|
||||||
|
|
||||||
def _type_to_char(dtype):
|
def _type_to_char(dtype):
|
||||||
if dtype == np.int32:
|
if dtype == np.int32:
|
||||||
return 'i'
|
return 'i'
|
||||||
@ -74,11 +66,11 @@ def ClusterFileSink(clusterfindermt, cluster_file, dtype=np.int32):
|
|||||||
return cls(clusterfindermt, cluster_file)
|
return cls(clusterfindermt, cluster_file)
|
||||||
|
|
||||||
|
|
||||||
def ClusterFile(fname, cluster_size=(3,3), dtype=np.int32):
|
def ClusterFile(fname, cluster_size=(3,3), dtype=np.int32, chunk_size = 1000):
|
||||||
"""
|
"""
|
||||||
Factory function to create a ClusterFile object. Provides a cleaner syntax for
|
Factory function to create a ClusterFile object. Provides a cleaner syntax for
|
||||||
the templated ClusterFile in C++.
|
the templated ClusterFile in C++.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cls = _get_class("ClusterFile", cluster_size, dtype)
|
cls = _get_class("ClusterFile", cluster_size, dtype)
|
||||||
return cls(fname)
|
return cls(fname, chunk_size=chunk_size)
|
||||||
|
Reference in New Issue
Block a user