diff --git a/docs/usage/helicity/spin-alignment.ipynb b/docs/usage/helicity/spin-alignment.ipynb index c04d79588..99675d234 100644 --- a/docs/usage/helicity/spin-alignment.ipynb +++ b/docs/usage/helicity/spin-alignment.ipynb @@ -89,6 +89,7 @@ "from IPython.display import Math\n", "\n", "import ampform\n", + "from ampform.helicity import HelicityModel\n", "from ampform.io import aslatex, improve_latex_rendering\n", "\n", "LOGGER = logging.getLogger()\n", @@ -166,6 +167,41 @@ "non_aligned_model.intensity" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The symbols for the amplitudes are defined through {attr}`.HelicityModel.amplitudes`:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "jupyter": { + "source_hidden": true + }, + "tags": [ + "full-width", + "hide-input" + ] + }, + "outputs": [], + "source": [ + "def render_amplitudes(model: HelicityModel) -> Math:\n", + " selected_amplitudes = {\n", + " symbol: expr\n", + " for i, (symbol, expr) in enumerate(model.amplitudes.items())\n", + " if i % 5 == 0\n", + " }\n", + " src = aslatex(selected_amplitudes)\n", + " src = src.replace(R\"\\end{array}\", R\"& \\dots \\\\ \\end{array}\")\n", + " return Math(src)\n", + "\n", + "\n", + "render_amplitudes(non_aligned_model)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -179,7 +215,11 @@ "source": [ "One way of aligning the spins of each sub-system, is Dalitz-Plot Decomposition (DPD) {cite}`mikhasenkoDalitzplotDecompositionThreebody2020`. DPD **can only be used for three-body decays**, but results in a quite condense amplitude model expression.\n", "\n", - "We can select DPD alignment as follows:" + "We can select DPD alignment as follows:\n", + "\n", + ":::{warning}\n", + "The {class}`.DalitzPlotDecomposition` is not yet fully functional for reactions with a polarized initial or final state. In this example, the sums inside the incoherent sum should also include $\\lambda_0=0$.\n", + ":::" ] }, { @@ -260,6 +300,34 @@ "Math(src)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that the amplitudes are the same as those in the non-aligned model:\n", + "\n", + ":::{warning}\n", + "This behavior is a bug that will be fixed through [ComPWA/ampform#318](https://github.com/ComPWA/ampform/issues/318).\n", + ":::" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "jupyter": { + "source_hidden": true + }, + "tags": [ + "full-width", + "hide-input" + ] + }, + "outputs": [], + "source": [ + "render_amplitudes(dpd_model)" + ] + }, { "cell_type": "markdown", "metadata": {