SiLab-Bonn / beam_telescope_analysis

Beam Telescope Analysis (BTA) is a testbeam analysis software written in Python (and C++)
MIT License
4 stars 1 forks source link

Ability to specify disable mask for Noisy-Pixel-Masking #12

Closed YannickDieter closed 4 years ago

YannickDieter commented 4 years ago

BTA supports two kind of masks:

Upto now, only the NoisyPixelMask is used (created during hit_analysis.mask()). The DisabledMask is never used. This PR adds the ability to specify a disable mask in order to create the DisabledPixelMask.

This feature is necessary for detectors which tend to have broken columns/row (e.g. Mimosa26). The example below shows a hit map of DURANTA plane 2 with a few broken rows. When applying the standard noisy pixel masking (thr = 2, iterations = 1) it does not catch all broken pixels. This can be solved by increasing the number of iterations (iterations = 5) with the drawback of having much more noisy pixels. The corresponding cluster size distributions look strange (peaks e.g. at CS12 and CS24). This is due to the fact that only single hit clusters consisting of a noisy pixels are set as bad leading to these strange cluster size distributions in case of many adjacent noisy pixels.

With the new feature, a disable mask can be passed to hit_analysis.mask() which creates the corresponding DisabledPixelMask. During clustering, all clusters involving a disabled pixel (or more) are set as bad leading to a clean cluster size distribution.

Example plots: standard_masking_thr_2_it_1.zip standard_masking_thr_2_it_5.zip with_disable_mask.zip

YannickDieter commented 4 years ago

@laborleben Fine for you?