Skip to content

Commit d2c8c30

Browse files
committed
GIT: Merge branch 'development'
2 parents 65faa92 + 5a9dd4a commit d2c8c30

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pixel_clusterizer/clusterizer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,14 @@ def set_end_of_cluster_function(self, function):
255255
''' Adding function to module.
256256
This is maybe the only way to make the clusterizer to work with multiprocessing.
257257
'''
258+
self.cluster_functions._end_of_cluster_function = self._jitted(function)
258259
self._end_of_cluster_function = function
259260

260261
def set_end_of_event_function(self, function):
261262
''' Adding function to module.
262263
This is maybe the only way to make the clusterizer to work with multiprocessing.
263264
'''
265+
self.cluster_functions._end_of_event_function = self._jitted(function)
264266
self._end_of_event_function = function
265267

266268
def set_min_hit_charge(self, value):
@@ -304,10 +306,8 @@ def cluster_hits(self, hits, noisy_pixels=None, disabled_pixels=None):
304306
The noisy_pixels parameter allows for removing clusters that consist of a single noisy pixels. Clusters with 2 or more noisy pixels are not removed.
305307
The disabled_pixels parameter allows for ignoring pixels.
306308
'''
307-
# For multiprocessing make sure that the function are jitted after pickling.
308-
# In some cases, where the pixel_clusterizer module is installed into the
309-
# the site-packages folder, overriding the of cluster funtions immediately invokes
310-
# the JIT compiler and converts the function objects to a Numba ojects.
309+
# Jitting a second time to workaround different bahavior of the installation methods on different platforms (pip install vs. python setup.py).
310+
# In some circumstances, the Numba compiler can't compile functions that were pickled previously.
311311
self.cluster_functions._end_of_cluster_function = self._jitted(self._end_of_cluster_function)
312312
self.cluster_functions._end_of_event_function = self._jitted(self._end_of_event_function)
313313

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
from setuptools import setup, find_packages # This setup relies on setuptools since distutils is insufficient and badly hacked code
33

4-
version = '3.1.3'
4+
version = '3.1.4'
55
author = 'David-Leon Pohl, Jens Janssen'
66
77

0 commit comments

Comments
 (0)