Skip to content

Commit fa002c0

Browse files
committed
DOC: explain implementationm
1 parent 6142f93 commit fa002c0

File tree

2 files changed

+67
-3
lines changed

2 files changed

+67
-3
lines changed

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@
266266
"isospin",
267267
"itertools",
268268
"jupyter",
269+
"Kronrod",
269270
"Källén",
270271
"lambdification",
271272
"lambdified",

docs/usage/dynamics/integration-algorithms.ipynb

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,27 @@
7878
"cell_type": "markdown",
7979
"metadata": {},
8080
"source": [
81+
"The dispersion integral of the phasespace factor cannot be solved analytically for higher angular momenta ($\\ell > 0$). We therefore need to perform a numerical integration. However, since the integrand of the dispersion integral contains singularities, it is important to choose the numerical integration algorithm.\n",
82+
"\n",
83+
"This notebook contains an interactive widget that shows the numerical stability and performance of different numerical integration algorithms when computing the dispersion integral along (close to) the real axis of the complex energy plane.\n",
84+
"\n",
85+
":::{tip}\n",
86+
"The conclusion is that [Romberg's method](https://en.wikipedia.org/wiki/Romberg%27s_method) ({func}`quadax.romberg`) is the best choice for computing the dispersion integral close to the physical (real) axis. For computing the dispersion integral further away from the axis, the [Gauss-Kronrod method](https://en.wikipedia.org/wiki/Gauss%E2%80%93Kronrod_quadrature_formula) (e.g. {func}`quadax.quadgk`) are accurate enough and faster than Romberg's method.\n",
87+
"\n",
88+
"- Use {func}`quadax.romberg` when computing the dispersion integral for an amplitude model fit (physical axis).\n",
89+
"- Use {func}`quadax.quadgk` when determining the pole positions of the amplitude model (complex plane).\n",
90+
"\n",
91+
":::"
92+
]
93+
},
94+
{
95+
"cell_type": "markdown",
96+
"metadata": {},
97+
"source": [
98+
"## Chew–Mandelstam dispersion integral\n",
99+
"\n",
100+
"The general form of the Chew–Mandelstam dispersion integral $\\Sigma_\\ell(s)$ is an integral over the product $\\rho(s) \\, n_\\ell^2(s)$ of the phase space factor $\\rho(s)$ ({obj}`.PhaseSpaceFactor`) and the square of the form factor $n_\\ell^2(s)$ ({obj}`.FormFactor`). The required formulas are:\n",
101+
"\n",
81102
"```{autolink-skip}\n",
82103
"\n",
83104
"```"
@@ -121,6 +142,43 @@
121142
"Math(src)"
122143
]
123144
},
145+
{
146+
"cell_type": "markdown",
147+
"metadata": {},
148+
"source": [
149+
"Here, $i\\epsilon$ indicates that $\\Sigma_\\ell(s)$ with $s\\in\\mathbb{R}$ is formulated just above the real axis in order to avoid $s'-s=0$. However, as can be seen in the widget below, $i\\epsilon$ is not required when $s\\in\\mathbb{C}$, giving us the general form:\n",
150+
"\n",
151+
"$$\n",
152+
"\\begin{aligned}\n",
153+
"\\Sigma_\\ell\\left(s\\right) \\;&=\\; \\frac{s - s_\\mathrm{thr}}{\\pi}\n",
154+
" \\int\\limits_{s_\\mathrm{thr}}^{\\infty}\n",
155+
" \\frac\n",
156+
" {\\rho\\!\\left(s'\\right) n_\\ell^2\\!\\left(s'\\right) ds'}\n",
157+
" {\\left(s' - s_\\mathrm{thr}\\right) \\left(s'- s\\right)} \\\\\n",
158+
"n_\\ell^2(s') \\;&=\\; \\mathcal{F}_\\ell^2\\!\\left(s', m_1, m_2\\right) \\\\\n",
159+
"s_\\mathrm{thr} \\;&=\\; (m_1 + m_2)^2\n",
160+
"\\end{aligned}\n",
161+
"$$\n",
162+
"\n",
163+
"The reason is that the function $\\rho(s')\\,n_\\ell^2(s')$ does not have a branch cut along the real axis above the $s_\\mathrm{thr}$ threshold, so there is no need to approach some contour around such a potential discontinuity. The form of the dispersion integral is explained and derived [here](https://redeboer.github.io/phd-thesis/chapter2#sec-analytic-continuation).\n",
164+
"\n",
165+
"When using this form of the dispersion integral to compute $\\Sigma_\\ell(s)$ for $s\\in\\mathbb{R}$, the caller should use the fact that $\\lim_{\\epsilon\\to 0^+} \\Sigma_\\ell(s + i\\epsilon)$. In the numerical implementation, that means giving `s + epsilon * 1j` as input when `s` is a array with `float`s. The challenge is to find a value for $\\epsilon$: the smaller the value for $\\epsilon$, the closer we are to the physical axis, but the less accurate the numerical integration becomes. The widget below allows you to explore this trade-off for different numerical integration algorithms."
166+
]
167+
},
168+
{
169+
"cell_type": "markdown",
170+
"metadata": {},
171+
"source": [
172+
"## Numerical implementation"
173+
]
174+
},
175+
{
176+
"cell_type": "markdown",
177+
"metadata": {},
178+
"source": [
179+
"In this notebook, we implement the formulas [listed above](#chewmandelstam-dispersion-integral) numerical rather than lambdifying the symbolic expressions, so that we have full control over the numerical implementation and to make the implementation recognizable to pure array-oriented workflows."
180+
]
181+
},
124182
{
125183
"cell_type": "code",
126184
"execution_count": null,
@@ -206,9 +264,7 @@
206264
"cell_type": "markdown",
207265
"metadata": {},
208266
"source": [
209-
"In the case of S-waves, we can compare the result of the integration to the analytical result.\n",
210-
"\n",
211-
"Note that in this case, we define the break-up momentum in the same way as in {class}`.BreakupMomentum`, because in the widget below, we only evaluate this function along the real axis, where the cut structure doesn't matter and we prefer performance (see {ref}`usage/dynamics/analytic-continuation:Numerical precision and performance`)."
267+
"In the case of $S$-waves ($\\ell=0$), we can compare the result of the integration to the analytical solution to the integral:"
212268
]
213269
},
214270
{
@@ -253,6 +309,13 @@
253309
" )"
254310
]
255311
},
312+
{
313+
"cell_type": "markdown",
314+
"metadata": {},
315+
"source": [
316+
"## Interactive visualization"
317+
]
318+
},
256319
{
257320
"cell_type": "code",
258321
"execution_count": null,

0 commit comments

Comments
 (0)