Closed thjsal closed 4 months ago
I was thinking about this and while it deviates from the model prediction, perhaps the choice to truncate it (i.e., e.g.,5.99
and 5.01
both become 5
) was made since counts have to be whole numbers and shouldn't exceed what the model predicts
I wonder though why the detection could not exceed what the model predicts. If the model predicts 5.99 counts for a one phase-energy bin, I would still think that I would most likely observe 6 counts instead of 5 counts.
I realized this issue was a bit self made actually. The numbers are indeed already in integers if using the signal in which noise has been added. Only if saving the non-noisy data in the integer format (as Bas and I were testing), one should be careful in how the numbers are rounded. I added example of this as a commented line of code in the linked pull request.
Examples in
Modeling
tutorial and inexamples_fast
directory currently always round down the float values when saving the newly created synthetic data as integers in this line:To avoid systematic differences between the model and the synthetic data, it would be better to round the numbers here to the nearest integers using e.g.,
np.round(synthetic)
.