pyEudetAnalysis/pyEudetAnalysis — pull request #9 by sredford (2014-08-07 20:50:02+00:00)
Title: Fixed quite a serious bug in FilterHotPixel.

This code is tricky because of 'scaler'. In the additions to hitmap this is handled correctly,
by only adding "1/scaler" of an event each time. However, nevent is incremented by 1 every time.
It should only be imcremented by 1/scaler, otherwise when you divide by it to get the frequencies,
you're dividing by too much.

So the hot pixel threshold was potentially 15 times smaller than what we thought it was.

On a related note, FilterHotPixel must run over a large number of events to work.
For example, if the threshold is 0.001, that means if a pixel fires in more than 1 in 1000 events,
it's 'hot'. So if FilterHotPixel is only run on 1000 events, every hit pixel will be 'hot'.
In my experience, the larger the number of events used, the smaller the number of hot pixels.

Therefore I set nevents in FilterHotPixel to be -1. I think this is the safest way to do it.