Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Adding Feldman Cousins to gammapy.
Status: Done working on it, unless there are new comments / requests.
There was a previous pull request (#311), but I messed up that branch when trying to merge changes from the master. That's why I deleted that branch and recreated it.
…and then analytically to demonstrate that the numerical implementation works.
…bers from the FC paper. Extend coverage, while trying to cut down on the computation time. Rename functions to be more logical. Impove function documentation. Fix bugs in previously untested classes.
Also, if you have the patience to go though and remove the leading
For example this:
should be this
If you don't have time for such nitpicky stuff, just let me know and I'll just do it after merging this PR.
One more comment on documentation, and then I'm done with the review here.
It would be nice if you could add an example at the end of the function docstrings.
For the high-level docs page you've written, I also think it would be great to give at least one or two code examples directly on the page, with output. And for people like me that don't have the time to go read the FC paper, it would also be helpful to give some more absolute beginner info than "The first plot reproduces Fig. 7 from [Feldman1998](Poisson process with background 3.0).", i.e. something like: "Assume you have an observation corresponding to a Poisson process and observed 7 events and estimated a background of 3.0. Then using the FC method you can compute a confidence interval of (XXX, YYY) on the excess.".
… of some functions. Simplify function names. Some functions now raise ValueErrors in case of bad input. Expand the tests to increase coverage. Adjust variable names (removing trailing f). Improved function documentation. Expand documentation with code examples. Add example to gammapy.stats index page. Progress bar for the two analytical examples. Nicer print out for fc_demonstrate_artefact.py example.
Done working on the comments / requests.
Coverage is 99% now and cannot be improved, because the two missing lines should never be called actually (it's still good to check for zero division).
I expanded the documentation with code examples and improved the function documentation (linking to the high-level docs page).
@dlennarz – Thanks!!!
I'm not quite sure why this error occurs: