From 4a3df52fbe7bafc320b6b4d9386f128fc31f15ee Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Fri, 20 Jul 2018 14:40:28 +0200 Subject: [PATCH] Adding more docs, readme, and new data package --- MANIFEST.in | 2 +- README.md | 120 +++++++ decaylanguage/{goofit.py => __main__.py} | 9 +- .../MintDalitzSpecialParticles.csv | 0 decaylanguage/data/__init__.py | 16 + .../mass_width_2008.csv} | 0 decaylanguage/data/pdgID_to_latex.txt | 338 ++++++++++++++++++ decaylanguage/decay/__init__.py | 4 + decaylanguage/decay/ampgen2goofit.py | 6 +- decaylanguage/decay/amplitudechain.py | 13 +- decaylanguage/particle/particle.py | 23 +- decaylanguage/particle/pdgID_to_latex.txt | 337 ----------------- setup.py | 11 +- 13 files changed, 516 insertions(+), 363 deletions(-) create mode 100644 README.md rename decaylanguage/{goofit.py => __main__.py} (59%) rename decaylanguage/{particle => data}/MintDalitzSpecialParticles.csv (100%) create mode 100644 decaylanguage/data/__init__.py rename decaylanguage/{particle/mass_width.csv => data/mass_width_2008.csv} (100%) create mode 100644 decaylanguage/data/pdgID_to_latex.txt delete mode 100644 decaylanguage/particle/pdgID_to_latex.txt diff --git a/MANIFEST.in b/MANIFEST.in index 6b439424..ba9fc15d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,7 +15,7 @@ include AUTHORS.rst include CHANGELOG.rst include CONTRIBUTING.rst include LICENSE -include README.rst +include README.md include Pipfile include tox.ini .travis.yml .appveyor.yml diff --git a/README.md b/README.md new file mode 100644 index 00000000..81937f34 --- /dev/null +++ b/README.md @@ -0,0 +1,120 @@ +[![DecayLanguage](images/DecayLanguage.png)](http://decaylanaguage.readthedocs.io/en/latest/) + +[![Documentation Status](https://readthedocs.org/projects/decaylanguage/badge/?style=flat)](https://readthedocs.org/projects/decaylanguage) +[![Travis-CI Build Status](https://travis-ci.org/henryiii/decaylanguage.svg?branch=master)](https://travis-ci.org/henryiii/decaylanguage) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/henryiii/decaylanguage?branch=master&svg=true)](https://ci.appveyor.com/project/HenrySchreiner/decaylanguage) +[![Coverage Status](https://coveralls.io/repos/henryiii/decaylanguage/badge.svg?branch=master&service=github)](https://coveralls.io/github/henryiii/decaylanguage) +[![PyPI Package latest release](https://img.shields.io/pypi/v/decaylanguage.svg)](https://pypi.python.org/pypi/decaylanguage) +[![Supported versions](https://img.shields.io/pypi/pyversions/decaylanguage.svg)](https://pypi.python.org/pypi/decaylanguage) +[![Commits since latest release](https://img.shields.io/github/commits-since/henryiii/decaylanguage/v0.1.0.svg)](https://github.com/henryiii/decaylanguage/compare/v0.1.0...master) + +A language to describe particle decays, and tools to work with them. + +# Installation + +Just run the following: + +```bash +pip install decaylanguage +``` + +You can use a virtual environment through pipenv or with `--user` if you know +what those are. [Python 2.7 and 3.4+](http://docs.python-guide.org/en/latest/starting/installation) are supported. + +
Dependencies: (click to expand)

+ +Required and compatibility dependencies will be automatically installed by pip. + +### Required dependencies: + +- [Numpy](https://scipy.org/install.html): The numerical library for Python +- [pandas](https://pandas.pydata.org/): Tabular data in Python +- [attrs](https://github.com/python-attrs/attrs): DataClasses for Python +- [plumbum](https://github.com/tomerfiliba/plumbum): Command line tools + +### Python compatibility: +- [six](https://github.com/benjaminp/six): Compatibility library +- [pathlib2](https://github.com/mcmtroffaes/pathlib2) backport if using Python 2.7 +- [enum34](https://bitbucket.org/stoneleaf/enum34) backport if using Python /< 3.5 +- [importlib_resources](http://importlib-resources.readthedocs.io/en/latest/) backport if using Python /< 3.7 + + +### Recommended dependencies: +- [graphviz](https://gitlab.com/graphviz/graphviz/) to render (DOT + language) graph descriptions of decay chains. +

+ + +# Usage + +This is a quick user guide; for full API docs, go [here](https://decaylanguage.readthedocs.io/en/latest/). + +DecayLanguage is a set of tools for building and transforming particle +decays. The parts are: + +## Particles + +You can use a variety of methods to get particles; if you know the PDG +number you can get a particle directly, or you can use a search: + +```python +Particle.from_pdgid(211) +Particle.from_search_list(name='pi')[0] +``` + +You can search for the properties, which are `name`, `mass`, `width`, +`charge`, `A`, `rank`, `I`, `J`, `G`, `P`, `quarks`, `status`, `latex`, +`mass_upper`, `mass_lower`, `width_upper`, and `width_lower` (some of +those don\'t make sense). You can also use `from_search` to require only +one match. + +Once you have a particle, any of the properties can be accessed, along +with several methods. Though they are not real properties, you can +access `bar`, `radius`, and `spin_type`. You can also `invert()` a +particle. There are lots of printing choices, `describe()`, +`programmatic_name()`, `html_name()`, html printing outs in notebooks, +and of course `repr` and `str` support. + +## Decays + +The most common way to create a decay chain is to read in an [AmpGen] +style syntax from a file or a string. You can use: + +```python +from decaylanguage.decay import AmplitudeChain +lines, parameters, constants, states = AmplitudeChain.read_AmpGen(text=''' +EventType D0 K- pi+ pi+ pi- + +D0[D]{K*(892)bar0{K-,pi+},rho(770)0{pi+,pi-}} 0 1 0.1 0 1 0.1 + +K(1460)bar-_mass 0 1460 1 +K(1460)bar-_width 0 250 1 + +a(1)(1260)+::Spline::Min 0.18412 +a(1)(1260)+::Spline::Max 1.86869 +a(1)(1260)+::Spline::N 34 +''') +``` + +Here, `lines` will be a list of AmplitudeChain lines (pretty print supported in Jupyter notebooks), +`parameters` will be a table of parameters (ranged parameters not yet supported), +`constants` will be a table of constants, +and `states` will be the list of known states (EventType). + +## Converters + +You can output to a format (currently only [GooFit] supported, feel free +to make a PR to add more). Use a subclass of DecayChain, in this case, +GooFitChain. To use the [GooFit] output, type from the shell: + +```bash +python -m decaylanguage.decay -G goofit myinput.opts +``` + +# Acknowledgements + +DecayLanguage is free software released under a BSD 3-Clause License. +It was originally developed by Henry Schreiner. + +[AmpGen]: https://gitlab.cern.ch/lhcb/Gauss/tree/LHCBGAUSS-1058.AmpGenDev/Gen/AmpGen +[GooFit]: https://GooFit.github.io diff --git a/decaylanguage/goofit.py b/decaylanguage/__main__.py similarity index 59% rename from decaylanguage/goofit.py rename to decaylanguage/__main__.py index 0af589f5..a8b81da7 100755 --- a/decaylanguage/goofit.py +++ b/decaylanguage/__main__.py @@ -10,13 +10,16 @@ from decaylanguage.decay.ampgen2goofit import ampgen2goofit -class AmpGen2GooFit(cli.Application): +class DecayLanguageDecay(cli.Application): + generator = cli.SwitchAttr('-G,--generator', cli.Set('goofit')) + def main(self, filename): - ampgen2goofit(filename) + if self.generator == 'goofit': + ampgen2goofit(filename) def main(): - AmpGen2GooFit.run() + DecayLanguageDecay.run() if __name__ == "__main__": diff --git a/decaylanguage/particle/MintDalitzSpecialParticles.csv b/decaylanguage/data/MintDalitzSpecialParticles.csv similarity index 100% rename from decaylanguage/particle/MintDalitzSpecialParticles.csv rename to decaylanguage/data/MintDalitzSpecialParticles.csv diff --git a/decaylanguage/data/__init__.py b/decaylanguage/data/__init__.py new file mode 100644 index 00000000..29362afe --- /dev/null +++ b/decaylanguage/data/__init__.py @@ -0,0 +1,16 @@ +try: + from importlib.resources import open_text +except ImportError: + from importlib_resources import open_text + + +def get_mass_width(): + return open_text('decaylanguage.data', 'mass_width_2008.csv') + + +def get_special(): + return open_text('decaylanguage.data', 'MintDalitzSpecialParticles.csv') + + +def get_latex(): + return open_text('decaylanguage.data', 'pdgID_to_latex.txt') diff --git a/decaylanguage/particle/mass_width.csv b/decaylanguage/data/mass_width_2008.csv similarity index 100% rename from decaylanguage/particle/mass_width.csv rename to decaylanguage/data/mass_width_2008.csv diff --git a/decaylanguage/data/pdgID_to_latex.txt b/decaylanguage/data/pdgID_to_latex.txt new file mode 100644 index 00000000..151b618c --- /dev/null +++ b/decaylanguage/data/pdgID_to_latex.txt @@ -0,0 +1,338 @@ +pdgid,particle,antiparticle +1,d,d +2,u,u +3,s,s +4,c,c +5,\mathrm{b},\mathrm{b} +6,t,t +11,e^-,e^+ +13,\mu^-,\mu^+ +15,\tau^-,\tau^+ +22,\gamma,\gamma +23,Z^{0},Z^{0} +24,W^{+},W^{-} +111,\pi^{0},\pi^{0} +113,\rho(770)^{0},\rho(770)^{0} +115,\mathrm{a}_{2}(1320)^{0},\mathrm{a}_{2}(1320)^{0} +117,\rho_3(1690)^{0},\rho_3(1690)^{0} +119,\mathrm{a}_4(2040)^{0},\mathrm{a}_4(2040)^{0} +130,\mathrm{K}_L^{0},\mathrm{K}_L^{0} +211,\pi^{+},\pi^{-} +213,\rho(770)^{+},\rho(770)^{-} +215,\mathrm{a}_{2}(1320)^{+},\mathrm{a}_{2}(1320)^{-} +217,\rho_3(1690)^{+},\rho_3(1690)^{-} +219,\mathrm{a}_4(2040)^{+},\mathrm{a}_4(2040)^{-} +221,\eta,\eta +223,\omega(782),\omega(782) +225,\mathrm{f}_{2}(1270),\mathrm{f}_{2}(1270) +227,\omega_3(1670),\omega_3(1670) +229,\mathrm{f}_4(2050),\mathrm{f}_4(2050) +310,\mathrm{K}_S^{0},\mathrm{K}_S^{0} +311,\mathrm{K}^{0},\mathrm{K}^{0} +313,\mathrm{K}^{*}(892)^{0},\mathrm{K}^{*}(892)^{0} +315,\mathrm{K}_{2}^{*}(1430)^{0},\mathrm{K}_{2}^{*}(1430)^{0} +317,\mathrm{K}_3^{*}(1780)^{0},\mathrm{K}_3^{*}(1780)^{0} +319,\mathrm{K}_4^{*}(2045)^{0},\mathrm{K}_4^{*}(2045)^{0} +321,\mathrm{K}^{+},\mathrm{K}^{-} +323,\mathrm{K}^{*}(892)^{+},\mathrm{K}^{*}(892)^{-} +325,\mathrm{K}_{2}^{*}(1430)^{+},\mathrm{K}_{2}^{*}(1430)^{-} +327,\mathrm{K}_3^{*}(1780)^{+},\mathrm{K}_3^{*}(1780)^{-} +329,\mathrm{K}_4^{*}(2045)^{+},\mathrm{K}_4^{*}(2045)^{-} +331,\eta^\prime(958),\eta^\prime(958) +333,\phi(1020),\phi(1020) +335,\mathrm{f}_{2}^\prime(1525),\mathrm{f}_{2}^\prime(1525) +337,\phi_3(1850),\phi_3(1850) +411,D^{+},D^{-} +413,D^{*}(2010)^{+},D^{*}(2010)^{-} +415,D_{2}^{*}(2460)^{+},D_{2}^{*}(2460)^{-} +421,D^{0},D^{0} +423,D^{*}(2007)^{0},D^{*}(2007)^{0} +425,D_{2}^{*}(2460)^{0},D_{2}^{*}(2460)^{0} +431,D_s^{+},D_s^{-} +433,D_s^{*+},D_s^{*-} +435,D_{s2}^{*+},D_{s2}^{*-} +441,\eta_c(1S),\eta_c(1S) +443,J/\psi(1S),J/\psi(1S) +445,\chi_{c2}(1P),\chi_{c2}(1P) +511,B^{0},B^{0} +513,B^{*0},B^{*0} +515,B_{2}^{*0},B_{2}^{*0} +521,B^{+},B^{-} +523,B^{*+},B^{*-} +525,B_{2}^{*+},B_{2}^{*-} +531,B_s^{0},B_s^{0} +533,B_s^{*0},B_s^{*0} +535,B_{s2}^{*0},B_{s2}^{*0} +541,B_c^{+},B_c^{-} +551,\eta_\mathrm{b}(1S),\eta_\mathrm{b}(1S) +553,\Upsilon(1S),\Upsilon(1S) +555,\chi_{\mathrm{b}2}(1P),\chi_{\mathrm{b}2}(1P) +1112,\Delta(1620)^-,\Delta(1620)^+ +1114,\Delta^-,\Delta^+ +1116,\Delta(1905)^-,\Delta(1905)^+ +1118,\Delta(1950)^-,\Delta(1950)^+ +1212,\Delta(1620)^{+},\Delta(1620)^{+} +1214,N(1520)^{0},N(1520)^{0} +1216,\Delta(1905)^{0},\Delta(1905)^{0} +1218,N(2190)^{0},N(2190)^{0} +2112,\Delta(1620)^{0},\Delta(1620)^{0} +2114,\Delta^{0},\Delta^{0} +2116,N(1675)^{0},N(1675)^{0} +2118,\Delta(1950)^{0},\Delta(1950)^{0} +2124,N(1520)^{+},N(1520)^{-} +2126,\Delta(1905)^{+},\Delta(1905)^{-} +2128,N(2190)^{+},N(2190)^{-} +2212,p,p +2214,\Delta^{+},\Delta^{-} +2216,N(1675)^{+},N(1675)^{-} +2218,\Delta(1950)^{+},\Delta(1950)^{-} +2222,\Delta(1620)^{++},\Delta(1620)^{--} +2224,\Delta^{++},\Delta^{--} +2226,\Delta(1905)^{++},\Delta(1905)^{--} +2228,\Delta(1950)^{++},\Delta(1950)^{--} +3112,\Sigma^-,\Sigma^+ +3114,\Sigma^{*-}/\Sigma(1385)^-,\Sigma^{*+}/\Sigma(1385)^+ +3116,\Sigma(1775)^-,\Sigma(1775)^+ +3122,\Lam\mathrm{b}da,\Lam\mathrm{b}da +3124,\Lam\mathrm{b}da(1520),\Lam\mathrm{b}da(1520) +3126,\Lam\mathrm{b}da(1820),\Lam\mathrm{b}da(1820) +3128,\Lam\mathrm{b}da(2100),\Lam\mathrm{b}da(2100) +3212,\Sigma^{0},\Sigma^{0} +3214,\Sigma^{*0}/\Sigma(1385)^{0},\Sigma^{*0}/\Sigma(1385)^{0} +3216,\Sigma(1775)^{0},\Sigma(1775)^{0} +3222,\Sigma^{+},\Sigma^{-} +3224,\Sigma^{*+}/\Sigma(1385)^{+},\Sigma^{*-}/\Sigma(1385)^{-} +3226,\Sigma(1775)^{+},\Sigma(1775)^{-} +3312,\Xi^-,\Xi^+ +3314,\Xi^{*-}/\Xi(1530)^-,\Xi^{*+}/\Xi(1530)^+ +3322,\Xi^{0},\Xi^{0} +3324,\Xi^{*0}/\Xi(1530)^{0},\Xi^{*0}/\Xi(1530)^{0} +3334,\Omega^-,\Omega^+ +4112,\Sigma_c^{0},\Sigma_c^{0} +4114,\Sigma_c^{*0},\Sigma_c^{*0} +4122,\Lam\mathrm{b}da_c^{+},\Lam\mathrm{b}da_c^{-} +4132,\Xi_c^{0},\Xi_c^{0} +4212,\Sigma_c^{+},\Sigma_c^{-} +4214,\Sigma_c^{*+},\Sigma_c^{*-} +4222,\Sigma_c^{++},\Sigma_c^{--} +4224,\Sigma_c^{*++},\Sigma_c^{*--} +4232,\Xi_c^{+},\Xi_c^{-} +4312,\Xi_c^{\prime 0},\Xi_c^{\prime 0} +4314,\Xi_c^{*0},\Xi_c^{*0} +4322,\Xi_c^{\prime +},\Xi_c^{\prime -} +4324,\Xi_c^{*+},\Xi_c^{*-} +4332,\Omega_c^{0},\Omega_c^{0} +4334,\Omega_c^{*0},\Omega_c^{*0} +4412,\Xi_{cc}^{+},\Xi_{cc}^{-} +4422,\Xi_{cc}^{++},\Xi_{cc}^{--} +5112,\Sigma_\mathrm{b}^-,\Sigma_\mathrm{b}^+ +5114,\Sigma_\mathrm{b}^{*-},\Sigma_\mathrm{b}^{*+} +5122,\Lam\mathrm{b}da_b^{0},\Lam\mathrm{b}da_b^{0} +5132,\Xi_\mathrm{b}^-,\Xi_\mathrm{b}^- +5212,\Sigma_\mathrm{b}^{0},\Sigma_\mathrm{b}^{0} +5214,\Sigma_\mathrm{b}^{*0},\Sigma_\mathrm{b}^{*0} +5222,\Sigma_\mathrm{b}^{+},\Sigma_\mathrm{b}^{-} +5224,\Sigma_\mathrm{b}^{*+},\Sigma_\mathrm{b}^{*-} +5232,\Xi_\mathrm{b}^{0},\Xi_\mathrm{b}^{0} +9981,0^{+},0^{+} +9983,1^{+},1^{+} +9985,2^{+},2^{+} +9986,2^{-},2^{-} +9991,0^{-},0^{-} +9993,1^{-},1^{-} +10111,\mathrm{a}_{0}(1450)^{0},\mathrm{a}_{0}(1450)^{0} +10113,\mathrm{b}_{1}(1235)^{0},\mathrm{b}_{1}(1235)^{0} +10115,\pi_{2}(1670)^{0},\pi_{2}(1670)^{0} +10211,\mathrm{a}_{0}(1450)^{+},\mathrm{a}_{0}(1450)^{-} +10213,\mathrm{b}_{1}(1235)^{+},\mathrm{b}_{1}(1235)^{-} +10215,\pi_{2}(1670)^{+},\pi_{2}(1670)^{-} +10223,h_{1}(1170),h_{1}(1170) +10225,\eta_{2}(1645),\eta_{2}(1645) +10311,\mathrm{K}_{0}^{*}(1430)^{0},\mathrm{K}_{0}^{*}(1430)^{0} +10313,\mathrm{K}_{1}(1270)^{0},\mathrm{K}_{1}(1270)^{0} +10315,\mathrm{K}_{2}(1770)^{0},\mathrm{K}_{2}(1770)^{0} +10321,\mathrm{K}_{0}^{*}(1430)^{+},\mathrm{K}_{0}^{*}(1430)^{-} +10323,\mathrm{K}_{1}(1270)^{+},\mathrm{K}_{1}(1270)^{-} +10325,\mathrm{K}_{2}(1770)^{+},\mathrm{K}_{2}(1770)^{-} +10331,\mathrm{f}_{0}(1710),\mathrm{f}_{0}(1710) +10333,h_{1}(1380)/h_1^\prime,h_{1}(1380)/h_1^\prime +10335,\eta_{2}(1870),\eta_{2}(1870) +10411,D_{0}^{*}(2400)^{+},D_{0}^{*}(2400)^{-} +10413,D_{1}(2420)/D_1^{+}(L)^{+},D_{1}(2420)/D_1^{-}(L)^{-} +10421,D_{0}^{*}(2400)^{0},D_{0}^{*}(2400)^{0} +10423,D_{1}(2420)/D_1^{0}(L)^{0},D_{1}(2420)/D_1^{0}(L)^{0} +10431,D_{s0}^{*+},D_{s0}^{*-} +10433,D_{s1}(2536)/D_{s1}^{+}(L)^{+},D_{s1}(2536)/D_{s1}^{-}(L)^{-} +10441,\chi_{c0}(1P),\chi_{c0}(1P) +10443,h_c(1P),h_c(1P) +10551,\chi_{\mathrm{b}0}(1P),\chi_{\mathrm{b}0}(1P) +11114,\Delta(1700)^-,\Delta(1700)^+ +12112,N(1440)^{0},N(1440)^{0} +12114,\Delta(1700)^{0},\Delta(1700)^{0} +12116,N(1680)^{0},N(1680)^{0} +12212,N(1440)^{+},N(1440)^{-} +12214,\Delta(1700)^{+},\Delta(1700)^{-} +12216,N(1680)^{+},N(1680)^{-} +12224,\Delta(1700)^{++},\Delta(1700)^{--} +13112,\Sigma(1660)^-,\Sigma(1660)^+ +13114,\Sigma(1670)^-,\Sigma(1670)^+ +13116,\Sigma(1915)^-,\Sigma(1915)^+ +13122,\Lam\mathrm{b}da(1404),\Lam\mathrm{b}da(1404) +13124,\Lam\mathrm{b}da(1690),\Lam\mathrm{b}da(1690) +13126,\Lam\mathrm{b}da(1830),\Lam\mathrm{b}da(1830) +13212,\Sigma(1660)^{0},\Sigma(1660)^{0} +13214,\Sigma(1670)^{0},\Sigma(1670)^{0} +13216,\Sigma(1915)^{0},\Sigma(1915)^{0} +13222,\Sigma(1660)^{+},\Sigma(1660)^{-} +13224,\Sigma(1670)^{+},\Sigma(1670)^{-} +13226,\Sigma(1915)^{+},\Sigma(1915)^{-} +14122,\Lam\mathrm{b}da_c(2593),\Lam\mathrm{b}da_c(2593) +20113,\mathrm{a}_{1}(1260)^{0},\mathrm{a}_{1}(1260)^{0} +20213,\mathrm{a}_{1}(1260)^{+},\mathrm{a}_{1}(1260)^{-} +20223,\mathrm{f}_{1}(1285),\mathrm{f}_{1}(1285) +20313,\mathrm{K}_{1}(1400)^{0},\mathrm{K}_{1}(1400)^{0} +20315,\mathrm{K}_{2}(1820)^{0},\mathrm{K}_{2}(1820)^{0} +20323,\mathrm{K}_{1}(1400)^{+},\mathrm{K}_{1}(1400)^{-} +20325,\mathrm{K}_{2}(1820)^{+},\mathrm{K}_{2}(1820)^{-} +20333,\mathrm{f}_{1}(1420)/f_1^\prime,\mathrm{f}_{1}(1420)/f_1^\prime +20423,D_{1}(2430)^{0},D_{1}(2430)^{0} +20433,D_{s1}(H)/D_{s1}^{*+}^{+},D_{s1}(H)/D_{s1}^{*-}^{-} +20443,\chi_{c1}(1P),\chi_{c1}(1P) +20553,\chi_{\mathrm{b}1}(1P),\chi_{\mathrm{b}1}(1P) +21112,\Delta(1910)^-,\Delta(1910)^+ +21212,\Delta(1910)^{+},\Delta(1910)^{+} +21214,N(1700)^{0},N(1700)^{0} +22112,\Delta(1910)^{0},\Delta(1910)^{0} +22124,N(1700)^{+},N(1700)^{-} +22212,N(1535)^{+},N(1535)^{-} +22222,\Delta(1910)^{++},\Delta(1910)^{--} +23112,\Sigma(1750)^-,\Sigma(1750)^+ +23114,\Sigma(1940)^-,\Sigma(1940)^+ +23122,\Lam\mathrm{b}da(1600),\Lam\mathrm{b}da(1600) +23124,\Lam\mathrm{b}da(1890),\Lam\mathrm{b}da(1890) +23126,\Lam\mathrm{b}da(2110),\Lam\mathrm{b}da(2110) +23212,\Sigma(1750)^{0},\Sigma(1750)^{0} +23214,\Sigma(1940)^{0},\Sigma(1940)^{0} +23222,\Sigma(1750)^{+},\Sigma(1750)^{-} +23224,\Sigma(1940)^{+},\Sigma(1940)^{-} +30113,\rho(1700)^{0},\rho(1700)^{0} +30213,\rho(1700)^{+},\rho(1700)^{-} +30221,\mathrm{f}_{0}(1370)/f_0^\prime,\mathrm{f}_{0}(1370)/f_0^\prime +30223,\omega(1650),\omega(1650) +30313,\mathrm{K}^{*}(1680)^{0},\mathrm{K}^{*}(1680)^{0} +30323,\mathrm{K}^{*}(1680)^{+},\mathrm{K}^{*}(1680)^{-} +30443,\psi(3770),\psi(3770) +31114,\Delta(1600)^-,\Delta(1600)^+ +31214,N(1720)^{0},N(1720)^{0} +32112,N(1650)^{0},N(1650)^{0} +32114,\Delta(1600)^{0},\Delta(1600)^{0} +32124,N(1720)^{+},N(1720)^{-} +32212,N(1650)^{+},N(1650)^{-} +32214,\Delta(1600)^{+},\Delta(1600)^{-} +32224,\Delta(1600)^{++},\Delta(1600)^{--} +33122,\Lam\mathrm{b}da(1670),\Lam\mathrm{b}da(1670) +42112,N(1710)^{0},N(1710)^{0} +42212,N(1710)^{+},N(1710)^{-} +43122,\Lam\mathrm{b}da(1800),\Lam\mathrm{b}da(1800) +53122,\Lam\mathrm{b}da(1810),\Lam\mathrm{b}da(1810) +100111,\pi(1300)^{0},\pi(1300)^{0} +100113,\rho(1450)^{0},\rho(1450)^{0} +100115,\mathrm{a}_{2}(1700)^{0},\mathrm{a}_{2}(1700)^{0} +100211,\pi(1300)^{+},\pi(1300)^{-} +100213,\rho(1450)^{+},\rho(1450)^{-} +100215,\mathrm{a}_{2}(1700)^{+},\mathrm{a}_{2}(1700)^{-} +100221,\eta(1295),\eta(1295) +100223,\omega(1420),\omega(1420) +100311,\mathrm{K}(1460)^{0},\mathrm{K}(1460)^{0} +100313,\mathrm{K}^{*}(1410)^{0},\mathrm{K}^{*}(1410)^{0} +100315,\mathrm{K}_{2}^{*}(1980)^{0},\mathrm{K}_{2}^{*}(1980)^{0} +100321,\mathrm{K}(1460)^{+},\mathrm{K}(1460)^{-} +100323,\mathrm{K}^{*}(1410)^{+},\mathrm{K}^{*}(1410)^{-} +100325,\mathrm{K}_{2}^{*}(1980)^{+},\mathrm{K}_{2}^{*}(1980)^{-} +100331,\eta(1475),\eta(1475) +100333,\phi(1680),\phi(1680) +100441,\eta_c(2S),\eta_c(2S) +100443,\psi(2S)/\psi^\prime,\psi(2S)/\psi^\prime +100445,\chi_{c2}(2P),\chi_{c2}(2P) +100553,\Upsilon(2S)/\Upsilon^\prime,\Upsilon(2S)/\Upsilon^\prime +100555,\chi_{\mathrm{b}2}(2P),\chi_{\mathrm{b}2}(2P) +110551,\chi_{\mathrm{b}0}(2P),\chi_{\mathrm{b}0}(2P) +120553,\chi_{\mathrm{b}1}(2P),\chi_{\mathrm{b}1}(2P) +200553,\Upsilon(3S),\Upsilon(3S) +300553,\Upsilon(4S),\Upsilon(4S) +9000111,\mathrm{a}_{0}(980)^{0},\mathrm{a}_{0}(980)^{0} +9000113,\pi_{1}(1400)^{0},\pi_{1}(1400)^{0} +9000115,\pi_{2}(2100)^{0},\pi_{2}(2100)^{0} +9000117,\rho_3(1990)^{0},\rho_3(1990)^{0} +9000211,\mathrm{a}_{0}(980)^{+},\mathrm{a}_{0}(980)^{-} +9000213,\pi_{1}(1400)^{+},\pi_{1}(1400)^{-} +9000215,\pi_{2}(2100)^{+},\pi_{2}(2100)^{-} +9000217,\rho_3(1990)^{+},\rho_3(1990)^{-} +9000221,\mathrm{f}_{0}(600),\mathrm{f}_{0}(600) +9000223,\mathrm{f}_{1}(1510),\mathrm{f}_{1}(1510) +9000225,\mathrm{f}_{2}(1430),\mathrm{f}_{2}(1430) +9000229,\mathrm{f}_J(2220),\mathrm{f}_J(2220) +9000311,\mathrm{K}_{0}^{*}(800)^{0},\mathrm{K}_{0}^{*}(800)^{0} +9000313,\mathrm{K}_{1}(1650)^{0},\mathrm{K}_{1}(1650)^{0} +9000315,\mathrm{K}_{2}(1580)^{0},\mathrm{K}_{2}(1580)^{0} +9000319,\mathrm{K}_4(2500)^{0},\mathrm{K}_4(2500)^{0} +9000321,\mathrm{K}_{0}^{*}(800)^{+},\mathrm{K}_{0}^{*}(800)^{-} +9000323,\mathrm{K}_{1}(1650)^{+},\mathrm{K}_{1}(1650)^{-} +9000325,\mathrm{K}_{2}(1580)^{+},\mathrm{K}_{2}(1580)^{-} +9000329,\mathrm{K}_4(2500)^{+},\mathrm{K}_4(2500)^{-} +9000443,\psi(4040),\psi(4040) +9000553,\Upsilon(10860),\Upsilon(10860) +9010111,\pi(1800)^{0},\pi(1800)^{0} +9010113,\pi_{1}(1600)^{0},\pi_{1}(1600)^{0} +9010117,\rho_3(2250)^{0},\rho_3(2250)^{0} +9010211,\pi(1800)^{+},\pi(1800)^{-} +9010213,\pi_{1}(1600)^{+},\pi_{1}(1600)^{-} +9010217,\rho_3(2250)^{+},\rho_3(2250)^{-} +9010221,\mathrm{f}_{0}(980),\mathrm{f}_{0}(980) +9010223,h_{1}(1595),h_{1}(1595) +9010225,\mathrm{f}_{2}(1565),\mathrm{f}_{2}(1565) +9010229,\mathrm{f}_4(2300),\mathrm{f}_4(2300) +9010311,\mathrm{K}(1830)^{0},\mathrm{K}(1830)^{0} +9010315,\mathrm{K}_{2}(2250)^{0},\mathrm{K}_{2}(2250)^{0} +9010317,\mathrm{K}_3(2320)^{0},\mathrm{K}_3(2320)^{0} +9010321,\mathrm{K}(1830)^{+},\mathrm{K}(1830)^{-} +9010325,\mathrm{K}_{2}(2250)^{+},\mathrm{K}_{2}(2250)^{-} +9010327,\mathrm{K}_3(2320)^{+},\mathrm{K}_3(2320)^{-} +9010443,\psi(4160),\psi(4160) +9010553,\Upsilon(11020),\Upsilon(11020) +9020113,\mathrm{a}_{1}(1640)^{0},\mathrm{a}_{1}(1640)^{0} +9020213,\mathrm{a}_{1}(1640)^{+},\mathrm{a}_{1}(1640)^{-} +9020221,\eta(1405),\eta(1405) +9020225,\mathrm{f}_{2}(1640),\mathrm{f}_{2}(1640) +9020311,\mathrm{K}_{0}^{*}(1950)^{0},\mathrm{K}_{0}^{*}(1950)^{0} +9020321,\mathrm{K}_{0}^{*}(1950)^{+},\mathrm{K}_{0}^{*}(1950)^{-} +9020443,\psi(4415),\psi(4415) +9030113,\rho(1900)^{0},\rho(1900)^{0} +9030213,\rho(1900)^{+},\rho(1900)^{-} +9030221,\mathrm{f}_{0}(1500),\mathrm{f}_{0}(1500) +9030225,\mathrm{f}_{2}(1810),\mathrm{f}_{2}(1810) +9040221,\eta(1760),\eta(1760) +9040225,\mathrm{f}_{2}(1910),\mathrm{f}_{2}(1910) +9050221,\mathrm{f}_{0}(2020),\mathrm{f}_{0}(2020) +9050225,\mathrm{f}_{2}(1950),\mathrm{f}_{2}(1950) +9060221,\mathrm{f}_{0}(2100),\mathrm{f}_{0}(2100) +9060225,\mathrm{f}_{2}(2010),\mathrm{f}_{2}(2010) +9070221,\mathrm{f}_{0}(2200),\mathrm{f}_{0}(2200) +9070225,\mathrm{f}_{2}(2150),\mathrm{f}_{2}(2150) +9080221,\eta(2225),\eta(2225) +9080225,\mathrm{f}_{2}(2300),\mathrm{f}_{2}(2300) +9090225,\mathrm{f}_{2}(2340),\mathrm{f}_{2}(2340) +998100,\left[\pi^{+}\pi^{-}\right]^{L=0}_{0},\left[\pi^{+}\pi^{-}\right]^{L=0}_{0} +998101,\left[\pi^{+}\pi^{-}\right]^{L=0}_{1},\left[\pi^{+}\pi^{-}\right]^{L=0}_{1} +998102,\left[\pi^{+}\pi^{-}\right]^{L=0}_{2},\left[\pi^{+}\pi^{-}\right]^{L=0}_{2} +998103,\left[\pi^{+}\pi^{-}\right]^{L=0}_{3},\left[\pi^{+}\pi^{-}\right]^{L=0}_{3} +998104,\left[\pi^{+}\pi^{-}\right]^{L=0}_{4},\left[\pi^{+}\pi^{-}\right]^{L=0}_{4} +998105,\left[\pi^{+}\pi^{-}\right]^{L=0}_{5},\left[\pi^{+}\pi^{-}\right]^{L=0}_{5} +998106,\left[\pi^{+}\pi^{-}\right]^{L=0}_{6},\left[\pi^{+}\pi^{-}\right]^{L=0}_{6} +998110,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{0},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{0} +998111,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{1},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{1} +998112,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{2},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{2} +998113,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{3},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{3} +998114,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{4},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{4} +998115,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{5},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{5} +998116,\left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{6},\left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{6} diff --git a/decaylanguage/decay/__init__.py b/decaylanguage/decay/__init__.py index e69de29b..a2c1b03f 100644 --- a/decaylanguage/decay/__init__.py +++ b/decaylanguage/decay/__init__.py @@ -0,0 +1,4 @@ +from .amplitudechain import LS +from .amplitudechain import AmplitudeChain + +__all__ = (LS, AmplitudeChain) diff --git a/decaylanguage/decay/ampgen2goofit.py b/decaylanguage/decay/ampgen2goofit.py index 1e8e3b3b..148d5443 100755 --- a/decaylanguage/decay/ampgen2goofit.py +++ b/decaylanguage/decay/ampgen2goofit.py @@ -1,6 +1,10 @@ -#!/usr/bin/env python # coding: utf-8 +''' +This is a function that takes a filename and either prints out or returns +a string output with the converted set of decay chains and variables. +''' + from __future__ import absolute_import from __future__ import division from __future__ import print_function diff --git a/decaylanguage/decay/amplitudechain.py b/decaylanguage/decay/amplitudechain.py index 3bb709a5..59dfe82e 100644 --- a/decaylanguage/decay/amplitudechain.py +++ b/decaylanguage/decay/amplitudechain.py @@ -1,7 +1,13 @@ +''' +A class representing a set of decays. Can be subclassed to provide custom converters. +''' + + from __future__ import absolute_import from __future__ import division from __future__ import print_function +import warnings from copy import copy from enum import Enum from itertools import combinations @@ -21,6 +27,7 @@ import graphviz except ImportError: graphviz = None + warnings.warn("Graphvis not installed. Line display not available.") class LS(Enum): @@ -33,6 +40,7 @@ class LS(Enum): @attr.s(slots=True) class AmplitudeChain(object): + 'This is a chain of decays (a "line")' particle = attr.ib() daughters = attr.ib([], convert=lambda x: x if x else []) lineshape = attr.ib(None) @@ -201,7 +209,7 @@ def _make_graphviz(self): return d def _repr_svg_(self): - return self._make_graphvis()._repr_svg_() + return self._make_graphviz()._repr_svg_() @property def vertexes(self): @@ -255,7 +263,8 @@ def read_AmpGen(cls, filename=None, text=None): ''' Read in an ampgen file - :param filename: Filename + :param filename: Filename to read + :param text: Text to read (use instead of filename) :return: array of AmplitudeChains, parameters, constants, event type ''' diff --git a/decaylanguage/particle/particle.py b/decaylanguage/particle/particle.py index eb29ac97..a435c4b8 100644 --- a/decaylanguage/particle/particle.py +++ b/decaylanguage/particle/particle.py @@ -19,14 +19,13 @@ import attr import pandas as pd +from ..data import get_latex +from ..data import get_mass_width +from ..data import get_special + # The path of this file (used to load data files) dir_path = os.path.dirname(os.path.realpath(__file__)) -# Default files to load -FILE_LATEX = os.path.join(dir_path, 'pdgID_to_latex.txt') -FILE_MASSES = os.path.join(dir_path, 'mass_width.csv') -FILE_EXTENDED = os.path.join(dir_path, 'MintDalitzSpecialParticles.csv') - def programmatic_name(name): 'Return a name safe to use as a variable name' @@ -105,14 +104,14 @@ def get_from_latex(filename): Produce a pandas series from a file with latex mappings in itself. The file format is the following: PDGID ParticleLatexName AntiparticleLatexName. """ - latex_table = pd.read_csv(filename, delim_whitespace=True, names='id a b'.split(), index_col=0) - series_real = latex_table.a - series_anti = latex_table.b + latex_table = pd.read_csv(filename, index_col=0) + series_real = latex_table.particle + series_anti = latex_table.antiparticle series_anti.index = -series_anti.index return pd.concat([series_real, series_anti]) -def get_from_pdg(filename, latexes=(FILE_LATEX,)): +def get_from_pdg(filename, latexes=None): 'Read a file, plus a list of latex files, to produce a pandas DataFrame with particle information' def unmap(mapping): @@ -165,6 +164,8 @@ def unmap(mapping): full = pd.concat([pdg_table, pdg_table_inv]) # Add the latex + if latexes is None: + latexes = (get_latex(),) latex_series = pd.concat([get_from_latex(latex) for latex in latexes]) full = full.assign(Latex=latex_series) @@ -212,8 +213,10 @@ class Particle(object): _pdg_table = None @classmethod - def load_pdg_table(cls, files=(FILE_MASSES, FILE_EXTENDED), latexes=(FILE_LATEX,)): + def load_pdg_table(cls, files=None, latexes=None): 'Load a PDG table. Will be called on first access to the PDG table' + if files is None: + files = (get_mass_width(), get_special()) tables = [get_from_pdg(f, latexes) for f in files] cls._pdg_table = pd.concat(tables) diff --git a/decaylanguage/particle/pdgID_to_latex.txt b/decaylanguage/particle/pdgID_to_latex.txt deleted file mode 100644 index 6328e558..00000000 --- a/decaylanguage/particle/pdgID_to_latex.txt +++ /dev/null @@ -1,337 +0,0 @@ -1 d d -2 u u -3 s s -4 c c -5 \mathrm{b} \mathrm{b} -6 t t -11 e^- e^+ -13 \mu^- \mu^+ -15 \tau^- \tau^+ -22 \gamma \gamma -23 Z^{0} Z^{0} -24 W^{+} W^{-} -111 \pi^{0} \pi^{0} -113 \rho(770)^{0} \rho(770)^{0} -115 \mathrm{a}_{2}(1320)^{0} \mathrm{a}_{2}(1320)^{0} -117 \rho_3(1690)^{0} \rho_3(1690)^{0} -119 \mathrm{a}_4(2040)^{0} \mathrm{a}_4(2040)^{0} -130 \mathrm{K}_L^{0} \mathrm{K}_L^{0} -211 \pi^{+} \pi^{-} -213 \rho(770)^{+} \rho(770)^{-} -215 \mathrm{a}_{2}(1320)^{+} \mathrm{a}_{2}(1320)^{-} -217 \rho_3(1690)^{+} \rho_3(1690)^{-} -219 \mathrm{a}_4(2040)^{+} \mathrm{a}_4(2040)^{-} -221 \eta \eta -223 \omega(782) \omega(782) -225 \mathrm{f}_{2}(1270) \mathrm{f}_{2}(1270) -227 \omega_3(1670) \omega_3(1670) -229 \mathrm{f}_4(2050) \mathrm{f}_4(2050) -310 \mathrm{K}_S^{0} \mathrm{K}_S^{0} -311 \mathrm{K}^{0} \mathrm{K}^{0} -313 \mathrm{K}^{*}(892)^{0} \mathrm{K}^{*}(892)^{0} -315 \mathrm{K}_{2}^{*}(1430)^{0} \mathrm{K}_{2}^{*}(1430)^{0} -317 \mathrm{K}_3^{*}(1780)^{0} \mathrm{K}_3^{*}(1780)^{0} -319 \mathrm{K}_4^{*}(2045)^{0} \mathrm{K}_4^{*}(2045)^{0} -321 \mathrm{K}^{+} \mathrm{K}^{-} -323 \mathrm{K}^{*}(892)^{+} \mathrm{K}^{*}(892)^{-} -325 \mathrm{K}_{2}^{*}(1430)^{+} \mathrm{K}_{2}^{*}(1430)^{-} -327 \mathrm{K}_3^{*}(1780)^{+} \mathrm{K}_3^{*}(1780)^{-} -329 \mathrm{K}_4^{*}(2045)^{+} \mathrm{K}_4^{*}(2045)^{-} -331 \eta^\prime(958) \eta^\prime(958) -333 \phi(1020) \phi(1020) -335 \mathrm{f}_{2}^\prime(1525) \mathrm{f}_{2}^\prime(1525) -337 \phi_3(1850) \phi_3(1850) -411 D^{+} D^{-} -413 D^{*}(2010)^{+} D^{*}(2010)^{-} -415 D_{2}^{*}(2460)^{+} D_{2}^{*}(2460)^{-} -421 D^{0} D^{0} -423 D^{*}(2007)^{0} D^{*}(2007)^{0} -425 D_{2}^{*}(2460)^{0} D_{2}^{*}(2460)^{0} -431 D_s^{+} D_s^{-} -433 D_s^{*+} D_s^{*-} -435 D_{s2}^{*+} D_{s2}^{*-} -441 \eta_c(1S) \eta_c(1S) -443 J/\psi(1S) J/\psi(1S) -445 \chi_{c2}(1P) \chi_{c2}(1P) -511 B^{0} B^{0} -513 B^{*0} B^{*0} -515 B_{2}^{*0} B_{2}^{*0} -521 B^{+} B^{-} -523 B^{*+} B^{*-} -525 B_{2}^{*+} B_{2}^{*-} -531 B_s^{0} B_s^{0} -533 B_s^{*0} B_s^{*0} -535 B_{s2}^{*0} B_{s2}^{*0} -541 B_c^{+} B_c^{-} -551 \eta_\mathrm{b}(1S) \eta_\mathrm{b}(1S) -553 \Upsilon(1S) \Upsilon(1S) -555 \chi_{\mathrm{b}2}(1P) \chi_{\mathrm{b}2}(1P) -1112 \Delta(1620)^- \Delta(1620)^+ -1114 \Delta^- \Delta^+ -1116 \Delta(1905)^- \Delta(1905)^+ -1118 \Delta(1950)^- \Delta(1950)^+ -1212 \Delta(1620)^{+} \Delta(1620)^{+} -1214 N(1520)^{0} N(1520)^{0} -1216 \Delta(1905)^{0} \Delta(1905)^{0} -1218 N(2190)^{0} N(2190)^{0} -2112 \Delta(1620)^{0} \Delta(1620)^{0} -2114 \Delta^{0} \Delta^{0} -2116 N(1675)^{0} N(1675)^{0} -2118 \Delta(1950)^{0} \Delta(1950)^{0} -2124 N(1520)^{+} N(1520)^{-} -2126 \Delta(1905)^{+} \Delta(1905)^{-} -2128 N(2190)^{+} N(2190)^{-} -2212 p p -2214 \Delta^{+} \Delta^{-} -2216 N(1675)^{+} N(1675)^{-} -2218 \Delta(1950)^{+} \Delta(1950)^{-} -2222 \Delta(1620)^{++} \Delta(1620)^{--} -2224 \Delta^{++} \Delta^{--} -2226 \Delta(1905)^{++} \Delta(1905)^{--} -2228 \Delta(1950)^{++} \Delta(1950)^{--} -3112 \Sigma^- \Sigma^+ -3114 \Sigma^{*-}/\Sigma(1385)^- \Sigma^{*+}/\Sigma(1385)^+ -3116 \Sigma(1775)^- \Sigma(1775)^+ -3122 \Lam\mathrm{b}da \Lam\mathrm{b}da -3124 \Lam\mathrm{b}da(1520) \Lam\mathrm{b}da(1520) -3126 \Lam\mathrm{b}da(1820) \Lam\mathrm{b}da(1820) -3128 \Lam\mathrm{b}da(2100) \Lam\mathrm{b}da(2100) -3212 \Sigma^{0} \Sigma^{0} -3214 \Sigma^{*0}/\Sigma(1385)^{0} \Sigma^{*0}/\Sigma(1385)^{0} -3216 \Sigma(1775)^{0} \Sigma(1775)^{0} -3222 \Sigma^{+} \Sigma^{-} -3224 \Sigma^{*+}/\Sigma(1385)^{+} \Sigma^{*-}/\Sigma(1385)^{-} -3226 \Sigma(1775)^{+} \Sigma(1775)^{-} -3312 \Xi^- \Xi^+ -3314 \Xi^{*-}/\Xi(1530)^- \Xi^{*+}/\Xi(1530)^+ -3322 \Xi^{0} \Xi^{0} -3324 \Xi^{*0}/\Xi(1530)^{0} \Xi^{*0}/\Xi(1530)^{0} -3334 \Omega^- \Omega^+ -4112 \Sigma_c^{0} \Sigma_c^{0} -4114 \Sigma_c^{*0} \Sigma_c^{*0} -4122 \Lam\mathrm{b}da_c^{+} \Lam\mathrm{b}da_c^{-} -4132 \Xi_c^{0} \Xi_c^{0} -4212 \Sigma_c^{+} \Sigma_c^{-} -4214 \Sigma_c^{*+} \Sigma_c^{*-} -4222 \Sigma_c^{++} \Sigma_c^{--} -4224 \Sigma_c^{*++} \Sigma_c^{*--} -4232 \Xi_c^{+} \Xi_c^{-} -4312 \Xi_c^{\prime 0} \Xi_c^{\prime 0} -4314 \Xi_c^{*0} \Xi_c^{*0} -4322 \Xi_c^{\prime +} \Xi_c^{\prime -} -4324 \Xi_c^{*+} \Xi_c^{*-} -4332 \Omega_c^{0} \Omega_c^{0} -4334 \Omega_c^{*0} \Omega_c^{*0} -4412 \Xi_{cc}^{+} \Xi_{cc}^{-} -4422 \Xi_{cc}^{++} \Xi_{cc}^{--} -5112 \Sigma_\mathrm{b}^- \Sigma_\mathrm{b}^+ -5114 \Sigma_\mathrm{b}^{*-} \Sigma_\mathrm{b}^{*+} -5122 \Lam\mathrm{b}da_b^{0} \Lam\mathrm{b}da_b^{0} -5132 \Xi_\mathrm{b}^- \Xi_\mathrm{b}^- -5212 \Sigma_\mathrm{b}^{0} \Sigma_\mathrm{b}^{0} -5214 \Sigma_\mathrm{b}^{*0} \Sigma_\mathrm{b}^{*0} -5222 \Sigma_\mathrm{b}^{+} \Sigma_\mathrm{b}^{-} -5224 \Sigma_\mathrm{b}^{*+} \Sigma_\mathrm{b}^{*-} -5232 \Xi_\mathrm{b}^{0} \Xi_\mathrm{b}^{0} -9981 0^{+} 0^{+} -9983 1^{+} 1^{+} -9985 2^{+} 2^{+} -9986 2^{-} 2^{-} -9991 0^{-} 0^{-} -9993 1^{-} 1^{-} -10111 \mathrm{a}_{0}(1450)^{0} \mathrm{a}_{0}(1450)^{0} -10113 \mathrm{b}_{1}(1235)^{0} \mathrm{b}_{1}(1235)^{0} -10115 \pi_{2}(1670)^{0} \pi_{2}(1670)^{0} -10211 \mathrm{a}_{0}(1450)^{+} \mathrm{a}_{0}(1450)^{-} -10213 \mathrm{b}_{1}(1235)^{+} \mathrm{b}_{1}(1235)^{-} -10215 \pi_{2}(1670)^{+} \pi_{2}(1670)^{-} -10223 h_{1}(1170) h_{1}(1170) -10225 \eta_{2}(1645) \eta_{2}(1645) -10311 \mathrm{K}_{0}^{*}(1430)^{0} \mathrm{K}_{0}^{*}(1430)^{0} -10313 \mathrm{K}_{1}(1270)^{0} \mathrm{K}_{1}(1270)^{0} -10315 \mathrm{K}_{2}(1770)^{0} \mathrm{K}_{2}(1770)^{0} -10321 \mathrm{K}_{0}^{*}(1430)^{+} \mathrm{K}_{0}^{*}(1430)^{-} -10323 \mathrm{K}_{1}(1270)^{+} \mathrm{K}_{1}(1270)^{-} -10325 \mathrm{K}_{2}(1770)^{+} \mathrm{K}_{2}(1770)^{-} -10331 \mathrm{f}_{0}(1710) \mathrm{f}_{0}(1710) -10333 h_{1}(1380)/h_1^\prime h_{1}(1380)/h_1^\prime -10335 \eta_{2}(1870) \eta_{2}(1870) -10411 D_{0}^{*}(2400)^{+} D_{0}^{*}(2400)^{-} -10413 D_{1}(2420)/D_1^{+}(L)^{+} D_{1}(2420)/D_1^{-}(L)^{-} -10421 D_{0}^{*}(2400)^{0} D_{0}^{*}(2400)^{0} -10423 D_{1}(2420)/D_1^{0}(L)^{0} D_{1}(2420)/D_1^{0}(L)^{0} -10431 D_{s0}^{*+} D_{s0}^{*-} -10433 D_{s1}(2536)/D_{s1}^{+}(L)^{+} D_{s1}(2536)/D_{s1}^{-}(L)^{-} -10441 \chi_{c0}(1P) \chi_{c0}(1P) -10443 h_c(1P) h_c(1P) -10551 \chi_{\mathrm{b}0}(1P) \chi_{\mathrm{b}0}(1P) -11114 \Delta(1700)^- \Delta(1700)^+ -12112 N(1440)^{0} N(1440)^{0} -12114 \Delta(1700)^{0} \Delta(1700)^{0} -12116 N(1680)^{0} N(1680)^{0} -12212 N(1440)^{+} N(1440)^{-} -12214 \Delta(1700)^{+} \Delta(1700)^{-} -12216 N(1680)^{+} N(1680)^{-} -12224 \Delta(1700)^{++} \Delta(1700)^{--} -13112 \Sigma(1660)^- \Sigma(1660)^+ -13114 \Sigma(1670)^- \Sigma(1670)^+ -13116 \Sigma(1915)^- \Sigma(1915)^+ -13122 \Lam\mathrm{b}da(1404) \Lam\mathrm{b}da(1404) -13124 \Lam\mathrm{b}da(1690) \Lam\mathrm{b}da(1690) -13126 \Lam\mathrm{b}da(1830) \Lam\mathrm{b}da(1830) -13212 \Sigma(1660)^{0} \Sigma(1660)^{0} -13214 \Sigma(1670)^{0} \Sigma(1670)^{0} -13216 \Sigma(1915)^{0} \Sigma(1915)^{0} -13222 \Sigma(1660)^{+} \Sigma(1660)^{-} -13224 \Sigma(1670)^{+} \Sigma(1670)^{-} -13226 \Sigma(1915)^{+} \Sigma(1915)^{-} -14122 \Lam\mathrm{b}da_c(2593) \Lam\mathrm{b}da_c(2593) -20113 \mathrm{a}_{1}(1260)^{0} \mathrm{a}_{1}(1260)^{0} -20213 \mathrm{a}_{1}(1260)^{+} \mathrm{a}_{1}(1260)^{-} -20223 \mathrm{f}_{1}(1285) \mathrm{f}_{1}(1285) -20313 \mathrm{K}_{1}(1400)^{0} \mathrm{K}_{1}(1400)^{0} -20315 \mathrm{K}_{2}(1820)^{0} \mathrm{K}_{2}(1820)^{0} -20323 \mathrm{K}_{1}(1400)^{+} \mathrm{K}_{1}(1400)^{-} -20325 \mathrm{K}_{2}(1820)^{+} \mathrm{K}_{2}(1820)^{-} -20333 \mathrm{f}_{1}(1420)/f_1^\prime \mathrm{f}_{1}(1420)/f_1^\prime -20423 D_{1}(2430)^{0} D_{1}(2430)^{0} -20433 D_{s1}(H)/D_{s1}^{*+}^{+} D_{s1}(H)/D_{s1}^{*-}^{-} -20443 \chi_{c1}(1P) \chi_{c1}(1P) -20553 \chi_{\mathrm{b}1}(1P) \chi_{\mathrm{b}1}(1P) -21112 \Delta(1910)^- \Delta(1910)^+ -21212 \Delta(1910)^{+} \Delta(1910)^{+} -21214 N(1700)^{0} N(1700)^{0} -22112 \Delta(1910)^{0} \Delta(1910)^{0} -22124 N(1700)^{+} N(1700)^{-} -22212 N(1535)^{+} N(1535)^{-} -22222 \Delta(1910)^{++} \Delta(1910)^{--} -23112 \Sigma(1750)^- \Sigma(1750)^+ -23114 \Sigma(1940)^- \Sigma(1940)^+ -23122 \Lam\mathrm{b}da(1600) \Lam\mathrm{b}da(1600) -23124 \Lam\mathrm{b}da(1890) \Lam\mathrm{b}da(1890) -23126 \Lam\mathrm{b}da(2110) \Lam\mathrm{b}da(2110) -23212 \Sigma(1750)^{0} \Sigma(1750)^{0} -23214 \Sigma(1940)^{0} \Sigma(1940)^{0} -23222 \Sigma(1750)^{+} \Sigma(1750)^{-} -23224 \Sigma(1940)^{+} \Sigma(1940)^{-} -30113 \rho(1700)^{0} \rho(1700)^{0} -30213 \rho(1700)^{+} \rho(1700)^{-} -30221 \mathrm{f}_{0}(1370)/f_0^\prime \mathrm{f}_{0}(1370)/f_0^\prime -30223 \omega(1650) \omega(1650) -30313 \mathrm{K}^{*}(1680)^{0} \mathrm{K}^{*}(1680)^{0} -30323 \mathrm{K}^{*}(1680)^{+} \mathrm{K}^{*}(1680)^{-} -30443 \psi(3770) \psi(3770) -31114 \Delta(1600)^- \Delta(1600)^+ -31214 N(1720)^{0} N(1720)^{0} -32112 N(1650)^{0} N(1650)^{0} -32114 \Delta(1600)^{0} \Delta(1600)^{0} -32124 N(1720)^{+} N(1720)^{-} -32212 N(1650)^{+} N(1650)^{-} -32214 \Delta(1600)^{+} \Delta(1600)^{-} -32224 \Delta(1600)^{++} \Delta(1600)^{--} -33122 \Lam\mathrm{b}da(1670) \Lam\mathrm{b}da(1670) -42112 N(1710)^{0} N(1710)^{0} -42212 N(1710)^{+} N(1710)^{-} -43122 \Lam\mathrm{b}da(1800) \Lam\mathrm{b}da(1800) -53122 \Lam\mathrm{b}da(1810) \Lam\mathrm{b}da(1810) -100111 \pi(1300)^{0} \pi(1300)^{0} -100113 \rho(1450)^{0} \rho(1450)^{0} -100115 \mathrm{a}_{2}(1700)^{0} \mathrm{a}_{2}(1700)^{0} -100211 \pi(1300)^{+} \pi(1300)^{-} -100213 \rho(1450)^{+} \rho(1450)^{-} -100215 \mathrm{a}_{2}(1700)^{+} \mathrm{a}_{2}(1700)^{-} -100221 \eta(1295) \eta(1295) -100223 \omega(1420) \omega(1420) -100311 \mathrm{K}(1460)^{0} \mathrm{K}(1460)^{0} -100313 \mathrm{K}^{*}(1410)^{0} \mathrm{K}^{*}(1410)^{0} -100315 \mathrm{K}_{2}^{*}(1980)^{0} \mathrm{K}_{2}^{*}(1980)^{0} -100321 \mathrm{K}(1460)^{+} \mathrm{K}(1460)^{-} -100323 \mathrm{K}^{*}(1410)^{+} \mathrm{K}^{*}(1410)^{-} -100325 \mathrm{K}_{2}^{*}(1980)^{+} \mathrm{K}_{2}^{*}(1980)^{-} -100331 \eta(1475) \eta(1475) -100333 \phi(1680) \phi(1680) -100441 \eta_c(2S) \eta_c(2S) -100443 \psi(2S)/\psi^\prime \psi(2S)/\psi^\prime -100445 \chi_{c2}(2P) \chi_{c2}(2P) -100553 \Upsilon(2S)/\Upsilon^\prime \Upsilon(2S)/\Upsilon^\prime -100555 \chi_{\mathrm{b}2}(2P) \chi_{\mathrm{b}2}(2P) -110551 \chi_{\mathrm{b}0}(2P) \chi_{\mathrm{b}0}(2P) -120553 \chi_{\mathrm{b}1}(2P) \chi_{\mathrm{b}1}(2P) -200553 \Upsilon(3S) \Upsilon(3S) -300553 \Upsilon(4S) \Upsilon(4S) -9000111 \mathrm{a}_{0}(980)^{0} \mathrm{a}_{0}(980)^{0} -9000113 \pi_{1}(1400)^{0} \pi_{1}(1400)^{0} -9000115 \pi_{2}(2100)^{0} \pi_{2}(2100)^{0} -9000117 \rho_3(1990)^{0} \rho_3(1990)^{0} -9000211 \mathrm{a}_{0}(980)^{+} \mathrm{a}_{0}(980)^{-} -9000213 \pi_{1}(1400)^{+} \pi_{1}(1400)^{-} -9000215 \pi_{2}(2100)^{+} \pi_{2}(2100)^{-} -9000217 \rho_3(1990)^{+} \rho_3(1990)^{-} -9000221 \mathrm{f}_{0}(600) \mathrm{f}_{0}(600) -9000223 \mathrm{f}_{1}(1510) \mathrm{f}_{1}(1510) -9000225 \mathrm{f}_{2}(1430) \mathrm{f}_{2}(1430) -9000229 \mathrm{f}_J(2220) \mathrm{f}_J(2220) -9000311 \mathrm{K}_{0}^{*}(800)^{0} \mathrm{K}_{0}^{*}(800)^{0} -9000313 \mathrm{K}_{1}(1650)^{0} \mathrm{K}_{1}(1650)^{0} -9000315 \mathrm{K}_{2}(1580)^{0} \mathrm{K}_{2}(1580)^{0} -9000319 \mathrm{K}_4(2500)^{0} \mathrm{K}_4(2500)^{0} -9000321 \mathrm{K}_{0}^{*}(800)^{+} \mathrm{K}_{0}^{*}(800)^{-} -9000323 \mathrm{K}_{1}(1650)^{+} \mathrm{K}_{1}(1650)^{-} -9000325 \mathrm{K}_{2}(1580)^{+} \mathrm{K}_{2}(1580)^{-} -9000329 \mathrm{K}_4(2500)^{+} \mathrm{K}_4(2500)^{-} -9000443 \psi(4040) \psi(4040) -9000553 \Upsilon(10860) \Upsilon(10860) -9010111 \pi(1800)^{0} \pi(1800)^{0} -9010113 \pi_{1}(1600)^{0} \pi_{1}(1600)^{0} -9010117 \rho_3(2250)^{0} \rho_3(2250)^{0} -9010211 \pi(1800)^{+} \pi(1800)^{-} -9010213 \pi_{1}(1600)^{+} \pi_{1}(1600)^{-} -9010217 \rho_3(2250)^{+} \rho_3(2250)^{-} -9010221 \mathrm{f}_{0}(980) \mathrm{f}_{0}(980) -9010223 h_{1}(1595) h_{1}(1595) -9010225 \mathrm{f}_{2}(1565) \mathrm{f}_{2}(1565) -9010229 \mathrm{f}_4(2300) \mathrm{f}_4(2300) -9010311 \mathrm{K}(1830)^{0} \mathrm{K}(1830)^{0} -9010315 \mathrm{K}_{2}(2250)^{0} \mathrm{K}_{2}(2250)^{0} -9010317 \mathrm{K}_3(2320)^{0} \mathrm{K}_3(2320)^{0} -9010321 \mathrm{K}(1830)^{+} \mathrm{K}(1830)^{-} -9010325 \mathrm{K}_{2}(2250)^{+} \mathrm{K}_{2}(2250)^{-} -9010327 \mathrm{K}_3(2320)^{+} \mathrm{K}_3(2320)^{-} -9010443 \psi(4160) \psi(4160) -9010553 \Upsilon(11020) \Upsilon(11020) -9020113 \mathrm{a}_{1}(1640)^{0} \mathrm{a}_{1}(1640)^{0} -9020213 \mathrm{a}_{1}(1640)^{+} \mathrm{a}_{1}(1640)^{-} -9020221 \eta(1405) \eta(1405) -9020225 \mathrm{f}_{2}(1640) \mathrm{f}_{2}(1640) -9020311 \mathrm{K}_{0}^{*}(1950)^{0} \mathrm{K}_{0}^{*}(1950)^{0} -9020321 \mathrm{K}_{0}^{*}(1950)^{+} \mathrm{K}_{0}^{*}(1950)^{-} -9020443 \psi(4415) \psi(4415) -9030113 \rho(1900)^{0} \rho(1900)^{0} -9030213 \rho(1900)^{+} \rho(1900)^{-} -9030221 \mathrm{f}_{0}(1500) \mathrm{f}_{0}(1500) -9030225 \mathrm{f}_{2}(1810) \mathrm{f}_{2}(1810) -9040221 \eta(1760) \eta(1760) -9040225 \mathrm{f}_{2}(1910) \mathrm{f}_{2}(1910) -9050221 \mathrm{f}_{0}(2020) \mathrm{f}_{0}(2020) -9050225 \mathrm{f}_{2}(1950) \mathrm{f}_{2}(1950) -9060221 \mathrm{f}_{0}(2100) \mathrm{f}_{0}(2100) -9060225 \mathrm{f}_{2}(2010) \mathrm{f}_{2}(2010) -9070221 \mathrm{f}_{0}(2200) \mathrm{f}_{0}(2200) -9070225 \mathrm{f}_{2}(2150) \mathrm{f}_{2}(2150) -9080221 \eta(2225) \eta(2225) -9080225 \mathrm{f}_{2}(2300) \mathrm{f}_{2}(2300) -9090225 \mathrm{f}_{2}(2340) \mathrm{f}_{2}(2340) -998100 \left[\pi^{+}\pi^{-}\right]^{L=0}_{0} \left[\pi^{+}\pi^{-}\right]^{L=0}_{0} -998101 \left[\pi^{+}\pi^{-}\right]^{L=0}_{1} \left[\pi^{+}\pi^{-}\right]^{L=0}_{1} -998102 \left[\pi^{+}\pi^{-}\right]^{L=0}_{2} \left[\pi^{+}\pi^{-}\right]^{L=0}_{2} -998103 \left[\pi^{+}\pi^{-}\right]^{L=0}_{3} \left[\pi^{+}\pi^{-}\right]^{L=0}_{3} -998104 \left[\pi^{+}\pi^{-}\right]^{L=0}_{4} \left[\pi^{+}\pi^{-}\right]^{L=0}_{4} -998105 \left[\pi^{+}\pi^{-}\right]^{L=0}_{5} \left[\pi^{+}\pi^{-}\right]^{L=0}_{5} -998106 \left[\pi^{+}\pi^{-}\right]^{L=0}_{6} \left[\pi^{+}\pi^{-}\right]^{L=0}_{6} -998110 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{0} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{0} -998111 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{1} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{1} -998112 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{2} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{2} -998113 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{3} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{3} -998114 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{4} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{4} -998115 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{5} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{5} -998116 \left[\mathrm{K}^{-}\pi^{+}\right]^{L=0}_{6} \left[\mathrm{K}^{+}\pi^{-}\right]^{L=0}_{6} diff --git a/setup.py b/setup.py index b4d7a19f..e2ea1dfb 100644 --- a/setup.py +++ b/setup.py @@ -11,14 +11,12 @@ from setuptools import find_packages from setuptools import setup - def read(*names, **kwargs): return io.open( join(dirname(__file__), *names), encoding=kwargs.get('encoding', 'utf8') ).read() - setup( name='decaylanguage', version='0.1.0', @@ -50,10 +48,6 @@ def read(*names, **kwargs): 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', - # uncomment if you test on these interpreters: - # 'Programming Language :: Python :: Implementation :: IronPython', - # 'Programming Language :: Python :: Implementation :: Jython', - # 'Programming Language :: Python :: Implementation :: Stackless', 'Topic :: Utilities', ], keywords=[ @@ -67,11 +61,10 @@ def read(*names, **kwargs): 'six>=1.11', 'pathlib2>=2.3; python_version<"3.5"', 'enum34>=1.1; python_version<"3.4"', + 'importlib_resources>=1.0; python_version<"3.7"', ], extras_require={ - # eg: - # 'rst': ['docutils>=0.11'], - # ':python_version=="2.6"': ['argparse'], + 'notebook': ['graphviz'], }, setup_requires=['pytest-runner'], tests_require=['pytest']