Skip to content

Commit

Permalink
docs: show unaligned amplitudes in spin alignment page (#321)
Browse files Browse the repository at this point in the history
* docs: add warning about missing λ=0
  • Loading branch information
redeboer authored Aug 9, 2022
1 parent 3541958 commit 54895fa
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion docs/usage/helicity/spin-alignment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {},
Expand All @@ -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",
":::"
]
},
{
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 54895fa

Please sign in to comment.