pisa icon indicating copy to clipboard operation
pisa copied to clipboard

Ratio in map comparison fails if reference hist has zero nominal values and is not a bare numpy array

Open thehrh opened this issue 6 years ago • 1 comments

Setting np.errstate in https://github.com/jllanfranchi/pisa/blob/dev/pisa/core/map.py#L521 doesn't help when hist is an uncertainties.unumpy.uarray (I think this has been an open issue for a long time: https://github.com/lebigot/uncertainties/issues/12). This can be fixed by applying set_errors(None) to the reference map before the division is performed.

thehrh avatar Mar 21 '18 13:03 thehrh

This is actually not sufficient, since np.errstate only effective when both maps that are compared have no uncertainties defined (in the case of a zero in the reference map).

thehrh avatar Apr 20 '18 16:04 thehrh