Skip to content
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

MAINT: upgrade to PDG v0.1.3 #22

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ _inventory.md
002/*-graph
013/graph?
018/graph

_static/exported_intensity_model.py
259 changes: 21 additions & 238 deletions docs/028.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"outputs": [],
"source": [
"%pip install -q pdg==0.1.2 tqdm==4.66.5"
"%pip install -q pdg==0.1.3 tqdm==4.66.5"
]
},
{
Expand Down Expand Up @@ -81,28 +81,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"{pdg.data.PdgLifetime,\n",
" pdg.data.PdgMass,\n",
" pdg.data.PdgProperty,\n",
" pdg.data.PdgWidth,\n",
" pdg.decay.PdgBranchingFraction,\n",
" pdg.particle.PdgParticleList}"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"{type(obj) for obj in PDG.get_all()}"
]
Expand All @@ -117,23 +97,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"pdg.decay.PdgBranchingFraction"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"jpsi_decay = PDG.get(\"M070.313/2023\")\n",
"type(jpsi_decay)"
Expand All @@ -142,23 +107,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"'J/psi(1S) --> rho(1700) pi --> pi+ pi- pi0'"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"jpsi_decay.description"
]
Expand All @@ -173,23 +123,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"7243"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"from pdg.decay import PdgBranchingFraction\n",
"\n",
Expand Down Expand Up @@ -224,22 +159,10 @@
"source_hidden": true
},
"tags": [
"hide-input",
"keep_output"
"hide-input"
]
},
"outputs": [
{
"data": {
"text/plain": [
"7360"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"def create_final_state(description: str) -> tuple[str, ...]:\n",
" items = []\n",
Expand Down Expand Up @@ -276,23 +199,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"2181"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"three_body_decays = {\n",
" (initial_state, final_state)\n",
Expand All @@ -305,38 +213,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"[('B0', ('K0S', 'K0S', 'K0S')),\n",
" ('B0', ('a', 'a', 'a')),\n",
" ('B_s()0', ('a', 'a', 'a')),\n",
" ('B_s()0', ('phi', 'phi', 'phi')),\n",
" ('J/psi(1S)', ('g', 'g', 'g')),\n",
" ('J/psi(1S)', ('gamma', 'gamma', 'gamma')),\n",
" ('Upsilon(1S)', ('g', 'g', 'g')),\n",
" ('Upsilon(2S)', ('g', 'g', 'g')),\n",
" ('Upsilon(3S)', ('g', 'g', 'g')),\n",
" ('Z', ('g', 'g', 'g')),\n",
" ('Z', ('gamma', 'gamma', 'gamma')),\n",
" ('a_1(1260)', ('pi0', 'pi0', 'pi0')),\n",
" ('a_1(1640)', ('pi', 'pi', 'pi')),\n",
" ('pi_1(1600)', ('pi', 'pi', 'pi')),\n",
" ('pi_2(1670)', ('pi0', 'pi0', 'pi0')),\n",
" ('psi(2S)', ('g', 'g', 'g'))]"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"equal_state_3body_decays = {\n",
" (initial_state, final_state)\n",
Expand All @@ -361,26 +239,10 @@
"source_hidden": true
},
"tags": [
"hide-input",
"keep_output"
"hide-input"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" J/psi(1S) → g g g\n",
" J/psi(1S) → gamma gamma gamma\n",
" Upsilon(1S) → g g g\n",
" Upsilon(2S) → g g g\n",
" Upsilon(3S) → g g g\n",
" Z → g g g\n",
" Z → gamma gamma gamma\n",
" psi(2S) → g g g\n"
]
}
],
"outputs": [],
"source": [
"from pdg.errors import PdgAmbiguousValueError, PdgNoDataError\n",
"\n",
Expand All @@ -406,36 +268,8 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
"keep_output"
]
},
"outputs": [
{
"data": {
"text/plain": [
"['a_1(1260) --> K^*(892) K',\n",
" 'a_1(1260) --> ( rho(1450) pi )(S-wave) , rho --> pi pi',\n",
" 'a_1(1260) --> f_2(1270) pi , f_2() --> pi pi',\n",
" 'a_1(1260) --> f_0(500) pi , f_0() --> pi pi',\n",
" 'a_1(1260) --> f_0(980) pi , f_0() --> pi pi',\n",
" 'a_1(1260) --> pi0 pi0 pi0',\n",
" 'a_1(1260) --> pi+ pi- pi0',\n",
" 'a_1(1260) --> ( rho(1450) pi )(D-wave) , rho --> pi pi',\n",
" 'a_1(1260) --> pi gamma',\n",
" 'a_1(1260) --> ( rho pi )(D-wave) , rho --> pi pi',\n",
" 'a_1(1260) --> 3 pi',\n",
" 'a_1(1260) --> f_0(1370) pi , f_0() --> pi pi',\n",
" 'a_1(1260) --> K K pi',\n",
" 'a_1(1260) --> ( rho pi )(S-wave) , rho --> pi pi']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"metadata": {},
"outputs": [],
"source": [
"[dec for dec in decay_descriptions if dec.startswith(\"a_1(1260)\")]"
]
Expand All @@ -455,61 +289,10 @@
"source_hidden": true
},
"tags": [
"hide-input",
"keep_output"
"hide-input"
]
},
"outputs": [
{
"data": {
"text/plain": [
"['J/psi(1S) --> 2(pi+ pi- pi0)',\n",
" 'J/psi(1S) --> 2(pi+ pi- pi0) eta',\n",
" 'J/psi(1S) --> 2(pi+ pi-) 3pi0',\n",
" 'J/psi(1S) --> 2(pi+ pi-) pi0',\n",
" 'J/psi(1S) --> 3(pi+ pi-) pi0',\n",
" 'J/psi(1S) --> 4(pi+ pi-) pi0',\n",
" 'J/psi(1S) --> K+ K- pi0 pi0 pi0',\n",
" 'J/psi(1S) --> K0S K+- pi-+ pi+ pi-',\n",
" 'J/psi(1S) --> K0S K+- pi-+ pi0 pi0',\n",
" 'J/psi(1S) --> K^*(892)+ K0S pi- + c.c. --> K0S K0S pi+ pi-',\n",
" 'J/psi(1S) --> K^*(892)0 K- pi+ + c.c. --> K+ K- pi+ pi-',\n",
" 'J/psi(1S) --> K_2^*(1430)0 K- pi+ + c.c. --> K+ K- pi+ pi-',\n",
" 'J/psi(1S) --> a_2(1320)+ pi- pi0 + c.c --> 2 (pi+ pi- ) pi0',\n",
" 'J/psi(1S) --> a_2(1320)0 pi+ pi- --> 2 (pi+ pi- ) pi0',\n",
" 'J/psi(1S) --> eta pi+ pi- 3 pi0',\n",
" 'J/psi(1S) --> eta pi+ pi- pi0',\n",
" 'J/psi(1S) --> gamma pi+ pi- 2pi0',\n",
" 'J/psi(1S) --> omega 3 pi0',\n",
" 'J/psi(1S) --> omega pi+ pi+ pi- pi-',\n",
" 'J/psi(1S) --> omega pi+ pi- 2pi0',\n",
" 'J/psi(1S) --> omega pi+ pi- pi0',\n",
" 'J/psi(1S) --> omega pi0 --> pi+ pi- pi0',\n",
" 'J/psi(1S) --> p pbar pi+ pi- pi0',\n",
" 'J/psi(1S) --> phi f_1(1285) --> phi pi0 f_0(980) --> phi 3pi0',\n",
" 'J/psi(1S) --> phi f_1(1285) --> phi pi0 f_0(980) --> phi pi0 pi+ pi-',\n",
" 'J/psi(1S) --> phi pi0 f_0(980) --> phi pi0 p0 pi0',\n",
" 'J/psi(1S) --> phi pi0 f_0(980) --> phi pi0 pi+ pi-',\n",
" 'J/psi(1S) --> pi+ pi- 3pi0',\n",
" 'J/psi(1S) --> pi+ pi- 4 pi0',\n",
" 'J/psi(1S) --> pi+ pi- pi0',\n",
" 'J/psi(1S) --> pi+ pi- pi0 K+ K-',\n",
" 'J/psi(1S) --> pi+ pi- pi0 pi0 eta',\n",
" 'J/psi(1S) --> rho(1450) pi --> pi+ pi- pi0',\n",
" 'J/psi(1S) --> rho(1700) pi --> pi+ pi- pi0',\n",
" 'J/psi(1S) --> rho(2150) pi --> pi+ pi- pi0',\n",
" 'J/psi(1S) --> rho+ K+ K- pi- + c.c --> K+ K- pi+ pi- pi0',\n",
" 'J/psi(1S) --> rho+ rho- pi+ pi- pi0',\n",
" 'J/psi(1S) --> rho+- pi-+ pi+ pi- 2pi0',\n",
" 'J/psi(1S) --> rho+- pi-+ pi0 pi0',\n",
" 'J/psi(1S) --> rho_3(1690) pi --> pi+ pi- pi0']"
]
},
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"import re\n",
"\n",
Expand Down
5 changes: 5 additions & 0 deletions docs/_static/exported_intensity_model.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def get_nb_exclusion_patterns() -> list[str]:
"020*",
"021*",
"022*",
"028*",
"030*",
"031*",
"032*",
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ exclude = [
"**/.tox",
"**/__pycache__",
"**/_build",
"**/exported_intensity_model.py",
]
reportGeneralTypeIssues = false
reportIncompatibleMethodOverride = false
Expand Down Expand Up @@ -263,6 +264,7 @@ testpaths = [
]

[tool.ruff]
extend-exclude = ["exported_intensity_model.py"]
extend-include = ["*.ipynb"]
preview = true
show-fixes = true
Expand Down
Loading