snoplusuk / echidna

MIT License
4 stars 12 forks source link

Incorrect value for `Spectra._num_decays` for multi_ntuple_spectrum #46

Closed ashleyrback closed 9 years ago

ashleyrback commented 9 years ago

When appending to existing spectrum, _num_decays is not updated. I added the following to the start of my limit setting code:

    print "sum:", Te130_0n2b.sum()
    print "raw_events:", Te130_0n2b._raw_events
    print "num_decays:", Te130_0n2b._num_decays

I know that from all ~20 ntuples I combined, there were 200034 events (then multiplied by 10 to give 10 years), so the output of the above should be:

sum: <2000340
raw_events: 2000340
num_decays: 2000340

Instead what I get is:

sum: 1688010.0
raw_events: 0
num_decays: 10002

The sum seems a little lower than I would have thought for T_1/2 = 6.2e24. The main problem is that raw_events is zero and num_decays is far too small, probably just the first ntuple that was read in. If we are appending to an existing spectrum, these values need to be updated.

ashleyrback commented 9 years ago

I might have a look at this evening if I get a chance.

ashleyrback commented 9 years ago

@jwaterfield I was just checking this while creating some more HDF5s for Xe136 spectra, we did put in a fix for this but didn't close the issue, see #44, specifically this line.

I think it is ok to close this issue, do you agree?

jwaterfield commented 9 years ago

Yep as long as its been checked

On Wed, Jun 17, 2015 at 5:41 PM, ashleyrback notifications@github.com wrote:

@jwaterfield https://github.com/jwaterfield I was just checking this while creating some more HDF5s for Xe136 spectra, we did put in a fix for this but didn't close the issue, see #44 https://github.com/snoplusuk/echidna/pull/44, specifically this line https://github.com/snoplusuk/echidna/pull/44/files#diff-81f4f63e2743fa6be5ad8fe0b73845f0R231.

I think it is ok to close this issue, do you agree?

— Reply to this email directly or view it on GitHub https://github.com/snoplusuk/echidna/issues/46#issuecomment-112872133.