Skip to content

Commit d4efa77

Browse files
committed
checked tutorials
1 parent 8128903 commit d4efa77

File tree

6 files changed

+138
-77
lines changed

6 files changed

+138
-77
lines changed

demos/ipython_tutorials/13_synchrotron_radiation_visualization.ipynb

Lines changed: 109 additions & 55 deletions
Large diffs are not rendered by default.

demos/ipython_tutorials/2_tracking.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
"output_type": "stream",
258258
"text": [
259259
"z = 93.40410100084 / 93.40410100084006 : applied: d: \n",
260-
" time exec: 7.94364595413208 sec\n"
260+
" time exec: 8.964184761047363 sec\n"
261261
]
262262
}
263263
],
@@ -313,7 +313,7 @@
313313
"output_type": "stream",
314314
"text": [
315315
"z = 93.40410100084 / 93.40410100084006 : applied: d: mTransform\n",
316-
" time exec: 8.000734090805054 sec\n"
316+
" time exec: 8.656868696212769 sec\n"
317317
]
318318
},
319319
{

demos/ipython_tutorials/3_space_charge.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"name": "stdout",
214214
"output_type": "stream",
215215
"text": [
216-
"z = 12.697400000000002 / 12.697400000000007 : applied: SpaceChargeetime exec: 65.20020890235901 sec\n"
216+
"z = 12.697400000000002 / 12.697400000000007 : applied: SpaceChargeetime exec: 73.08316922187805 sec\n"
217217
]
218218
}
219219
],

demos/ipython_tutorials/4_wake.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
"text": [
363363
"tracking with Wakes .... \n",
364364
"z = 15.0 / 15.0 : applied: .0 : applied: Wake\n",
365-
" time exec: 2.079639196395874 sec\n"
365+
" time exec: 2.3191680908203125 sec\n"
366366
]
367367
}
368368
],

demos/ipython_tutorials/5_CSR.ipynb

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

