Closed fzeiser closed 5 years ago
Comment by fzeiser Friday Jul 26, 2019 at 13:34 GMT
Even when one cuts the matrices the same way, there was a difference in the "areas": They seemed to be wrong in "jørgen" implementation. When I changed to multiplicity_estimation="total"
, the difference for the number of counts disappears. -
Comment by fzeiser Friday Jul 26, 2019 at 15:39 GMT
When proceeding with multiplicity_estimation="total"
it seems like following matrices are the same in iteration 0:
Other comments
[some time] I think I found the devil :hankey:! Check these line: https://github.com/oslocyclotronlab/ompy/blob/169190e6de657ff7ee45500f4069c393d8421511/ompy/firstgeneration.py#L116-L117
vs
If I include the reshape
in firstgeneration.py
everything seems to work quite smoothly. You can then get the difference between the two matrices. Let's plot it here when it's all fixes (need to include the fill_negatives
before the comparison is meaningful).
A quick diff (but implemented several things hacky !!) looks like this :+1: (so there are probably some more differences, if you only change the last line with the rebining things)
As I did several changes I'll just upload the two files I used, in case we want to trace back the differences. Most apparent changes are just print/plot statements. (as txt due to upload requirements)
Issue by fzeiser Friday Jul 26, 2019 at 13:13 GMT Originally opened as https://github.com/oslocyclotronlab/ompy/issues/27
As described in the commit message, there is a bug in the FG method in 169190e6de657ff7ee45500f4069c393d8421511.
We have seen that the normalization matrices are different to what they were in the method implemented before. A part of this could be here:
https://github.com/oslocyclotronlab/ompy/blob/169190e6de657ff7ee45500f4069c393d8421511/ompy/firstgeneration.py#L70-L71
This is not exactly the same as https://github.com/oslocyclotronlab/ompy/blob/169190e6de657ff7ee45500f4069c393d8421511/ompy/first_generation_method.py#L87-L93
due to lower bin vs bin center calibration. Don't know which one we want here though! Erlends solutions seems to make sense to me!