Skip to content

Commit 66e24e0

Browse files
authored
build: upgrade to AmpForm v0.9.x (#270)
1 parent 82c2b35 commit 66e24e0

File tree

10 files changed

+24
-24
lines changed

10 files changed

+24
-24
lines changed

.constraints/py3.6.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
absl-py==0.12.0
88
alabaster==0.7.12
9-
ampform==0.8.1
9+
ampform==0.9.1
1010
anyio==2.2.0
1111
apipkg==1.5
1212
appdirs==1.4.4
@@ -94,7 +94,7 @@ jupyter-server==1.6.4
9494
jupyter-sphinx==0.3.2
9595
jupyter==1.0.0
9696
jupyterlab-code-formatter==1.4.10
97-
jupyterlab-server==2.5.0
97+
jupyterlab-server==2.5.1
9898
jupyterlab-widgets==1.0.0
9999
jupyterlab==3.0.14
100100
keras-preprocessing==1.1.2

.constraints/py3.7.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
absl-py==0.12.0
88
alabaster==0.7.12
9-
ampform==0.8.1
9+
ampform==0.9.1
1010
anyio==2.2.0
1111
apipkg==1.5
1212
appdirs==1.4.4
@@ -91,7 +91,7 @@ jupyter-server==1.6.4
9191
jupyter-sphinx==0.3.2
9292
jupyter==1.0.0
9393
jupyterlab-code-formatter==1.4.10
94-
jupyterlab-server==2.5.0
94+
jupyterlab-server==2.5.1
9595
jupyterlab-widgets==1.0.0
9696
jupyterlab==3.0.14
9797
keras-preprocessing==1.1.2

.constraints/py3.8.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
absl-py==0.12.0
88
alabaster==0.7.12
9-
ampform==0.8.1
9+
ampform==0.9.1
1010
anyio==2.2.0
1111
apipkg==1.5
1212
appdirs==1.4.4
@@ -91,7 +91,7 @@ jupyter-server==1.6.4
9191
jupyter-sphinx==0.3.2
9292
jupyter==1.0.0
9393
jupyterlab-code-formatter==1.4.10
94-
jupyterlab-server==2.5.0
94+
jupyterlab-server==2.5.1
9595
jupyterlab-widgets==1.0.0
9696
jupyterlab==3.0.14
9797
keras-preprocessing==1.1.2

docs/usage.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
"outputs": [],
158158
"source": [
159159
"model.components[\n",
160-
" R\"A[J/\\psi(1S)_{-1} \\to f_{0}(980)_{0} \\gamma_{+1,L=2,S=1};f_{0}(980)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0,L=0,S=0};]\"\n",
160+
" R\"A[J/\\psi(1S)_{-1} \\to f_{0}(980)_{0} \\gamma_{+1,L=2,S=1}; f_{0}(980)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0,L=0,S=0}]\"\n",
161161
"].doit()"
162162
]
163163
},

