{"id":15912272,"url":"https://github.com/cdeil/root_poisson_stats","last_synced_at":"2025-10-24T01:10:41.204Z","repository":{"id":6269584,"uuid":"7503007","full_name":"cdeil/root_poisson_stats","owner":"cdeil","description":"TRolke and TFeldmanCousins from ROOT extracted as standalone C++ project","archived":false,"fork":false,"pushed_at":"2013-01-08T14:40:43.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T02:31:41.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdeil.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-08T14:40:08.000Z","updated_at":"2015-10-21T09:34:03.000Z","dependencies_parsed_at":"2022-09-12T20:50:40.711Z","dependency_job_id":null,"html_url":"https://github.com/cdeil/root_poisson_stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cdeil/root_poisson_stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Froot_poisson_stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Froot_poisson_stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Froot_poisson_stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Froot_poisson_stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdeil","download_url":"https://codeload.github.com/cdeil/root_poisson_stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdeil%2Froot_poisson_stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272192669,"owners_count":24889452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T16:03:43.923Z","updated_at":"2025-10-24T01:10:41.141Z","avatar_url":"https://github.com/cdeil.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"root_poisson_stats\n==================\n\nIntroduction\n------------\n\nThis is a standalone version of ROOT TRolke and TFeldmanCousins.\n\nIt is simply C++, independent of ROOT.\n\nIt will be useful for gammalib and maybe also astropy.\n\nImplementation\n--------------\n\nTFeldmanCousins and TRolke don't use a lot other ROOT functions.\nThe ones that are needed are in TMath, see the notes there for details.\nI made a lot of trivial code changes like not deriving from TObject, not using TString or TOption,\nand replacing Double_t -\u003e double, Int_t -\u003e int, TMath::Sqrt -\u003e sqrt from cmath, ...\n\nRe-writing this in Cython would be quite an effort, it's 3000 lines of complicated math code:\n$ wc -l *.h *.cxx\n     115 SpecFuncCephes.h\n     114 TFeldmanCousins.h\n      12 TMath.h\n     193 TRolke.h\n     982 SpecFuncCephes.cxx\n     231 TFeldmanCousins.cxx\n     331 TMath.cxx\n    1448 TRolke.cxx\n    3426 total\n\nThere's one special function which is not in the C / C++ math library: the incomplete gamma function.\nHere I bundle the version from ROOT, which is the one from the Cephes library.\nNote that this is not available in numpy, but scipy does include it, also the Cephes library version:\nhttp://docs.scipy.org/doc/scipy/reference/generated/scipy.special.gammainc.html\nscipy/scipy/special/generate_ufuncs.py:gammainc -- igam: dd-\u003ed -- cephes.h\n\n\nTests\n-----\n\n- The binaries Rolke and FeldmanCousins run the examples from the ROOT tutorial and print the same output.\nRunning diff on this output wrt. the ROOT tutorial is the first test that it basically works.\n\nsource /opt/local/bin/thisroot.sh\n\n./Rolke \u003e Rolke.txt\nroot -b -q /opt/local/share/root/tutorials/math/Rolke.C \u003e Rolke_ROOT.txt\ndiff Rolke_ROOT.txt Rolke.txt\n\n./FeldmanCousins \u003e FeldmanCousins.txt\nroot -b -q /opt/local/share/root/tutorials/math/FeldmanCousins.C \u003e FeldmanCousins_ROOT.txt\ndiff FeldmanCousins_ROOT.txt FeldmanCousins.txt\n\n- Test against ROOT like this from Python\nimport ROOT\n# You need to enter this once to make ROOT load it, otherwise it won't tab-complete!\nROOT.TFeldmanCousins\nROOT.TRolke\nROOT.Math\nROOT.TMath\n\nTODO\n----\n\n- ROOT is GPL, astropy needs BSD.\n  I'm not sure what license TFeldmanCousins and TRolke are, the TRolke 2.0 paper (http://inspirehep.net/record/826147) mentions MIT license, which would be OK.\n  Ask if re-licensing possible?\n  If this doesn't pan out, rewrite in Cython using description\n  in the original papers and only cross-check against ROOT implementations.\n\n- Change cout / cerr error messages to C++ / Python exceptions?\n\n- create a Python wrapper using SWIG and / or Cython.\n\n- Add unit tests\n\n- Add benchmark\n\n- Pull request for gammalib and astropy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeil%2Froot_poisson_stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdeil%2Froot_poisson_stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdeil%2Froot_poisson_stats/lists"}