pyFAI icon indicating copy to clipboard operation
pyFAI copied to clipboard

Empty bin in sigma-clipping when using Poisson error

Open kif opened this issue 3 years ago • 1 comments

This is likely a bug

kif avatar Mar 10 '22 12:03 kif

This is apparently UN-avoidable with Bragg-peaks:

import numpy
ensemble = numpy.ones(1<<10)
ensemble[0] =1e6
mean =ensemble.mean() 
print(mean, ensemble.std())
>>> 977.5615234375 31234.706249089617
sigma = numpy.sqrt(ensemble.sum()/len(ensemble))
print(sigma)
>>> 31.26598028908577
(1e6-mean)/sigma, (1-mean)/sigma
>>>(31952.3785673625, -31.23399664453812)

kif avatar Mar 11 '22 09:03 kif