diff --git a/.cspell.json b/.cspell.json index ba3f72e9..d40af59a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -139,6 +139,7 @@ "nbformat", "nbins", "nbody", + "nbsp", "nbsphinx", "ncalls", "ncols", diff --git a/docs/amplitude-analysis.ipynb b/docs/amplitude-analysis.ipynb index 7836506f..52ff4bf4 100644 --- a/docs/amplitude-analysis.ipynb +++ b/docs/amplitude-analysis.ipynb @@ -473,7 +473,40 @@ "raw_mimetype": "text/restructuredtext" }, "source": [ - "The resulting phase space sample is a {obj}`dict` of final state IDs to an {obj}`~numpy.array` of four-momenta. In the last step, we converted this sample in such a way that it is rendered as an understandable {class}`pandas.DataFrame`." + "The resulting phase space sample is a {obj}`dict` of final state IDs to an {obj}`~numpy.array` of four-momenta. In the last step, we converted this sample in such a way that it is rendered as an understandable {class}`pandas.DataFrame`.\n", + "\n", + ":::{admonition} Four-momentum arrays\n", + "{doc}`Kinematic expressions ` from AmpForm that involve four-momenta should be formatted as $\\left(E, p_x, p_y, p_z\\right)$. In addition, the shape of input arrays should be `(n, 4)` with `n` the number of events.\n", + ":::\n", + "\n", + ":::{warning}\n", + "When using the helicity formalism, the sum of the four-momenta should be in the rest frame, that is $\\sum_i p_i = \\left(m_A, 0, 0, 0\\right)$ with $m_A$ the mass of the decaying particle $A$. This is because the helicity formalisms boosts through the decay chain starting from particle $A$. **Take care to boost your experimental data into the rest frame**, optionally following the {doc}`kinematics classes provided by AmpForm `.\n", + ":::" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "\n", + "p = np.array(list(phsp_momenta.values()))\n", + "p.shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "p.sum(axis=0).round(decimals=14)" ] }, { @@ -637,6 +670,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ + "::::{note}\n", + "Check the remark about four-momentum format and rest frame of the decaying particle [here](compwa-step-2.1).\n", + "::::\n", + "\n", "The {obj}`.DataSample` is a mapping of kinematic variables names to a 1-dimensional array of values. The numbers you see here are final state IDs as defined in the {class}`~ampform.helicity.HelicityModel` member of the {class}`~ampform.helicity.HelicityModel`:" ] },