diff options
author | Stan Seibert <stan@mtrr.org> | 2011-10-13 14:41:05 -0400 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | 598c0145f8d5950c8572e8fd3f9df26188a8c7bb (patch) | |
tree | 42b9c2622db6f5cc4ec1166a6656da0ef52639ed | |
parent | 8c5ea6510c339c6719d037e9b66f7134a493428f (diff) | |
download | chroma-598c0145f8d5950c8572e8fd3f9df26188a8c7bb.tar.gz chroma-598c0145f8d5950c8572e8fd3f9df26188a8c7bb.tar.bz2 chroma-598c0145f8d5950c8572e8fd3f9df26188a8c7bb.zip |
Clean up hit probability calculation and stop skipping the first entry.
-rw-r--r-- | chroma/likelihood.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chroma/likelihood.py b/chroma/likelihood.py index d5e3f5d..cbd6187 100644 --- a/chroma/likelihood.py +++ b/chroma/likelihood.py @@ -79,10 +79,8 @@ class Likelihood(object): # NLL calculation: note that negation is at the end # Start with the probabilties of hitting (or not) the channels - hit_channel_prob = np.log(hit_prob[self.event.channels.hit]).sum() + np.log(1.0-hit_prob[~self.event.channels.hit])[1:].sum() - hit_channel_prob_uncert = ( (ntotal * hit_prob * (1.0 - hit_prob)) / hit_prob**2 ).sum()**0.5 + hit_channel_prob = np.log(hit_prob[self.event.channels.hit]).sum() + np.log(1.0-hit_prob[~self.event.channels.hit]).sum() log_likelihood = ufloat((hit_channel_prob, 0.0)) - #log_likelihood = ufloat((0.0,0.0)) # FIXME: skipping hit/not hit probabilities for now # Then include the probability densities of the observed # charges and times. |