demos/ipython_tutorials/8_laser_heater.ipynb

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"\\begin{equation}\n",
6464
"\\ddot{x} = \\frac{e}{\\gamma m_e} B_y \\dot{z}, \\qquad \\ddot{z} = -\\frac{e}{\\gamma m_e} B_y \\dot{x}\n",
6565
"\\end{equation}\n",
66-
"\n",
66+
"$$\\qquad$$\n",
6767
"In the first order approximation $v_z = \\dot{z} \\approx v = \\beta c = const$, $v_x << v_z$ and $\\ddot{z} \\approx 0$ and taking into account the undulator magnetic field $B_y = -B_0\\sin(k_y z)$ we get:\n",
6868
"\n",
6969
"\\begin{equation}\n",
@@ -76,9 +76,7 @@
7676
"x(z) = \\frac {K} {\\beta \\gamma k_u}\\sin(k_u z),\n",
7777
"\\end{equation}\n",
7878
"\n",
79-
"where $K = \\frac{eB_0}{m_e c k_u}$\n",
80-
"\n",
81-
"and transverse velocity is \n",
79+
"where $K = \\frac{eB_0}{m_e c k_u}$ and transverse velocity is \n",
8280
"\n",
8381
"\\begin{equation}\n",
8482
"v_x(t) = \\frac {K c}{\\gamma} \\cos(k_u \\beta c t) \\qquad or \\qquad v_x(z) = \\frac {K c}{\\gamma} \\cos(k_u z)\n",
@@ -97,7 +95,7 @@
9795
"\\begin{equation}\n",
9896
"v_z = \\sqrt{v^2 - v_x^2} = \\sqrt{c^2(1 - 1/\\gamma^2) - v_x^2} \\approx c\\left(1 - \\frac{1}{2\\gamma^2} (1 + \\gamma^2 v_x^2 / c^2) \\right)\n",
9997
"\\end{equation}\n",
100-
"\n",
98+
"$$\\quad$$\n",
10199
"Inserting for $v_x = \\dot{x}(t)$ and using the trigonometric identity $\\cos^2 \\alpha = (1 + \\cos 2 \\alpha)/2$\n",
102100
"\n",
103101
"\\begin{equation}\n",
@@ -136,7 +134,7 @@
136134
"E(x, y, z) = E_0 \\frac{ e^{-\\frac{1}{2} \\frac{x^2}{\\sigma_x^2 - j z/k} } } {\\sqrt{1-j z/(k \\sigma_x^2)}}\n",
137135
"\\frac{ e^{-\\frac{1}{2} \\frac{y^2}{\\sigma_y^2 - j z/k} } } {\\sqrt{1-j z/(k \\sigma_y^2)}}\n",
138136
"\\end{equation}\n",
139-
"\n",
137+
"$$\\quad$$\n",
140138
"Introducing [Rayleigh length](https://en.wikipedia.org/wiki/Rayleigh_length) for $x$ and $y$ plane:\n",
141139
"\n",
142140
"\\begin{equation}\n",
@@ -337,6 +335,7 @@
337335
"\\end{equation}\n",
338336
"\n",
339337
"<p>If we ensure fulfillment of the resonance condition only for the first harmonic as we did in the \"Option 1\" (in that case $n=0$) the only one term of the sum will survive the only one term of the sum will survive. Indeed, for the $n=0$ argument of the exponential will be constant but for other harmonic numbers it will oscillate and give in average 0. So our final expression:</p>\n",
338+
"\n",
340339
"\\begin{equation}\n",
341340
"\\boxed{\\Big \\langle e^{j((k + k_u)\\overline v_z - \\omega) t} \\frac{e^{-j\\theta} + 1}{2} e^{-j Y \\sin\\theta}\\Big\\rangle = \\frac{J_{0}(Y) - J_1(Y)}{2}}\n",
342341
"\\end{equation}\n",
@@ -352,7 +351,7 @@
352351
"\\begin{equation}\n",
353352
"\\langle E v\\rangle = \\frac {K c}{\\gamma} Re \\left\\{ E(x,y,z)\\right\\}\\frac{J_{0}(Y) - J_{1}(Y)}{2}\n",
354353
"\\end{equation}\n",
355-
"\n",
354+
"$$\\quad$$\n",
356355
"Finally, remembering derivation of the electric field amplitude $E_0 = \\sqrt{\\frac{4 Z_0 \\overline P(0) }{\\pi w^2}}$, we can write expression for amplitude of energy modulation on axis ($x=y=0$)\n",
357356
"\n",
358357
"\\begin{equation}\n",
@@ -618,9 +617,17 @@
618617
},
619618
{
620619
"cell_type": "code",
621-
"execution_count": 3,
620+
"execution_count": 1,
622621
"metadata": {},
623-
"outputs": [],
622+
"outputs": [
623+
{
624+
"name": "stdout",
625+
"output_type": "stream",
626+
"text": [
627+
"initializing ocelot...\n"
628+
]
629+
}
630+
],
624631
"source": [
625632
"# the output of plotting commands is displayed inline within frontends, \n",
626633
"# directly below the code cell that produced it\n",
@@ -678,7 +685,7 @@
678685
},
679686
{
680687
"cell_type": "code",
681-
"execution_count": 4,
688+
"execution_count": 2,
682689
"metadata": {},
683690
"outputs": [
684691
{
@@ -722,7 +729,7 @@
722729
},
723730
{
724731
"cell_type": "code",
725-
"execution_count": 5,
732+
"execution_count": 3,
726733
"metadata": {},
727734
"outputs": [
728735
{
@@ -744,7 +751,7 @@
744751
},
745752
{
746753
"cell_type": "code",
747-
"execution_count": 6,
754+
"execution_count": 4,
748755
"metadata": {},
749756
"outputs": [
750757
{
@@ -772,7 +779,7 @@
772779
},
773780
{
774781
"cell_type": "code",
775-
"execution_count": 7,
782+
"execution_count": 5,
776783
"metadata": {},
777784
"outputs": [
778785
{

0 commit comments

Comments
 (0)