{ "info": { "author": "Simon Wehle", "author_email": "simon.wehle@desy.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python" ], "description": "PyrooFit\n========\n\nPyrooFit is a fit framework for python and pandas DataFrames on top of the ROOT.RooFit package.\n\nThe package allows for simple fits of standard PDFs and easy setup of custom PDFs in one or more fit dimensions.\n\nExample\n-------\n\nSimple fit and plot of a Gaussian Distribution:\n\n```python\nfrom pyroofit.models import Gauss\nimport numpy as np\n\ndata = np.random.normal(0, 1, 1000)\n\npdf = Gauss(('x', -3, 3), mean=(-1, 0, 1))\npdf.fit(data)\npdf.plot('example_gauss.pdf',)\n\npdf.get()\n\n```\n\nA more complex example on combination of Gauss pdf for signal and Polynomial for background:\n\n```python\nfrom pyroofit.models import Gauss, Chebychev\nimport numpy as np\nimport pandas as pd\nimport ROOT\n\n\n\ndf = {'mass': np.append(np.random.random_sample(1000)*10 + 745, np.random.normal(750, 1, 1000))}\ndf = pd.DataFrame(df)\n\nx = ROOT.RooRealVar('mass', 'M', 750, 745, 755, 'GeV') # or x = ('mass', 745, 755)\n\npdf_sig = Gauss(x, mean=(745, 755), sigma=(0.1, 1, 2), title=\"Signal\")\npdf_bkg = Chebychev(x, n=1, title=\"Background\")\n\npdf = pdf_sig + pdf_bkg\n\npdf.fit(df)\npdf.plot('example_sig_bkg.pdf', legend=True)\npdf.get()\n\n```\n\n\n\nObservables can be initialised by a list or tuple with the column name / variable name as first argument, followed\nby the range and/or with the initial value and range:\n```\nx = ('x', -3, 3)\nx = ('mass', -3, 0.02, 3)\n```\n\nParameters are initialised with a tuple: `sigma=(0,1)` \nor again including a starting parameter: `sigma=(0.01, 0, 1)`\nThe order here is not important.\n\nAll parameters and observables can also be initialised by a `ROOT.RooRealVar`.\n\nInstallation\n============\n\nDependencies: ROOT (with PyRoot enabled)\n\n\n* Download this repository\n\n* (recommended) Use or install anaconda python environment\n\n* Activate ROOT installation with python support\n\n* run ``python setup.py install`` in this folder\n\n* run ``python setup.py docs`` to create the documentation\n\nIf you do not have your own python installation you can use:\n```\npython setup.py install --user\nPATH=$PATH~/.local/bin\n```\nIf there are still missing packages you might need to install them via \n`pip install package --user`.\n\n\n\nPlanned Features\n================\n\n- Improve documentation\n- Save and load PDF as yaml \n- Plotting in matpltotlib", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.desy.de/~swehle/pyroofit", "keywords": "", "license": "mit", "maintainer": "", "maintainer_email": "", "name": "pyroofit", "package_url": "https://pypi.org/project/pyroofit/", "platform": "any", "project_url": "https://pypi.org/project/pyroofit/", "project_urls": { "Homepage": "http://www.desy.de/~swehle/pyroofit" }, "release_url": "https://pypi.org/project/pyroofit/0.9.4/", "requires_dist": null, "requires_python": "", "summary": "Python wrapper for RooFit to create fits easily with pandas DataFrames.", "version": "0.9.4" }, "last_serial": 4287955, "releases": { "0.9.3": [ { "comment_text": "", "digests": { "md5": "64bb560c71680310e2451d57809c4393", "sha256": "a31a314e3401366fcd5353466e647027a643b78f51eb1f3615a7c48f0fa69fc7" }, "downloads": -1, "filename": "pyroofit-0.9.3a.tar.gz", "has_sig": false, "md5_digest": "64bb560c71680310e2451d57809c4393", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29965, "upload_time": "2018-09-06T11:31:48", "url": "https://files.pythonhosted.org/packages/f1/10/232179238e39c0f8fb22c933decd0f8e9e95cbb61ac0479c5c112d90b837/pyroofit-0.9.3a.tar.gz" } ], "0.9.4": [ { "comment_text": "", "digests": { "md5": "1700fde2d794c5532f0dd06894671f93", "sha256": "598034231579f600c8d45ec815fd5c23e16975c8e2f3acaebae01b4f6491345d" }, "downloads": -1, "filename": "pyroofit-0.9.4.tar.gz", "has_sig": false, "md5_digest": "1700fde2d794c5532f0dd06894671f93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29999, "upload_time": "2018-09-19T10:30:19", "url": "https://files.pythonhosted.org/packages/dd/bf/15c0974bcdf4f08161dc7d03f539554ff9165d4522c2ec8499fff6475da3/pyroofit-0.9.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1700fde2d794c5532f0dd06894671f93", "sha256": "598034231579f600c8d45ec815fd5c23e16975c8e2f3acaebae01b4f6491345d" }, "downloads": -1, "filename": "pyroofit-0.9.4.tar.gz", "has_sig": false, "md5_digest": "1700fde2d794c5532f0dd06894671f93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29999, "upload_time": "2018-09-19T10:30:19", "url": "https://files.pythonhosted.org/packages/dd/bf/15c0974bcdf4f08161dc7d03f539554ff9165d4522c2ec8499fff6475da3/pyroofit-0.9.4.tar.gz" } ] }