Closed laborleben closed 7 years ago
Was the speed change tested with Mimosa26 data?
Using threaded clusterizer (8 cores, 6x MIMOSA, 2x FEI4) the speed is the same if not marginally faster. Memory footprint is ~100MB less.
The test was without masking and/or disabling pixels while clustering.
Ran also pyBAR unit tests and all test were OK.
Compared the cluster files of some larger test beam runs an they are the same before and after changing the code.
Why is HitClusterizer.get_hit_cluster() and HitClusterizer.get_cluster() necessary?
To my mind I can merge, anything else you want to push to this branch?
Let me optimize the pixel mask check.
Why is HitClusterizer.get_hit_cluster() and HitClusterizer.get_cluster() necessary?
In the past the cluster hit array was not always created/returned. I guess now these methods are not needed anymore and can be deleted.
All the changes are done, tests and examples fully working. The code needs a review.
Some open questions and comments:
clusterizer.cluster_hits()
is called. I don't see any increase of the runtime, and the array size does not need to be adjusted anymore. All is done!
Can you deactivate python 3.4 unit tests? If anaconda cannot provide working libraries for this version, lets just skip this version, no?
I changed the code but the main loop is still the same, though. The following points were changed/added:
HitClusterizer
parameters can be set during creation.HitClusterizer.create_cluster_hit_info_array()
since it does nothing.min_hit_charge
parameter for correction factor during calculation of charge weighted hit center.noisy_pixels
parameter to prevent cluster building (single hit) from noisy pixel.disabled_pixels
parameter to ignore hits from given pixels completely.The performance decrease is ~5% but memory usage is less because the new code avoids the temporary arrays.
The new code is more flexible when certain changes are needed.