Skip to content

Commit

Permalink
FIX: set correct widths and gammas in K-matrix widget (#408)
Browse files Browse the repository at this point in the history
* FIX: set normalized gammas

* DOC: show ticks in widget pcolormesh plots

* FIX: reduce widths
  • Loading branch information
redeboer authored Mar 13, 2024
1 parent 28ccbf3 commit 6b2ce3d
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions docs/usage/dynamics/k-matrix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1183,8 +1183,8 @@
" m2=(0, 3, 300),\n",
" Gamma1=(-2, 2, 100),\n",
" Gamma2=(-2, 2, 100),\n",
" gamma1=(0, 2),\n",
" gamma2=(0, 2),\n",
" gamma1=(-1, +1, 100),\n",
" gamma2=(-1, +1, 100),\n",
")\n",
"sliders.set_values(\n",
" c1=1,\n",
Expand All @@ -1193,8 +1193,8 @@
" m2=1.7,\n",
" Gamma1=0.2,\n",
" Gamma2=0.3,\n",
" gamma1=1,\n",
" gamma2=1,\n",
" gamma1=1 / np.sqrt(2),\n",
" gamma2=1 / np.sqrt(2),\n",
")\n",
"\n",
"\n",
Expand Down Expand Up @@ -1524,15 +1524,15 @@
" }:\n",
" sliders.set_ranges({\n",
" f\"m{R}\": (0, 3, 100),\n",
" Rf\"\\Gamma_{{{R},{i}}}\": (-2, +2, 100),\n",
" Rf\"\\gamma_{{{R},{i}}}\": (0, 10, 100),\n",
" Rf\"\\Gamma_{{{R},{i}}}\": (-1.5, +1.5, 100),\n",
" Rf\"\\gamma_{{{R},{i}}}\": (-1, 1, 100),\n",
" f\"m_a{i}\": (0, 1, 0.01),\n",
" f\"m_b{i}\": (0, 1, 0.01),\n",
" })\n",
" sliders.set_values({\n",
" f\"m{R}\": m0_values[R - 1],\n",
" Rf\"\\Gamma_{{{R},{i}}}\": 2.0 * (0.4 + R * 0.2 - i * 0.3),\n",
" Rf\"\\gamma_{{{R},{i}}}\": 0.25 * (10 - R + i),\n",
" Rf\"\\Gamma_{{{R},{i}}}\": 0.35 + R * 0.2 - i * 0.3,\n",
" Rf\"\\gamma_{{{R},{i}}}\": 1 / np.sqrt(n_channels * n_poles),\n",
" f\"m_a{i}\": (i + 1) * 0.25,\n",
" f\"m_b{i}\": (i + 1) * 0.25,\n",
" })\n",
Expand All @@ -1543,12 +1543,12 @@
" sliders.set_ranges({\n",
" f\"m{R}\": (0, 3, 100),\n",
" Rf\"\\Gamma_{{{R},{i}}}\": (-1, 1, 100),\n",
" Rf\"\\gamma_{{{R},{i}}}\": (0, 2, 100),\n",
" Rf\"\\gamma_{{{R},{i}}}\": (-1, 1, 100),\n",
" })\n",
" sliders.set_values({\n",
" f\"m{R}\": m0_values[R - 1],\n",
" Rf\"\\Gamma_{{{R},{i}}}\": (R + 1) * 0.1,\n",
" Rf\"\\gamma_{{{R},{i}}}\": 1 - 0.1 * R + 0.1 * i,\n",
" Rf\"\\gamma_{{{R},{i}}}\": 1 / np.sqrt(n_channels * n_poles),\n",
" })\n",
" if kmatrix_type in {\n",
" kmatrix.NonRelativisticPVector,\n",
Expand Down Expand Up @@ -1588,8 +1588,6 @@
" ax_2d.set_yticks([])\n",
" ax_3d.set_xlabel(\"Re $m$\")\n",
" ax_3d.set_ylabel(\"Im $m$\")\n",
" ax_3d.set_xticks([])\n",
" ax_3d.set_yticks([])\n",
"\n",
" ax_3d.axhline(0, linewidth=0.5, c=\"black\", linestyle=\"dotted\")\n",
"\n",
Expand Down Expand Up @@ -1833,8 +1831,16 @@
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"version": "3.8.17"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6b2ce3d

Please sign in to comment.