Skip to content

Commit

Permalink
build: upgrade to AmpForm v0.11.0 (#50)
Browse files Browse the repository at this point in the history
* ci: remove redundant ignores sphinx-autobuild
* fix: remove typos about page
* fix: set lower limit on TensorWaves for jax
* build: require AmpForm v0.11.*
* fix: link to own develop page
* fix: update links to new AmpForm API
* docs: update notebooks to AmpForm v0.11.x
* docs: freeze TR-009
* docs: freeze TR-010
  • Loading branch information
redeboer committed Aug 30, 2021
1 parent 5007085 commit 139148f
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 86 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"imag",
"infty",
"iplt",
"ipykernel",
"ipympl",
"ipynb",
"ipyplot",
Expand All @@ -153,6 +154,7 @@
"mathbb",
"mathop",
"mathrm",
"mathtt",
"maxdepth",
"meshgrid",
"multiline",
Expand Down
6 changes: 3 additions & 3 deletions demo/analytic-continuation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@
"$\n",
"\n",
"with:\n",
"- $\\rho$ the normal [`phase_space_factor`](https://ampform.readthedocs.io/en/stable/api/ampform.dynamics.html#ampform.dynamics.phase_space_factor)\n",
"- $\\rho$ the normal [`PhaseSpaceFactor`](https://ampform.readthedocs.io/en/stable/api/ampform.dynamics.html#ampform.dynamics.PhaseSpaceFactor)\n",
"- $n_a^2$ the same as [`BlattWeisskopfSquared`](https://ampform.readthedocs.io/en/stable/api/ampform.dynamics.html#ampform.dynamics.BlattWeisskopfSquared)"
]
},
Expand Down Expand Up @@ -1790,7 +1790,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1804,7 +1804,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.11"
},
"livereveal": {
"autolaunch": true
Expand Down
12 changes: 6 additions & 6 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ ComPWA attempts to break this with the following ideals:
- Follow industry standards and tools (e.g.
{doc}`ticket system, CI, ADR, etc... </develop>`).

The points is crucial. ComPWA rather sacrifices functionality for design and
developer experience related developments. Many other frameworks have started
with the same ideal of having a good software design etc., but soon begin to
drop those ideals for the understandable reasons described above. We believe
that only by sticking to those ideals, it is possible to maintain a long-term
and collaboration-independent common tool.
The first point is crucial. ComPWA rather sacrifices functionality for design
and developer experience related developments. Many other frameworks have
started with the same ideal of having a good software design etc., but soon
begin to drop those ideals for the understandable reasons described above. We
believe that only by sticking to those ideals, it is possible to maintain a
long-term and collaboration-independent common tool.

## Developer Experience

Expand Down
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@
"report/003*",
"report/006*",
"report/008*",
"report/009*",
"report/010*",
]
nb_output_stderr = "remove"
nb_render_priority = {
Expand Down Expand Up @@ -208,8 +210,8 @@
"run_interactive": f"""
```{{margin}}
Run this notebook [on Binder]({BINDER_LINK}) or
{{ref}}`locally on Jupyter Lab <pwa:develop:Jupyter Notebooks>` to
interactively modify the parameters.
{{ref}}`locally on Jupyter Lab <develop:Jupyter Notebooks>` to interactively
modify the parameters.
```
"""
}
Expand Down
6 changes: 3 additions & 3 deletions docs/report/000.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
"source": [
"**There is a problem with this approach though**: once input data is complex, _all_ square roots in a larger expression (some amplitude model) compute imaginary solutions for negative values, while this is not always the desired behavior.\n",
"\n",
"Take for instance the two square roots appearing in {func}`~ampform.dynamics.phase_space_factor` --- does the $\\sqrt{s}$ also have to be evaluatable for negative $s$?"
"Take for instance the two square roots appearing in {class}`~ampform.dynamics.PhaseSpaceFactor` --- does the $\\sqrt{s}$ also have to be evaluatable for negative $s$?"
]
},
{
Expand Down Expand Up @@ -839,7 +839,7 @@
"metadata": {
"keep_output": true,
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -853,7 +853,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.11"
},
"toc-autonumbering": true,
"toc-showcode": false,
Expand Down
8 changes: 4 additions & 4 deletions docs/report/003.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For comparison, we plot the Chew-Mandelstam function for $S$-waves next to AmpForm's {func}`~ampform.dynamics.phase_space_factor_complex`. Have a look at the resulting plots and compare to Figure 49.3 on {pdg-review}`2020; Resonances; p.10`."
"For comparison, we plot the Chew-Mandelstam function for $S$-waves next to AmpForm's {class}`~ampform.dynamics.PhaseSpaceFactorComplex`. Have a look at the resulting plots and compare to Figure 49.3 on {pdg-review}`2020; Resonances; p.10`."
]
},
{
Expand Down Expand Up @@ -1226,7 +1226,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For $\\rho_a$, we use AmpForm's {func}`~ampform.dynamics.phase_space_factor`:"
"For $\\rho_a$, we use AmpForm's {class}`~ampform.dynamics.PhaseSpaceFactor`:"
]
},
{
Expand Down Expand Up @@ -2337,7 +2337,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -2351,7 +2351,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.11"
}
},
"nbformat": 4,
Expand Down
12 changes: 6 additions & 6 deletions docs/report/004.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"import numpy as np\n",
"import sympy as sp\n",
"from ampform.dynamics import (\n",
" phase_space_factor,\n",
" PhaseSpaceFactor,\n",
" relativistic_breit_wigner_with_ff,\n",
")\n",
"from IPython.display import Math\n",
Expand Down Expand Up @@ -99,7 +99,7 @@
"source": [
"s = sp.Symbol(\"s\")\n",
"m1, m2 = sp.symbols(\"m1 m2\", real=True)\n",
"rho = 16 * sp.pi * phase_space_factor(s, m1, m2)\n",
"rho = 16 * sp.pi * PhaseSpaceFactor(s, m1, m2).doit()\n",
"rho"
]
},
Expand Down Expand Up @@ -297,7 +297,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Interactive reproduction of Figure 49.1 on {pdg-review}`2020; Resonances; p.2`. The formulas below come from a {func}`~ampform.dynamics.relativistic_breit_wigner_with_ff` with $L=0$. As phase space factor, we used the square root of {func}`~ampform.dynamics.breakup_momentum_squared` instead of the default {func}`~ampform.dynamics.phase_space_factor`, because this introduces only one branch point in the $s$-plane (namely the one over the nominator)."
"Interactive reproduction of Figure 49.1 on {pdg-review}`2020; Resonances; p.2`. The formulas below come from a {func}`~ampform.dynamics.relativistic_breit_wigner_with_ff` with $L=0$. As phase space factor, we used the square root of {class}`~ampform.dynamics.BreakupMomentumSquared` instead of the default {class}`~ampform.dynamics.PhaseSpaceFactor`, because this introduces only one branch point in the $s$-plane (namely the one over the nominator)."
]
},
{
Expand All @@ -313,11 +313,11 @@
},
"outputs": [],
"source": [
"from ampform.dynamics import breakup_momentum_squared\n",
"from ampform.dynamics import BreakupMomentumSquared\n",
"\n",
"\n",
"def breakup_momentum(s: sp.Symbol, m_a: sp.Symbol, m_b: sp.Symbol) -> sp.Expr:\n",
" return sp.sqrt(breakup_momentum_squared(s, m_a, m_b))\n",
" return sp.sqrt(BreakupMomentumSquared(s, m_a, m_b).doit())\n",
"\n",
"\n",
"s = sp.Symbol(\"s\")\n",
Expand Down Expand Up @@ -497,7 +497,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
Binary file added docs/report/009-interactive-plot.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 139148f

Please sign in to comment.