diff --git a/docs/eta-pi-p/manual.ipynb b/docs/eta-pi-p/manual.ipynb index f7f6bb7..eaf9d4f 100644 --- a/docs/eta-pi-p/manual.ipynb +++ b/docs/eta-pi-p/manual.ipynb @@ -52,13 +52,9 @@ "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", - "import pandas as pd\n", "import sympy as sp\n", "from ampform.io import aslatex\n", - "from ampform.kinematics.angles import (\n", - " Phi,\n", - " Theta,\n", - ")\n", + "from ampform.kinematics.angles import Phi, Theta\n", "from ampform.kinematics.lorentz import (\n", " ArrayMultiplication,\n", " ArraySize,\n", @@ -299,11 +295,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "jupyter": { - "source_hidden": true - } - }, + "metadata": {}, "outputs": [], "source": [ "p1 = FourMomentumSymbol(\"p1\", shape=[])\n", @@ -329,13 +321,13 @@ "Bz23 = BoostZMatrix(beta23, n_events=ArraySize(beta23))\n", "Bz31 = BoostZMatrix(beta31, n_events=ArraySize(beta31))\n", "\n", - "Ry12 = RotationYMatrix(-theta12, n_events=ArraySize(theta12))\n", - "Ry23 = RotationYMatrix(-theta23, n_events=ArraySize(theta23))\n", - "Ry31 = RotationYMatrix(-theta31, n_events=ArraySize(theta31))\n", + "Ry12 = RotationYMatrix(-Theta(p12), n_events=ArraySize(Theta(p12)))\n", + "Ry23 = RotationYMatrix(-Theta(p23), n_events=ArraySize(Theta(p23)))\n", + "Ry31 = RotationYMatrix(-Theta(p31), n_events=ArraySize(Theta(p31)))\n", "\n", - "Rz12 = RotationZMatrix(-phi12, n_events=ArraySize(theta12))\n", - "Rz23 = RotationZMatrix(-phi23, n_events=ArraySize(theta23))\n", - "Rz31 = RotationZMatrix(-phi31, n_events=ArraySize(theta31))\n", + "Rz12 = RotationZMatrix(-Phi(p12), n_events=ArraySize(Phi(p12)))\n", + "Rz23 = RotationZMatrix(-Phi(p23), n_events=ArraySize(Phi(p23)))\n", + "Rz31 = RotationZMatrix(-Phi(p31), n_events=ArraySize(Phi(p31)))\n", "\n", "m12_square = SquaredInvariantMass(p12)\n", "m23_square = SquaredInvariantMass(p23)\n", @@ -480,19 +472,6 @@ "phsp_momenta = phsp_generator.generate(500_000, rng)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "pd.DataFrame({\n", - " (k, label): np.transpose(v)[i]\n", - " for k, v in phsp_momenta.items()\n", - " for i, label in enumerate([\"E\", \"px\", \"py\", \"pz\"])\n", - "})" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -650,7 +629,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-input" + ] + }, "outputs": [], "source": [ "%config InlineBackend.figure_formats = ['png']\n", @@ -669,17 +652,10 @@ "ax.set_title(\"Model-weighted Phase space Dalitz Plot\")\n", "ax.set_xlabel(R\"$m^2(\\eta \\pi^0)\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", "ax.set_ylabel(R\"$m^2(\\pi^0 p)\\;\\left[\\mathrm{GeV}^2\\right]$\")\n", - "cbar = fig.colorbar(hist[3], ax=ax)\n", + "fig.colorbar(hist[3], ax=ax)\n", "fig.tight_layout()\n", "plt.show()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/pyproject.toml b/pyproject.toml index 9ff5bfe..c1e3203 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -102,6 +102,9 @@ select = ["ALL"] [tool.ruff.lint.flake8-builtins] builtins-ignorelist = ["display"] +[tool.ruff.lint.isort] +split-on-trailing-comma = false + [tool.ruff.lint.per-file-ignores] "*.ipynb" = [ "ANN",