jorgenem / beta_oslo_unfolding

Testing of beta-oslo unfolding things
0 stars 1 forks source link

Bug the response matrix, at least lowest channel #3

Open fzeiser opened 6 years ago

fzeiser commented 6 years ago

There is a bug/inconsistency in reading the response matrix. If the bin energies are defined by E_resp_array, then for sun the lowest bin has 10.5 keV. Fromresp.dat` you find that the FE efficiency is 1 here. However, there are no counts in the first row of the matrix. So where are the FE counts?

https://github.com/jorgenem/beta_oslo_unfolding/blob/b3bf4deefe501bd8b1ca3eacb62121d1136d0582/4d_reponse_matrix_generation-grid.py#L7-L24

fzeiser commented 6 years ago

I think there is a further bug in the code. Cause bins with no counts in the effect (no observed gamma's) should receive a 0 in the response, non a nan

; It should be

for i in range(R_2D.shape[0]):
    norm = R_2D[i,:].sum()
    if(norm>0):
        R_2D[i,:] = R_2D[i,:] / (norm)
    else:
        R_2D[i,:] = 0

instead of https://github.com/jorgenem/beta_oslo_unfolding/blob/b3bf4deefe501bd8b1ca3eacb62121d1136d0582/4d_reponse_matrix_generation-grid.py#L15-L20