Skip to content

Commit 561d694

Browse files
committed
Update to Hi-Res images; Break long lines in slides
1 parent 920fc62 commit 561d694

9 files changed

+164
-184
lines changed

fig/cheetah_contributors.png

96.9 KB
Loading

fig/cheetah_elements.png

-243 KB
Loading

fig/cheetah_gradient.png

-320 KB
Loading

fig/cheetah_prior.png

-300 KB
Loading

fig/cheetah_system.png

-261 KB
Loading

fig/cheetah_use.png

-35 KB
Loading

fig/cheetah_what.png

-351 KB
Loading

tutorial.ipynb

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@
340340
},
341341
"source": [
342342
"<h2 style=\"color: #b51f2a\">What is Cheetah?</h2>\n",
343-
"<img src=\"fig/cheetah_what.png\" style=\"width:100%; margin:auto;\"/>"
343+
"<img src=\"fig/cheetah_what.png\" style=\"width:90%; margin:auto;\"/>"
344344
]
345345
},
346346
{
@@ -353,6 +353,8 @@
353353
"source": [
354354
"<h2 style=\"color: #b51f2a\">Some achievements</h2>\n",
355355
"\n",
356+
"To be filled @Jan\n",
357+
"\n",
356358
"- When was it first launched\n",
357359
"- How many downloads up to date\n",
358360
"- 2024 PRAB highlight paper"
@@ -368,7 +370,7 @@
368370
"source": [
369371
"<h2 style=\"color: #b51f2a\">Cheetah contributors</h2>\n",
370372
"\n",
371-
"<img src=\"fig/cheetah_contributors.png\" style=\"width:100%; margin:auto;\"/>"
373+
"<img src=\"fig/cheetah_contributors.png\" style=\"width:90%; margin:auto;\"/>"
372374
]
373375
},
374376
{
@@ -1183,12 +1185,11 @@
11831185
"source": [
11841186
"<h2 style=\"color: #b51f2a\">2 Gradient-based system identification</h2>\n",
11851187
"\n",
1186-
"Similar to the previous example, we perform gradient-based optimisation of the misalignments in the Cheetah model until the model best matches our observations from the real accelerator. \n",
1187-
"Again, the optimisation problem is wrapped in a `torch.nn.Module` to enable normalisation of the parameters under optimisation.\n",
1188+
"Similar to the previous example, we perform gradient-based optimisation of the misalignments in the Cheetah model until the model best matches our observations from the real accelerator.\n",
11881189
"\n",
1189-
"Note that the Cheetah model requires an incoming beam. In a real-world scenario this is not necesarily known, while the transverse position of the incoming beam affects the model and thereby the determined misalignments. Ideally one might have information on the incoming beam from prior measurements (e.g. identification through Cheetah) or simulations. \n",
1190-
"Here, we assume we know the incoming beam exactly and use the same beam as in the dataset. \n",
1191-
"Further below, we show that this method still works even if the incoming beam is not known exactly.\n"
1190+
"- Note that the Cheetah model requires an _incoming beam_. In a real-world scenario this is not necesarily known, while the transverse position of the incoming beam affects the model and thereby the determined misalignments. \n",
1191+
"- Here, we assume we know the incoming beam exactly and use the same beam as in the dataset. \n",
1192+
"- Further below, we show that this method still works even if the incoming beam is not known exactly.\n"
11921193
]
11931194
},
11941195
{
@@ -1296,9 +1297,23 @@
12961297
"source": [
12971298
"<h2 style=\"color: #b51f2a\">2 Gradient-based system identification</h2>\n",
12981299
"\n",
1299-
"The `train` function below works much the same as the one used for the magnet setting optimisation. However now, the loss is computed as the error between the outgoing beam parameters from the Cheetah model and the observed beam parameters from the dataset.\n",
1300+
"- Similar procedure to train as previously in the optimisation example.\n",
1301+
"- Now, the loss is computed as the error between \n",
1302+
" - the outgoing beam parameters from the Cheetah model\n",
1303+
" - and the observed beam parameters from the dataset.\n"
1304+
]
1305+
},
1306+
{
1307+
"cell_type": "markdown",
1308+
"metadata": {
1309+
"slideshow": {
1310+
"slide_type": "fragment"
1311+
}
1312+
},
1313+
"source": [
13001314
"\n",
1301-
"Note that unlike in the previous example, it makes sense to compute the loss over batches of data, which increases optimisation speed and decreases the risk of getting stuck in local minima. This is only possible thanks to Cheetah's native support for vectorised operations.\n"
1315+
"Unlike in the previous example, it makes sense to compute the loss over batches of data, which increases optimisation speed and decreases the risk of getting stuck in local minima. \n",
1316+
"This is only possible thanks to Cheetah's native support for vectorised operations.\n"
13021317
]
13031318
},
13041319
{
@@ -1496,11 +1511,23 @@
14961511
"source": [
14971512
"<h2 style=\"color: #b51f2a\">2 Gradient-based system identification</h2>\n",
14981513
"\n",
1499-
"We observe that the misalignments in the Cheetah model converge towards the known ground truth misalignments. This demonstrates that gradient-based optimisation can be used for system identification tasks with _Cheetah_.\n",
1514+
"- Misalignments in the Cheetah model converge towards the known ground truth misalignments.\n",
1515+
"- Gradient-based optimisation can be used for system identification tasks with _Cheetah_.\n",
15001516
"\n",
1501-
"However, as previously mentioned, the incoming beam is _rarely known exactly_ in real-world scenarios. \n",
1517+
"However, as previously mentioned, the incoming beam is _rarely known exactly_ in real-world scenarios. \n"
1518+
]
1519+
},
1520+
{
1521+
"cell_type": "markdown",
1522+
"metadata": {
1523+
"slideshow": {
1524+
"slide_type": "fragment"
1525+
}
1526+
},
1527+
"source": [
15021528
"\n",
15031529
"In the following, we assume a beam that is located in origin of the transverse plane, i.e. at the reference orbit. The goal is then to determine **the misalignments with respect to this orbit**. \n",
1530+
"\n",
15041531
"We can now run the same optimisation as before, but with the incoming beam set to the origin.\n"
15051532
]
15061533
},
@@ -1575,7 +1602,7 @@
15751602
}
15761603
},
15771604
"source": [
1578-
"We find that as one would expect, the identified misalignments are now a shifted version of the ground truth misalignments. This information could now be used to move the quadrupole magnets onto the orbit present at the time the dataset was collected. If this was in fact the \"golden orbit\", the quadrupoles would then be aligned perfectly.\n"
1605+
"The identified misalignments are now a shifted version of the ground truth misalignments. \n"
15791606
]
15801607
},
15811608
{
@@ -1622,7 +1649,7 @@
16221649
"\n",
16231650
"BO uses a statistical surrogate model (often a Guassian Process) of the objective functions to efficiently perform complex optimization tasks.\n",
16241651
"\n",
1625-
"<img src=\"fig/bo_steps.png\" width=400>\n"
1652+
"<img src=\"fig/bo_steps.png\" style=\"width:80%; margin:auto;\"/>\n"
16261653
]
16271654
},
16281655
{
@@ -2240,7 +2267,7 @@
22402267
"metadata": {
22412268
"celltoolbar": "Edit Metadata",
22422269
"kernelspec": {
2243-
"display_name": "malapa-cheetah-tutorial-2025",
2270+
"display_name": "Python 3 (ipykernel)",
22442271
"language": "python",
22452272
"name": "python3"
22462273
},

0 commit comments

Comments
 (0)