-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify pixel log-likelihood. #1403
Simplify pixel log-likelihood. #1403
Conversation
* simplify the log-likelihood analytically * discard constants and factors which are not needed in minimization
Yes, just use this function in the muon code |
Reference was already there, so use correct link and remove reference section in this docstring.
Could you also apply the same treatment to the other functions and then use the right one in the muon code? |
yes |
* Due to likelihoods returning floats not arrays, calculate numeric and approximation, then sum both
@nbiederbeck Tests are failing due to an import error. Somewhere, probably it still imports one of the older names. There is also a merge conflict now |
* change names * use numpy arrays * use sum, because we calculate telescope-likelihood not pixel-likelihood
Codecov Report
@@ Coverage Diff @@
## master #1403 +/- ##
==========================================
+ Coverage 90.90% 91.27% +0.37%
==========================================
Files 184 184
Lines 12882 12861 -21
==========================================
+ Hits 11710 11739 +29
+ Misses 1172 1122 -50
Continue to review full report at Codecov.
|
* also black fixes that were somehow skipped earlier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coverage.io mentions a few lines that are not tested in any unit test (see the warnings in the code view), but once those are fixed, I think this is ok.
in the attempt to work on #1272:
but now the function
ctapipe.image.pixel_likelihood.poisson_likelihood_gaussian
is basically the same asctapipe.image.muon.intensity_fitter.negative_log_likelihood
in #1390 and duplicate code is not good.Maybe do smth like
ctapipe.image.pixel_likelihood.negative_log_likelihood
and use this in the Muon and ImPACT fitting?