{"id":220,"date":"2025-05-25T05:32:54","date_gmt":"2025-05-25T05:32:54","guid":{"rendered":"https:\/\/synchrotron-light.net\/wp\/?page_id=220"},"modified":"2025-07-20T05:13:20","modified_gmt":"2025-07-20T05:13:20","slug":"chapter-6-quantum-effects-in-relativistic-charged-particle-orbits","status":"publish","type":"page","link":"https:\/\/synchrotron-light.net\/wp\/?page_id=220","title":{"rendered":"Chapter 7: Quantum effects in relativistic charged-particle orbits"},"content":{"rendered":"<p>Below is a set of python codes associated with Chapter 7 of Daniele Pelliccia and David M. Paganin, &#8220;Synchrotron Light: A Physics Journey from Laboratory to Cosmos&#8221; (Oxford University Press, 2025).<\/p>\n<p>In order to run any of these python codes, you will need to include the following header file.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">import numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom scipy.special import genlaguerre, factorial\r\n\r\nsynchrotron_style = {\r\n    'font.family': 'FreeSerif',\r\n    'font.size': 30,\r\n    'axes.linewidth': 2.0,\r\n    'axes.edgecolor': 'black',\r\n    'grid.color': '#5b5b5b',\r\n    'grid.linewidth': 1.2,\r\n}<\/pre>\n<h2 id=\"The-basics:-plotting-a-radial-field\">Allowed energy levels<\/h2>\n<p>See Fig. 7.2.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">bb = np.logspace(-2,-10, 9)\r\nn = np.logspace(0,12,1000)\r\n\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(25,15))\r\n\r\n    for ratio in bb:\r\n\r\n        ax.scatter(0.1\/ratio, np.sqrt(1+2*ratio*(0.1\/ratio+0.5)), s = 150, c='g',zorder=10)\r\n        ax.scatter(10\/ratio, np.sqrt(1+2*ratio*(10\/ratio+0.5)), s = 150, c='r',zorder=10)\r\n        ax.loglog(n, np.sqrt(1+2*ratio*(n+0.5)), lw = 4, label = str(ratio), zorder=0)\r\n\r\n    ax.tick_params(axis='x', labelsize=40, pad=10)\r\n    plt.yticks(fontsize = 40)\r\n\r\n    plt.xlabel('n', fontsize=40, labelpad=10)\r\n    plt.ylabel(\"$\\\\mathcal{E}\/ (m_{e}c^{2})$\", rotation=90, fontsize=40, labelpad=-1)\r\n    plt.legend(fontsize = 40, frameon=True, title=\"$B\/B_{*}$\")\r\n    plt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-221\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.2-1024x636.png\" alt=\"\" width=\"700\" height=\"434\" \/><\/p>\n<h2>&#8220;Fuzzy ring&#8221; thickness<\/h2>\n<p>See Fig. 7.4.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">bb = np.logspace(-8,8, 1000)\r\nhbar = 1.054571817e-34\r\nee = 1.602176634e-19\r\n\r\nW = np.sqrt(2*hbar\/(ee*bb))\r\n\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(12,10))\r\n    ax.loglog(bb, W, lw = 8)\r\n\r\n    plt.xticks(fontsize = 34)\r\n    plt.yticks(fontsize = 34)\r\n    ax.tick_params(axis='x', pad=10)\r\n\r\n    plt.xlabel('$B$ (T)', fontsize=30, labelpad=10)\r\n    plt.ylabel('$W$ (m)', fontsize=30, labelpad=10)\r\n    # plt.savefig('ring-thickness-versus-magnetic-field.png', dpi=600, transparent=False)\r\n    plt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-222\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.4-1024x832.png\" alt=\"\" width=\"700\" height=\"569\" \/><\/p>\n<h2>&#8220;Fuzzy ring&#8221; probability density<\/h2>\n<p>See Fig. 7.5.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">r = np.linspace(0,20,5000)\r\ntheta = np.linspace(0, 2*np.pi, 1000)\r\nbb=0.4\r\nn=50\r\nR, Th = np.meshgrid(r, theta)\r\npkg = np.exp(-bb*R**2)*R**(2*n)\r\nX = R*np.cos(Th)\r\nY = R*np.sin(Th)\r\n\r\nfig = plt.figure(figsize=(15,15))\r\nplt.contourf(X,Y,pkg, levels=50, cmap='Purples')\r\nplt.axis('off')\r\nplt.show()<\/pre>\n<h1><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-223\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.5.png\" alt=\"\" width=\"600\" height=\"581\" srcset=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.5.png 600w, https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.5-480x465.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 600px, 100vw\" \/><\/h1>\n<h2 style=\"text-align: left;\">Radial line profiles of Klein-Gordon wavefunctions<\/h2>\n<p>See Fig. 7.6.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">r = np.linspace(0,20,2000)\r\nell = 100\r\n\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, axs = plt.subplots(3,2, figsize=(16,12))\r\n    fig.subplots_adjust(wspace=5)\r\n    \r\n    for ax, s in zip(axs.flat, [0,1,2,5,10,20]):\r\n   \r\n        func = factorial(s)\/(factorial(s+ell))*np.exp(-r**2)*r**(2*ell)*(genlaguerre(s, ell)(r**2))**2\r\n    \r\n        ax.plot(r, func, lw=3)\r\n        ax.set_title(\"$s= $\"+str(s)+\", $\\\\ell= $100\", fontsize=24)\r\n        ax.set_xlabel('$\\\\breve{r}$', fontsize=28, labelpad=1)\r\n        \r\n        ax.tick_params(axis='x', labelsize=30)\r\n        ax.tick_params(axis='y', labelsize=30)\r\n        \r\nplt.tight_layout()    \r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-224\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.6-1024x772.png\" alt=\"\" width=\"700\" height=\"528\" \/><\/p>\n<h2>Density plots of Klein-Gordon wavefunctions<\/h2>\n<p>See Fig. 7.7.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">x = np.linspace(-17,17,1000)\r\ny = np.linspace(-17,17,1000)\r\nX,Y = np.meshgrid(x,y)\r\nell = 100\r\n\r\nwith plt.style.context(('default')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, axs = plt.subplots(3,2, figsize=(11.5,16))\r\n\r\n    for ax, s in zip(axs.flat, [0,1,2,5,10,20]):\r\n\r\n        func = factorial(s)\/(factorial(s+ell))*np.exp(-X**2 - Y**2)*(X**2 + Y**2)**(ell)*(genlaguerre(s, ell)(X**2 + Y**2))**2\r\n\r\n        ax.contourf(X,Y,func, levels=50)\r\n        ax.set_title(\"$s=$\"+str(s), fontsize=24, loc='center', y=0.9, color='w')\r\n\r\n        ax.set_xticks(ticks = [-10,0,10])\r\n        ax.tick_params(axis='x',direction='in', color='w', length=5, width=2)\r\n        ax.set_yticks(ticks = [-10,0,10])\r\n        ax.tick_params(axis='y',direction='in', color='w', length=5, width=2)\r\n        \r\nplt.tight_layout()    \r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-225\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.7-734x1024.png\" alt=\"\" width=\"734\" height=\"1024\" \/><\/p>\n<h2>Klein-Gordon wavefunctions and classical orbits<\/h2>\n<p>See Fig. 7.10.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">def plot_arrows(offsetx, offsety, color):\r\n    plt.arrow(4.3+np.sqrt(ell+s)+offsetx,0+offsety, 0, 1, head_length=1,head_width=1, length_includes_head=True, \\\r\n          linewidth=0, fc=color, overhang=0.25)\r\n    plt.arrow(4.3-np.sqrt(ell+s)+offsetx,0+offsety, 0, -1, head_length=1,head_width=1, length_includes_head=True, \\\r\n              linewidth=0, fc=color, overhang=0.25)\r\n    plt.arrow(np.sqrt(ell+s)\/2+offsetx,np.sqrt(ell+s)+offsety, -1, 0, head_length=1,head_width=1, length_includes_head=True, \\\r\n              linewidth=0, fc=color, overhang=0.25)\r\n    plt.arrow(np.sqrt(ell+s)\/2+offsetx,-np.sqrt(ell+s)+offsety, 0.1, 0, head_length=1,head_width=1, length_includes_head=True, \\\r\n              linewidth=0, fc=color, overhang=0.25)\r\n\r\nx = np.linspace(-17,17,1000)\r\ny = np.linspace(-17,17,1000)\r\nX,Y = np.meshgrid(x,y)\r\nell = 100\r\ns=20\r\n\r\ncircle1 = plt.Circle((4.3, 0), np.sqrt(s+ell), color=None, edgecolor='r', fill=False, lw=3)\r\ncircle2 = plt.Circle((0, 4.3), np.sqrt(s+ell), color=None, edgecolor='lawngreen', fill=False, lw=3)\r\ncircle3 = plt.Circle((-4.3, 0), np.sqrt(s+ell), color=None, edgecolor='white', fill=False, lw=3)\r\ncircle4 = plt.Circle((0, -4.3), np.sqrt(s+ell), color=None, edgecolor='magenta', fill=False, lw=3)\r\n\r\nfunc = factorial(s)\/(factorial(s+ell))*np.exp(-X**2 - Y**2)*(X**2 + Y**2)**(ell)\\\r\n       *(genlaguerre(s, ell)(X**2 + Y**2))**2\r\n\r\nfig, ax = plt.subplots(figsize=(15,15))\r\nax.contourf(X,Y,func, levels=50)\r\nax.add_patch(circle1)\r\nax.add_patch(circle2)\r\nax.add_patch(circle3)\r\nax.add_patch(circle4)\r\n\r\nplot_arrows(0,0,'r')\r\nplot_arrows(-4.3,4.3,'lawngreen')\r\nplot_arrows(-2*4.3,0,'white')\r\nplot_arrows(-4.3,-4.3,'magenta')\r\n\r\nplt.axis('off')\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-226\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.10-1024x1018.png\" alt=\"\" width=\"700\" height=\"696\" \/><\/p>\n<h2>Linear combination of Klein-Gordon solutions<\/h2>\n<p>See Fig. 7.11.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">x = np.linspace(-11,11,1000)\r\ny = np.linspace(-11,11,1000)\r\nX,Y = np.meshgrid(x,y)\r\nr = np.sqrt(X**2 + Y**2)\r\nphi = np.arctan2(Y,X)\r\nell = 50\r\ns=0\r\n\r\ncircle1 = plt.Circle((0, 0), np.sqrt(s+ell), color=None, edgecolor='lawngreen', fill=False, lw=4, ls='--')\r\n\r\nfunc1 = np.sqrt(factorial(s)\/(factorial(s+ell)))*\\\r\n        np.exp(1j*ell*phi)*\\\r\n        np.exp(-0.5*r**2)*\\\r\n        r**(ell)\\\r\n       *(genlaguerre(s, ell)(r**2))\r\n\r\nfunc2 = np.sqrt(factorial(s+1)\/(factorial(s+ell)))*\\\r\n        np.exp(1j*(ell-1)*phi)*\\\r\n        np.exp(-0.5*r**2)*\\\r\n        r**(ell-1)\\\r\n       *(genlaguerre(s+1, ell-1)(r**2))\r\n\r\nwith plt.style.context(('default')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(10,10))\r\n    ax.contourf(X,Y,np.abs(func1+func2)**2, levels=50)\r\n    ax.add_patch(circle1)\r\n\r\n    ax.set_xticks(ticks = [-10,0,10])\r\n    ax.tick_params(axis='x',direction='in', color='w', length=5, width=2, labelsize=42)\r\n    ax.set_yticks(ticks = [-10,0,10])\r\n    ax.tick_params(axis='y',direction='in', color='w', length=5, width=2, labelsize=42)\r\n\r\n# plt.savefig(\"KleinGordonWavefunctions4.png\", dpi=600)\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-227\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.11.png\" alt=\"\" width=\"700\" height=\"666\" srcset=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.11.png 700w, https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.11-480x457.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 700px, 100vw\" \/><\/p>\n<h2>Spin-relaxation timescale<\/h2>\n<p>See Fig. 7.19.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true \">hbar = 1.054571817e-34 # J*s\r\nm_e = 9.1093837015e-31 # kg\r\nc = 299792458 # m\/s\r\nalpha = 1.0\/137.035999084\r\nBstar = 4.41e9 # T (tesla)\r\n\r\nB = np.logspace(-1, 2, 1000)\r\ngs = ['$10^{2}$', '$10^{3}$', '$10^{4}$', '$10^{5}$']\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(9,10))\r\n\r\n    for i, gamma in enumerate([100,1000,10000,100000]):\r\n        Tspinflip = (hbar\/(m_e *c**2))*(Bstar\/B)**3 * (gamma**(-2)\/alpha)        \r\n        ax.loglog(B, Tspinflip, lw = 4, label = '$\\\\gamma=$'+gs[i])\r\n\r\nplt.xticks(fontsize = 30)\r\nplt.yticks(fontsize = 30)\r\nax.tick_params(axis='x', pad=5)\r\n\r\nplt.xlabel('$B$ (T)', fontsize=30, labelpad=10)\r\nplt.legend(fontsize=28, frameon=True, framealpha=1, handlelength=1)\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-228\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.19.png\" alt=\"\" width=\"600\" height=\"675\" srcset=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.19.png 600w, https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.19-480x540.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 600px, 100vw\" \/><\/p>\n<h2>Degree of radiative polarisation<\/h2>\n<p>Gradual build-up of the degree of radiative polarisation, as in Fig. 7.20(a).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-230\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.20a-1024x726.png\" alt=\"\" width=\"700\" height=\"497\" \/><\/p>\n<p>Maximum attainable spin polarisation, as in Fig. 7.20(b).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-231\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.20b-1024x733.png\" alt=\"\" width=\"700\" height=\"501\" \/><\/p>\n<h2 id=\"Ratio-spin-light-vs-synchrotron-radiation-power\">Ratio of spin-light versus synchrotron-radiation power<\/h2>\n<p>See Fig. 7.22.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">hbar = 1.054571817e-34 # J*s\r\nee = 1.602176634e-19 # C\r\nm_e = 9.1093837015e-31 # kg\r\nc = 299792458 #m\/s\r\nB = np.logspace(0,4,500) # T (tesla)\r\n\r\ngg = [\"$\\\\gamma = 10^{2}$\", \"$\\\\gamma = 10^{3}$\", \"$\\\\gamma = 10^{4}$\", \"$\\\\gamma = 10^{5}$\"]\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(9,11))\r\n    for i, gamma in enumerate(np.logspace(2,5,4)):\r\n        R =  (gamma*B*ee*hbar\/(m_e**2 * c**2))**2\r\n        ax.loglog(B,R, lw = 4, label=gg[i])\r\n\r\n        plt.legend(fontsize=27, frameon=True, framealpha=1, handlelength=1)\r\nplt.xticks(fontsize = 34)\r\nplt.yticks(fontsize = 34)\r\nax.tick_params(axis='x', pad=5) \r\nax.set_xlabel(\"B(T)\", fontsize=50)\r\nax.set_ylabel(\"R\", fontsize=50)\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-234\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.22.png\" alt=\"\" width=\"700\" height=\"777\" srcset=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.22.png 700w, https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.22-480x533.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 700px, 100vw\" \/><\/p>\n<h2>Quantum corrections to emitted synchrotron power<\/h2>\n<p>See Fig. 7.23.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true \">x = np.logspace(-5,-2, 1000)\r\nRplus = 1 - (1.5 + 55*np.sqrt(3)\/16.0)*x\r\nRminus = 1 - (-1.5 + 55*np.sqrt(3)\/16.0)*x\r\nRavg = 0.5*(Rplus+Rminus)\r\n\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(12,12))\r\n    \r\n    ax.semilogx(x,Rplus, lw = 4,  label=\"$\\\\mathcal{R}_{+}$\")\r\n    ax.semilogx(x,Rminus, lw = 4, label=\"$\\\\mathcal{R}_{-}$\")\r\n    ax.semilogx(x,Ravg, lw = 4,   label=\"$\\\\frac{1}{2} \\\\left( \\\\mathcal{R}_{+} + \\\\mathcal{R}_{-}  \\\\right)$\")\r\n    \r\n    plt.legend(fontsize=42 , frameon=True, framealpha=1, handlelength=1, labelspacing=1.0, borderpad=0.9)\r\n    ax.set_yticks(ticks = [0.94,0.96,0.98, 1.0])\r\n    plt.xticks(fontsize = 48)\r\n    plt.yticks(fontsize = 48)   \r\n    ax.tick_params(axis='x', pad=10) \r\n\r\n    ax.set_ylabel('$\\\\mathcal{R}$', fontsize=50)\r\n    ax.set_xlabel('$\\\\gamma B\/B_{*}$', fontsize=50, labelpad=-10)\r\n\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-235\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.23-1024x950.png\" alt=\"\" width=\"700\" height=\"650\" \/><\/p>\n<h2>Characteristic timescales<\/h2>\n<p>See Fig. 7.25.<\/p>\n<pre class=\"theme:obsidian lang:python decode:true\">hbar = 1.054571817e-34 # J*s\r\nm_e = 9.1093837015e-31 # kg\r\nee = 1.602176634e-19 # C\r\neps_0 = 8.8541878128e-12 \r\nc = 299792458 # m\/s\r\nalpha = 1.0\/137.035999084\r\nBstar = 4.41e9 # T (tesla)\r\ngamma = 2000\r\nB = np.linspace(0.1,15000,10000)\r\n\r\nTspinflip = (hbar\/(m_e *c**2))*(Bstar\/B)**3 * (gamma**(-2)\/alpha)\r\nTbuildup = 2*m_e \/ (ee*B)\r\nTdamping = (6*np.pi*eps_0 * m_e**3 * c**3) \/ (ee**4 * B**2 * gamma)\r\nTemission = (2 * np.pi * m_e) \/ (ee * alpha * B)\r\nTrevolution = (2 * np.pi * gamma * m_e) \/ (ee * B)\r\n\r\nwith plt.style.context(('seaborn-v0_8-whitegrid')):\r\n    plt.rcParams.update(synchrotron_style)\r\n    fig, ax = plt.subplots(figsize=(14,10))\r\n    \r\n    ax.loglog(B,Tspinflip, lw = 4,  label=\"$T_{spin-flip}$\")\r\n    ax.loglog(B,Tbuildup, lw = 4, label=\"$T_{buildup}$\")\r\n    ax.loglog(B,Tdamping, lw = 4, label=\"$T_{damping}$\")\r\n    ax.loglog(B,Temission, lw = 4, label=\"$T_{emission}$\")\r\n    ax.loglog(B,Trevolution, lw = 4, label=\"$T_{revolution}$\")\r\n    \r\n    plt.legend(fontsize=31, frameon=True, loc = 'upper right', framealpha=1, handlelength=1)\r\n    plt.xticks(fontsize = 32)\r\n    plt.yticks(fontsize = 32)   \r\n    ax.tick_params(axis='x', pad=5) \r\n    ax.set_ylabel('Timescale (s)', fontsize=40)\r\n    ax.set_xlabel('B(T)', fontsize=40)\r\nplt.show()<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-237\" src=\"https:\/\/synchrotron-light.net\/wp\/wp-content\/uploads\/2025\/05\/shynchrotron-light-7.25-1024x725.png\" alt=\"\" width=\"700\" height=\"496\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below is a set of python codes associated with Chapter 7 of Daniele Pelliccia and David M. Paganin, &#8220;Synchrotron Light: A Physics Journey from Laboratory to Cosmos&#8221; (Oxford University Press, 2025). In order to run any of these python codes, you will need to include the following header file. import numpy as np import matplotlib.pyplot [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":79,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-220","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/pages\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=220"}],"version-history":[{"count":10,"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/pages\/220\/revisions"}],"predecessor-version":[{"id":790,"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/pages\/220\/revisions\/790"}],"up":[{"embeddable":true,"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=\/wp\/v2\/pages\/79"}],"wp:attachment":[{"href":"https:\/\/synchrotron-light.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}