BXA icon indicating copy to clipboard operation
BXA copied to clipboard

an error in gof.py

Open ellot opened this issue 3 years ago • 4 comments

I use BXA in pyxspec. In some cases, there are nan values in lowmodel_parts. So the assert error is reported in line 85 of gof.py. I find some values of kplusones equal 0 (line 78, 79).

ellot avatar Feb 07 '21 08:02 ellot

Hmm, doesn't that mean data was <0 somewhere? Are you using binning on non-count data somehow?

JohannesBuchner avatar Feb 07 '21 20:02 JohannesBuchner

Yes, in few cases, the net counts (subtracting background) is <0.

ellot avatar Feb 08 '21 16:02 ellot

That code (binning function) is only supposed to be run on count data, not subtracted data.

JohannesBuchner avatar Feb 08 '21 16:02 JohannesBuchner

Probably the exception should be raised earlier, in the binning function.

JohannesBuchner avatar Feb 08 '21 16:02 JohannesBuchner