docs/usage/step1.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"1. The coefficients for the different amplitudes are **complex** valued.\n",
136136
"2. By default there is no dynamics in the model, so it still has to be specified.\n",
137137
"\n",
138-
"We choose to use {func}`~ampform.dynamics.lineshape.relativistic_breit_wigner_with_ff` as the lineshape for all resonances and use a {class}`~ampform.dynamics.lineshape.BlattWeisskopf` form factor factor (no dynamics) for the production decay. The {meth}`~ampform.helicity.HelicityAmplitudeBuilder.set_dynamics` is a convenience interface for replacing the dynamics for intermediate states."
138+
"We choose to use {func}`~ampform.dynamics.relativistic_breit_wigner_with_ff` as the lineshape for all resonances and use a Blatt-Weisskopf form factor (no dynamics; see {class}`~ampform.dynamics.BlattWeisskopfSquared`) for the production decay. The {meth}`~ampform.helicity.HelicityAmplitudeBuilder.set_dynamics` is a convenience interface for replacing the dynamics for intermediate states."
139139
]
140140
},
141141
{

docs/usage/step3.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
"outputs": [],
161161
"source": [
162162
"initial_parameters = {\n",
163-
" \"C[J/\\\\psi(1S) \\\\to f_{0}(1500)_{0} \\\\gamma_{+1};f_{0}(1500) \\\\to \\\\pi^{0}_{0} \\\\pi^{0}_{0}]\": 1.0\n",
163+
" \"C[J/\\\\psi(1S) \\\\to f_{0}(1500)_{0} \\\\gamma_{+1}; f_{0}(1500) \\\\to \\\\pi^{0}_{0} \\\\pi^{0}_{0}]\": 1.0\n",
164164
" + 0.0j,\n",
165165
" \"Gamma_f(0)(980)\": 0.15,\n",
166166
" \"Gamma_f(0)(1500)\": 0.2,\n",
@@ -576,7 +576,7 @@
576576
"outputs": [],
577577
"source": [
578578
"model.components[\n",
579-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1370)_{0} \\gamma_{+1};f_{0}(1370)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\"\n",
579+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1370)_{0} \\gamma_{+1}; f_{0}(1370)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\"\n",
580580
"].subs(model.parameter_defaults).doit()"
581581
]
582582
},
@@ -598,11 +598,11 @@
598598
"from_amplitudes = create_intensity_component(\n",
599599
" model,\n",
600600
" components=[\n",
601-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(500)_{0} \\gamma_{+1};f_{0}(500)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
602-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(980)_{0} \\gamma_{+1};f_{0}(980)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
603-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1370)_{0} \\gamma_{+1};f_{0}(1370)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
604-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1500)_{0} \\gamma_{+1};f_{0}(1500)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
605-
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1710)_{0} \\gamma_{+1};f_{0}(1710)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
601+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(500)_{0} \\gamma_{+1}; f_{0}(500)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
602+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(980)_{0} \\gamma_{+1}; f_{0}(980)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
603+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1370)_{0} \\gamma_{+1}; f_{0}(1370)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
604+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1500)_{0} \\gamma_{+1}; f_{0}(1500)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
605+
" R\"A[J/\\psi(1S)_{+1} \\to f_{0}(1710)_{0} \\gamma_{+1}; f_{0}(1710)_{0} \\to \\pi^{0}_{0} \\pi^{0}_{0}]\",\n",
606606
" ],\n",
607607
" backend=\"numpy\",\n",
608608
")\n",

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ python_requires = >=3.6, <3.9
4040
setup_requires =
4141
setuptools_scm
4242
install_requires =
43-
ampform == 0.8.*
43+
ampform >= 0.8, < 0.10
4444
iminuit >= 2.0
4545
numpy
4646
phasespace >= 1.2.0

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def estimator(
139139
def free_parameters() -> Dict[str, ParameterValue]:
140140
# pylint: disable=line-too-long
141141
return {
142-
"C[J/\\psi(1S) \\to f_{0}(980)_{0} \\gamma_{+1};f_{0}(980) \\to \\pi^{0}_{0} \\pi^{0}_{0}]": 1.0
142+
R"C[J/\psi(1S) \to f_{0}(980)_{0} \gamma_{+1}; f_{0}(980) \to \pi^{0}_{0} \pi^{0}_{0}]": 1.0
143143
+ 0.0j,
144144
"Gamma_f(0)(500)": 0.3,
145145
"m_f(0)(980)": 1,

tests/test_model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pylint: disable=redefined-outer-name
1+
# pylint: disable=line-too-long, redefined-outer-name
22
import numpy as np
33
import pytest
44
import sympy as sp
@@ -52,8 +52,8 @@ def test_complex_amplitude(
5252

5353
def test_canonical(canonical_model: SympyModel):
5454
assert set(canonical_model.parameters) == {
55-
"C[J/\\psi(1S) \\to f_{0}(980)_{0} \\gamma_{+1};f_{0}(980) \\to \\pi^{0}_{0} \\pi^{0}_{0}]",
56-
"C[J/\\psi(1S) \\to f_{0}(500)_{0} \\gamma_{+1};f_{0}(500) \\to \\pi^{0}_{0} \\pi^{0}_{0}]",
55+
R"C[J/\psi(1S) \to f_{0}(980)_{0} \gamma_{+1}; f_{0}(980) \to \pi^{0}_{0} \pi^{0}_{0}]",
56+
R"C[J/\psi(1S) \to f_{0}(500)_{0} \gamma_{+1}; f_{0}(500) \to \pi^{0}_{0} \pi^{0}_{0}]",
5757
"m_f(0)(980)",
5858
"Gamma_f(0)(980)",
5959
"m_f(0)(500)",
@@ -63,8 +63,8 @@ def test_canonical(canonical_model: SympyModel):
6363

6464
def test_helicity(helicity_model: SympyModel):
6565
assert set(helicity_model.parameters) == {
66-
"C[J/\\psi(1S) \\to f_{0}(980)_{0} \\gamma_{+1};f_{0}(980) \\to \\pi^{0}_{0} \\pi^{0}_{0}]",
67-
"C[J/\\psi(1S) \\to f_{0}(500)_{0} \\gamma_{+1};f_{0}(500) \\to \\pi^{0}_{0} \\pi^{0}_{0}]",
66+
R"C[J/\psi(1S) \to f_{0}(980)_{0} \gamma_{+1}; f_{0}(980) \to \pi^{0}_{0} \pi^{0}_{0}]",
67+
R"C[J/\psi(1S) \to f_{0}(500)_{0} \gamma_{+1}; f_{0}(500) \to \pi^{0}_{0} \pi^{0}_{0}]",
6868
"m_f(0)(980)",
6969
"Gamma_f(0)(980)",
7070
"m_f(0)(500)",

tests/test_physics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def test_create_intensity_component(
1717
from_amplitudes = create_intensity_component(
1818
model,
1919
components=[
20-
R"A[J/\psi(1S)_{+1} \to f_{0}(500)_{0} \gamma_{+1};f_{0}(500)_{0} \to \pi^{0}_{0} \pi^{0}_{0}]",
21-
R"A[J/\psi(1S)_{+1} \to f_{0}(980)_{0} \gamma_{+1};f_{0}(980)_{0} \to \pi^{0}_{0} \pi^{0}_{0}]",
20+
R"A[J/\psi(1S)_{+1} \to f_{0}(500)_{0} \gamma_{+1}; f_{0}(500)_{0} \to \pi^{0}_{0} \pi^{0}_{0}]",
21+
R"A[J/\psi(1S)_{+1} \to f_{0}(980)_{0} \gamma_{+1}; f_{0}(980)_{0} \to \pi^{0}_{0} \pi^{0}_{0}]",
2222
],
2323
backend="numpy",
2424
)

0 commit comments

Comments
 (0)