From 366ba4ecc6b1ba9727ab0cd51f95c12e1005c21d Mon Sep 17 00:00:00 2001 From: shenvitor Date: Fri, 10 Nov 2023 17:34:45 +0100 Subject: [PATCH 1/9] add lec11 --- docs/lecture11.ipynb | 136 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 docs/lecture11.ipynb diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb new file mode 100644 index 0000000..1100908 --- /dev/null +++ b/docs/lecture11.ipynb @@ -0,0 +1,136 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "087f68c1-f88d-43b6-9494-26da5bc621ca", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "# Lecture 11 Helicity Formalism\n", + "based on [Lecture 11](https://indico.ific.uv.es/event/6803/contributions/21223) by Vincent Mathieu " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2b01c249-f183-4faf-9ccd-d6069f678467", + "metadata": {}, + "outputs": [], + "source": [ + "%pip install -q gdown matplotlib numpy" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "3e1d9835-1f27-4dcf-b359-3937ec89236b", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "import warnings\n", + "\n", + "import gdown\n", + "import numpy as np\n", + "\n", + "# from IPython.display import display\n", + "\n", + "warnings.filterwarnings(\"ignore\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "62d3b045-8dab-4e5a-92d7-07d2d5af4c79", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "# https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\n", + "filename = gdown.cached_download(\n", + " url=\"https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\",\n", + " # path=\"data/Three-particles-3.dat\",\n", + " # md5=\"a49ebfd97ae6a02023291df665ab924c\",\n", + " quiet=True,\n", + " verify=False,\n", + ")\n", + "data = np.loadtxt(filename)\n", + "data.shape" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "166252ab-57a2-4628-88e1-32ab8f354f89", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "adfe5fbb-ab7b-41b2-8a8c-8f0bac0ce009", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "n_final_state = 3\n", + "pa, p1, p2, p3 = (data[i::4].T for i in range(n_final_state + 1))\n", + "p0 = p1 + p2 + p3\n", + "pb = p0 - pa" + ] + } + ], + "metadata": { + "colab": { + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From 05849b22faf677a0d6149dc1fde37388b451a403 Mon Sep 17 00:00:00 2001 From: shenvitor Date: Wed, 15 Nov 2023 15:12:15 +0100 Subject: [PATCH 2/9] lecture 11 Dalitz plot --- docs/lecture11.ipynb | 138 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 136 insertions(+), 2 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 1100908..83a6183 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -12,6 +12,7 @@ }, "source": [ "# Lecture 11 Helicity Formalism\n", + "The example in lecture 11\n", "based on [Lecture 11](https://indico.ific.uv.es/event/6803/contributions/21223) by Vincent Mathieu " ] }, @@ -42,8 +43,7 @@ "\n", "import gdown\n", "import numpy as np\n", - "\n", - "# from IPython.display import display\n", + "from IPython.display import display\n", "\n", "warnings.filterwarnings(\"ignore\")" ] @@ -89,6 +89,16 @@ "data" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "b4daf861-8efe-48a5-971a-6925d44675cd", + "metadata": {}, + "outputs": [], + "source": [ + "# data[0::4]" + ] + }, { "cell_type": "code", "execution_count": null, @@ -107,6 +117,130 @@ "p0 = p1 + p2 + p3\n", "pb = p0 - pa" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d10177c3-02c4-4248-8d0e-181a28453be5", + "metadata": {}, + "outputs": [], + "source": [ + "def mass(p: np.ndarray) -> np.ndarray:\n", + " return np.sqrt(mass_squared(p))\n", + "\n", + "\n", + "def mass_squared(p: np.ndarray) -> np.ndarray:\n", + " return p[0] ** 2 - np.sum(p[1:] ** 2, axis=0)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "adc55b5b-8490-4587-b468-848b32873eee", + "metadata": {}, + "outputs": [], + "source": [ + "m0 = mass(p0)\n", + "print(f\"{m0.mean():.4g} +/- {m0.std():.4g}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "59a10ead-6653-4344-ab55-f85f2f8fbbde", + "metadata": {}, + "outputs": [], + "source": [ + "from IPython.display import Math\n", + "\n", + "display(Math(Rf\"m_a = {mass(pa).mean():.3g}\\text{{ GeV}}\"))\n", + "display(Math(Rf\"m_b = {mass(pb).mean():.3g}\\text{{ GeV}}\"))\n", + "for i, p in enumerate([p0, p1, p2, p3]):\n", + " display(Math(Rf\"m_{i} = {mass(p).mean():.3g}\\text{{ GeV}}\"))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b63474a3-8445-49dc-97b8-20c3935853ce", + "metadata": {}, + "outputs": [], + "source": [ + "from particle import Particle\n", + "\n", + "\n", + "def find_candidates(\n", + " mass: float, delta: float = 0.001, charge: float | None = None\n", + ") -> list[Particle]:\n", + " def identify(p) -> bool:\n", + " if p.pdgid in {21}:\n", + " return False\n", + " if charge is not None and p.charge != charge:\n", + " return False\n", + " if (mass - delta) < 1e-3 * p.mass < (mass + delta):\n", + " return True\n", + " return False\n", + "\n", + " return Particle.findall(identify)\n", + "\n", + "\n", + "ma = mass(pa).mean()\n", + "mb = mass(pb).mean()\n", + "m1 = mass(p1).mean()\n", + "m2 = mass(p2).mean()\n", + "m3 = mass(p3).mean()\n", + "initial_state = (\n", + " find_candidates(ma.mean(), delta=1e-4)[0],\n", + " find_candidates(mb.mean())[0],\n", + ")\n", + "final_state = tuple(find_candidates(m.mean())[0] for m in [m1, m2, m3])\n", + "display(\n", + " Math(R\"\\text{Incoming: }\" + \", \".join(f\"{p.latex_name}\" for p in initial_state)),\n", + " Math(R\"\\text{Outgoing: }\" + \", \".join(f\"{p.latex_name}\" for p in final_state)),\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "24fce750-e6d7-40f1-9e24-dec0d85fc7b8", + "metadata": {}, + "source": [ + "a photon $\\gamma$ hitting a proton $p$ and producing a meson $\\eta$, pion $\\pi^0$, and proton $p$." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "376674d5-3bd0-458b-b5d8-3cc356c42f31", + "metadata": {}, + "outputs": [], + "source": [ + "s12 = mass_squared(p1 + p2)\n", + "s23 = mass_squared(p2 + p3)\n", + "s31 = mass_squared(p3 + p1)\n", + "\n", + "m12 = mass(p1 + p2)\n", + "m23 = mass(p2 + p3)\n", + "m31 = mass(p3 + p1)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dcef09fd-7994-4302-9e08-70b9950f9b84", + "metadata": {}, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "\n", + "fig, ax = plt.subplots()\n", + "fig.suptitle(\"Dalitz plot – 2D histogram\")\n", + "ax.hist2d(s12, s23, bins=100, cmin=1)\n", + "ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# fig.tight_layout()\n", + "plt.show()" + ] } ], "metadata": { From e245e7593b593eecbae02d2f1cbcbc3dbccca334 Mon Sep 17 00:00:00 2001 From: shenvitor Date: Wed, 15 Nov 2023 15:34:34 +0100 Subject: [PATCH 3/9] update Dalitz plot --- docs/lecture11.ipynb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 83a6183..002fbf8 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -89,16 +89,6 @@ "data" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "b4daf861-8efe-48a5-971a-6925d44675cd", - "metadata": {}, - "outputs": [], - "source": [ - "# data[0::4]" - ] - }, { "cell_type": "code", "execution_count": null, @@ -262,7 +252,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.13" + "version": "3.8.17" } }, "nbformat": 4, From a2e9b5f272ba7d383125e153fac2b30c14686d5f Mon Sep 17 00:00:00 2001 From: shenvitor Date: Fri, 17 Nov 2023 12:25:13 +0100 Subject: [PATCH 4/9] lec 11 more histogram and ending --- docs/lecture11.ipynb | 141 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 133 insertions(+), 8 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 002fbf8..91cd875 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -12,7 +12,7 @@ }, "source": [ "# Lecture 11 Helicity Formalism\n", - "The example in lecture 11\n", + "The example `Three-particles-3.dat` in lecture 11\n", "based on [Lecture 11](https://indico.ific.uv.es/event/6803/contributions/21223) by Vincent Mathieu " ] }, @@ -20,10 +20,18 @@ "cell_type": "code", "execution_count": null, "id": "2b01c249-f183-4faf-9ccd-d6069f678467", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ - "%pip install -q gdown matplotlib numpy" + "%pip install -q gdown matplotlib numpy particle" ] }, { @@ -39,6 +47,8 @@ }, "outputs": [], "source": [ + "from __future__ import annotations\n", + "\n", "import warnings\n", "\n", "import gdown\n", @@ -66,8 +76,8 @@ " url=\"https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\",\n", " # path=\"data/Three-particles-3.dat\",\n", " # md5=\"a49ebfd97ae6a02023291df665ab924c\",\n", - " quiet=True,\n", - " verify=False,\n", + " # quiet=True,\n", + " # verify=False,\n", ")\n", "data = np.loadtxt(filename)\n", "data.shape" @@ -202,7 +212,13 @@ "cell_type": "code", "execution_count": null, "id": "376674d5-3bd0-458b-b5d8-3cc356c42f31", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, "outputs": [], "source": [ "s12 = mass_squared(p1 + p2)\n", @@ -218,7 +234,15 @@ "cell_type": "code", "execution_count": null, "id": "dcef09fd-7994-4302-9e08-70b9950f9b84", - "metadata": {}, + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", @@ -231,6 +255,107 @@ "# fig.tight_layout()\n", "plt.show()" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "73754f3e-6b7a-42db-8f0a-cb5cb0f510b4", + "metadata": { + "editable": true, + "jupyter": { + "source_hidden": true + }, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "hide-cell" + ] + }, + "outputs": [], + "source": [ + "# fig, ax = plt.subplots()\n", + "# fig.suptitle(\"Dalitz plot – 2D histogram\")\n", + "# ax.hist2d(s23, s31, bins=100, cmin=1)\n", + "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# # fig.tight_layout()\n", + "# plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "07b54c8f-417a-417d-adcb-6ee4b59428f4", + "metadata": { + "editable": true, + "jupyter": { + "source_hidden": true + }, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "hide-cell" + ] + }, + "outputs": [], + "source": [ + "# fig, ax = plt.subplots()\n", + "# fig.suptitle(\"Dalitz plot – 2D histogram\")\n", + "# ax.hist2d(s31, s12, bins=100, cmin=1)\n", + "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# # fig.tight_layout()\n", + "# plt.show()" + ] + }, + { + "cell_type": "markdown", + "id": "360f674e-801c-4fda-aa3a-e57595e0da44", + "metadata": {}, + "source": [ + "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "95aa6945-6427-42ee-8105-9e600b193d03", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "outputs": [], + "source": [ + "# fig, ax = plt.subplots(3)\n", + "# fig.suptitle(\"1D histogram of each \")\n", + "# ax.hist2d(s12, s23, bins=100, cmin=1)\n", + "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "# # fig.tight_layout()\n", + "# plt.show()\n", + "\n", + "fig, (ax1, ax2, ax3) = plt.subplots(figsize=(12, 4), ncols=3)\n", + "fig.suptitle(\"1D histogram of $s_{12}, s_{23}$, and $s_{31}$\")\n", + "ax1.hist(s12, bins=100)\n", + "ax1.set_xlabel(R\"$s_{12}$\")\n", + "ax1.set_ylabel(\"counts\")\n", + "\n", + "ax2.hist(s23, bins=100)\n", + "ax2.set_xlabel(R\"$s_{23}$\")\n", + "ax2.set_ylabel(\"counts\")\n", + "\n", + "ax3.hist(s31, bins=100)\n", + "ax3.set_xlabel(R\"$s_{31}$\")\n", + "ax3.set_ylabel(\"counts\")\n", + "\n", + "fig.tight_layout()\n", + "plt.show()" + ] } ], "metadata": { @@ -252,7 +377,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.17" + "version": "3.10.13" } }, "nbformat": 4, From 75efcaedcb8c7461745b6315a36bb46854e902f1 Mon Sep 17 00:00:00 2001 From: shenvitor Date: Fri, 17 Nov 2023 13:59:29 +0100 Subject: [PATCH 5/9] gdown file hash --- docs/lecture11.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 91cd875..f102678 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -74,10 +74,10 @@ "# https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\n", "filename = gdown.cached_download(\n", " url=\"https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\",\n", - " # path=\"data/Three-particles-3.dat\",\n", - " # md5=\"a49ebfd97ae6a02023291df665ab924c\",\n", - " # quiet=True,\n", - " # verify=False,\n", + " path=\"data/Three-particles-3.dat\",\n", + " md5=\"75fedf381f9b62d3210ff200fc63165f\",\n", + " quiet=True,\n", + " verify=False,\n", ")\n", "data = np.loadtxt(filename)\n", "data.shape" From e3ed65b3cf6ac08ee3f684d80868769470ada351 Mon Sep 17 00:00:00 2001 From: shenvitor Date: Fri, 17 Nov 2023 14:11:07 +0100 Subject: [PATCH 6/9] cell tags modification --- docs/lecture11.ipynb | 81 ++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 60 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index f102678..8038b7b 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -26,7 +26,8 @@ "slide_type": "" }, "tags": [ - "hide-input" + "hide-input", + "remove-output" ] }, "outputs": [], @@ -40,10 +41,15 @@ "id": "3e1d9835-1f27-4dcf-b359-3937ec89236b", "metadata": { "editable": true, + "jupyter": { + "source_hidden": true + }, "slideshow": { "slide_type": "" }, - "tags": [] + "tags": [ + "hide-cell" + ] }, "outputs": [], "source": [ @@ -64,6 +70,9 @@ "id": "62d3b045-8dab-4e5a-92d7-07d2d5af4c79", "metadata": { "editable": true, + "jupyter": { + "source_hidden": true + }, "slideshow": { "slide_type": "" }, @@ -71,7 +80,6 @@ }, "outputs": [], "source": [ - "# https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\n", "filename = gdown.cached_download(\n", " url=\"https://indico.ific.uv.es/event/6803/contributions/21223/attachments/11221/15563/Three-particles-3.dat\",\n", " path=\"data/Three-particles-3.dat\",\n", @@ -236,6 +244,9 @@ "id": "dcef09fd-7994-4302-9e08-70b9950f9b84", "metadata": { "editable": true, + "jupyter": { + "source_hidden": true + }, "slideshow": { "slide_type": "" }, @@ -257,36 +268,23 @@ ] }, { - "cell_type": "code", - "execution_count": null, - "id": "73754f3e-6b7a-42db-8f0a-cb5cb0f510b4", + "cell_type": "markdown", + "id": "360f674e-801c-4fda-aa3a-e57595e0da44", "metadata": { "editable": true, - "jupyter": { - "source_hidden": true - }, "slideshow": { "slide_type": "" }, - "tags": [ - "hide-cell" - ] + "tags": [] }, - "outputs": [], "source": [ - "# fig, ax = plt.subplots()\n", - "# fig.suptitle(\"Dalitz plot – 2D histogram\")\n", - "# ax.hist2d(s23, s31, bins=100, cmin=1)\n", - "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# # fig.tight_layout()\n", - "# plt.show()" + "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." ] }, { "cell_type": "code", "execution_count": null, - "id": "07b54c8f-417a-417d-adcb-6ee4b59428f4", + "id": "95aa6945-6427-42ee-8105-9e600b193d03", "metadata": { "editable": true, "jupyter": { @@ -296,49 +294,12 @@ "slide_type": "" }, "tags": [ - "hide-cell" + "full-width", + "hide-input" ] }, "outputs": [], "source": [ - "# fig, ax = plt.subplots()\n", - "# fig.suptitle(\"Dalitz plot – 2D histogram\")\n", - "# ax.hist2d(s31, s12, bins=100, cmin=1)\n", - "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# # fig.tight_layout()\n", - "# plt.show()" - ] - }, - { - "cell_type": "markdown", - "id": "360f674e-801c-4fda-aa3a-e57595e0da44", - "metadata": {}, - "source": [ - "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "95aa6945-6427-42ee-8105-9e600b193d03", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, - "outputs": [], - "source": [ - "# fig, ax = plt.subplots(3)\n", - "# fig.suptitle(\"1D histogram of each \")\n", - "# ax.hist2d(s12, s23, bins=100, cmin=1)\n", - "# ax.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# ax.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "# # fig.tight_layout()\n", - "# plt.show()\n", - "\n", "fig, (ax1, ax2, ax3) = plt.subplots(figsize=(12, 4), ncols=3)\n", "fig.suptitle(\"1D histogram of $s_{12}, s_{23}$, and $s_{31}$\")\n", "ax1.hist(s12, bins=100)\n", From 548ba23042d96796ff8484e66e44fbcda02f8ad0 Mon Sep 17 00:00:00 2001 From: shenvitor Date: Fri, 17 Nov 2023 14:51:04 +0100 Subject: [PATCH 7/9] color change of resonance line --- docs/lecture11.ipynb | 68 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 8038b7b..1b84321 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -268,17 +268,48 @@ ] }, { - "cell_type": "markdown", - "id": "360f674e-801c-4fda-aa3a-e57595e0da44", + "cell_type": "code", + "execution_count": null, + "id": "3da3dd63-d9e1-4603-8167-2298619062e6", + "metadata": {}, + "outputs": [], + "source": [ + "R12 = 1.74\n", + "R23 = 1.53\n", + "R31 = 2.45" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9f8606f4-c64f-4f68-b88f-80f8de58b707", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, - "tags": [] + "tags": [ + "hide-input" + ] }, + "outputs": [], "source": [ - "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." + "fig, (ax1, ax2) = plt.subplots(figsize=(10, 4), ncols=2)\n", + "fig.suptitle(\"Dalitz plot – scatter plot\")\n", + "ax1.scatter(s12, s23, c=\"black\", s=1e-3)\n", + "ax1.set_xlabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "ax1.set_ylabel(R\"$s_{23}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "ax1.axvline(R12, c=\"C0\", ls=\"dashed\", label=\"$R_{12}$\")\n", + "ax1.axhline(R23, c=\"C1\", ls=\"dashed\", label=\"$R_{23}$\")\n", + "ax1.legend()\n", + "ax2.scatter(s31, s12, c=\"black\", s=1e-3)\n", + "ax2.set_xlabel(R\"$s_{31}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "ax2.set_ylabel(R\"$s_{12}\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", + "ax2.axvline(R31, c=\"C2\", ls=\"dashed\", label=\"$R_{31}$\")\n", + "ax2.axhline(R12, c=\"C0\", ls=\"dashed\", label=\"$R_{12}$\")\n", + "ax2.legend()\n", + "fig.tight_layout()\n", + "plt.show()" ] }, { @@ -287,9 +318,6 @@ "id": "95aa6945-6427-42ee-8105-9e600b193d03", "metadata": { "editable": true, - "jupyter": { - "source_hidden": true - }, "slideshow": { "slide_type": "" }, @@ -302,21 +330,41 @@ "source": [ "fig, (ax1, ax2, ax3) = plt.subplots(figsize=(12, 4), ncols=3)\n", "fig.suptitle(\"1D histogram of $s_{12}, s_{23}$, and $s_{31}$\")\n", - "ax1.hist(s12, bins=100)\n", + "ax1.hist(s12, bins=100, color=\"black\", histtype=\"step\")\n", "ax1.set_xlabel(R\"$s_{12}$\")\n", "ax1.set_ylabel(\"counts\")\n", + "ax1.axvline(R12, c=\"C0\", ls=\"dashed\", label=\"$R_{12}$\")\n", + "ax1.legend()\n", "\n", - "ax2.hist(s23, bins=100)\n", + "ax2.hist(s23, bins=100, color=\"black\", histtype=\"step\")\n", "ax2.set_xlabel(R\"$s_{23}$\")\n", "ax2.set_ylabel(\"counts\")\n", + "ax2.axvline(R23, c=\"C1\", ls=\"dashed\", label=\"$R_{23}$\")\n", + "ax2.legend()\n", "\n", - "ax3.hist(s31, bins=100)\n", + "ax3.hist(s31, bins=100, color=\"black\", histtype=\"step\")\n", "ax3.set_xlabel(R\"$s_{31}$\")\n", "ax3.set_ylabel(\"counts\")\n", + "ax3.axvline(R31, c=\"C2\", ls=\"dashed\", label=\"$R_{31}$\")\n", + "ax3.legend()\n", "\n", "fig.tight_layout()\n", "plt.show()" ] + }, + { + "cell_type": "markdown", + "id": "360f674e-801c-4fda-aa3a-e57595e0da44", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [] + }, + "source": [ + "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." + ] } ], "metadata": { From dee6fbb5da99ed5bf681ec4f10a0fb5aa65b222c Mon Sep 17 00:00:00 2001 From: shenvitor Date: Tue, 21 Nov 2023 15:38:15 +0100 Subject: [PATCH 8/9] cross reference --- docs/lecture11.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 1b84321..804f808 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -363,7 +363,7 @@ "tags": [] }, "source": [ - "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02.ipynb`, but needded further analysis for the modulations." + "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture2.ipynb `, but needded further analysis for the modulations." ] } ], From 78e81714e5dcd864dda57af607acfff7204d8f6e Mon Sep 17 00:00:00 2001 From: shenvitor Date: Tue, 21 Nov 2023 16:01:02 +0100 Subject: [PATCH 9/9] cross reference update --- docs/lecture11.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lecture11.ipynb b/docs/lecture11.ipynb index 804f808..8bc0638 100644 --- a/docs/lecture11.ipynb +++ b/docs/lecture11.ipynb @@ -363,7 +363,7 @@ "tags": [] }, "source": [ - "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture2.ipynb `, but needded further analysis for the modulations." + "The intensity of band seems stronger Compare to `Three-particles-1.dat` and `Three-particles-2.dat` in {doc}`lecture02`, but needded further analysis for the modulations." ] } ],