Skip to content

Commit

Permalink
docs: add Mandelstam variable illustration
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Mar 31, 2021
1 parent 15b5f9d commit a8f2d7f
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
"doctests",
"eval",
"expertsystem",
"figsize",
"fontsize",
"frameon",
"genindex",
"graphviz",
"htmlcov",
Expand Down Expand Up @@ -137,6 +140,7 @@
"venv",
"xlabel",
"xlim",
"ylabel"
"ylabel",
"ylim"
]
}
97 changes: 97 additions & 0 deletions docs/theory/introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,103 @@
"source": [
"## Isobar model"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Mandelstam variables"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"from feynman import Diagram\n",
"\n",
"fig, ax = plt.subplots(1, 3, figsize=(9, 3), frameon=False, tight_layout=True)\n",
"fig.patch.set_visible(False)\n",
"for a in ax:\n",
" a.axis(\"off\")\n",
" a.set_xlim(0, 1)\n",
" a.set_ylim(0, 0.8)\n",
"\n",
"s_channel = Diagram(ax[0])\n",
"# Vertices\n",
"v_p1 = s_channel.vertex(xy=(0.1, 0.7), marker=\"\")\n",
"v_p2 = s_channel.vertex(v_p1.xy, dy=-0.6, marker=\"\")\n",
"v_p3 = s_channel.vertex(v_p1.xy, dx=0.8, marker=\"\")\n",
"v_p4 = s_channel.vertex(v_p3.xy, dy=-0.6, marker=\"\")\n",
"v1 = s_channel.vertex(v_p1.xy, dx=0.2, dy=-0.3, marker=\"\")\n",
"v2 = s_channel.vertex(v_p3.xy, dx=-0.2, dy=-0.3, marker=\"\")\n",
"# Lines\n",
"p1 = s_channel.line(v_p1, v1, arrow=False)\n",
"p2 = s_channel.line(v1, v_p2, arrow=False)\n",
"interaction = s_channel.line(v1, v2, style=\"dotted\", arrow=False)\n",
"e4 = s_channel.line(v2, v_p3, arrow=False)\n",
"e5 = s_channel.line(v_p4, v2, arrow=False)\n",
"# Labels\n",
"v_p1.text(\"$p_1$\", x=-0.06, y=0)\n",
"v_p2.text(\"$p_2$\", x=-0.06, y=0)\n",
"v_p3.text(\"$p_3$\", x=+0.06, y=0)\n",
"v_p4.text(\"$p_4$\", x=+0.06, y=0)\n",
"s_channel.text(0.5, 0, \"$s$-channel\", fontsize=15)\n",
"s_channel.plot();\n",
"\n",
"t_channel = Diagram(ax[1])\n",
"# Vertices\n",
"v_p1 = t_channel.vertex(xy=(0.1, 0.7), marker=\"\")\n",
"v_p2 = t_channel.vertex(v_p1.xy, dy=-0.6, marker=\"\")\n",
"v_p3 = t_channel.vertex(v_p1.xy, dx=0.8, marker=\"\")\n",
"v_p4 = t_channel.vertex(v_p3.xy, dy=-0.6, marker=\"\")\n",
"v1 = t_channel.vertex(v_p1.xy, dx=0.4, dy=-0.15, marker=\"\")\n",
"v2 = t_channel.vertex(v_p2.xy, dx=0.4, dy=+0.15, marker=\"\")\n",
"# Lines\n",
"p1 = t_channel.line(v_p1, v1, arrow=False)\n",
"p2 = t_channel.line(v1, v_p3, arrow=False)\n",
"interaction = t_channel.line(v1, v2, style=\"dotted\", arrow=False)\n",
"e4 = t_channel.line(v2, v_p2, arrow=False)\n",
"e5 = t_channel.line(v_p4, v2, arrow=False)\n",
"# Labels\n",
"v_p1.text(\"$p_1$\", x=-0.06, y=0)\n",
"v_p2.text(\"$p_2$\", x=-0.06, y=0)\n",
"v_p3.text(\"$p_3$\", x=+0.06, y=0)\n",
"v_p4.text(\"$p_4$\", x=+0.06, y=0)\n",
"t_channel.text(0.5, 0, \"$t$-channel\", fontsize=15)\n",
"t_channel.plot();\n",
"\n",
"u_channel = Diagram(ax[2])\n",
"# Vertices\n",
"v_p1 = u_channel.vertex(xy=(0.1, 0.7), marker=\"\")\n",
"v_p2 = u_channel.vertex(v_p1.xy, dy=-0.6, marker=\"\")\n",
"v_p3 = u_channel.vertex(v_p1.xy, dx=0.8, marker=\"\")\n",
"v_p4 = u_channel.vertex(v_p3.xy, dy=-0.6, marker=\"\")\n",
"v1 = u_channel.vertex(v_p1.xy, dx=0.4, dy=-0.15, marker=\"\")\n",
"v2 = u_channel.vertex(v_p2.xy, dx=0.4, dy=+0.15, marker=\"\")\n",
"# Lines\n",
"p1 = u_channel.line(v_p1, v1, arrow=False)\n",
"p2 = u_channel.line(v1, v_p4, arrow=False)\n",
"interaction = u_channel.line(v1, v2, style=\"dotted\", arrow=False)\n",
"e4 = u_channel.line(v2, v_p2, arrow=False)\n",
"e5 = u_channel.line(v_p3, v2, arrow=False)\n",
"# Labels\n",
"v_p1.text(\"$p_1$\", x=-0.06, y=0)\n",
"v_p2.text(\"$p_2$\", x=-0.06, y=0)\n",
"v_p3.text(\"$p_3$\", x=+0.06, y=0)\n",
"v_p4.text(\"$p_4$\", x=+0.06, y=0)\n",
"u_channel.text(0.5, 0, \"$u$-channel\", fontsize=15)\n",
"u_channel.plot();"
]
}
],
"metadata": {
Expand Down

0 comments on commit a8f2d7f

Please sign in to comment.