33Training Courses
44================
55
6+ In this training you will learn the following:
7+
8+ - Creating and editing waveforms using the GUI
9+ - Exporting waveforms to an IDS
10+
11+ Exporting waveform configurations to IMAS HDF5 files
612All examples assume you have an environment with the Waveform Editor up and running.
713if you do not have this yet, please have a look at the :ref: `installation instructions <installing >`.
14+ You do not need to have installed the dependencies for the Plasma Shape Editor to do these exercises.
815
916Creating your first waveforms
1017-----------------------------
@@ -18,25 +25,37 @@ Exercise 1a: Creating a new waveform
1825 .. md-tab-item :: Exercise
1926
2027 In order to start editing waveforms, you must first learn how to navigate your way around
21- around the GUI. Launch the waveform editor GUI. A waveform must * always * belong to a group,
22- so create a new group, and create a new waveform inside it .
28+ around the GUI. Launch the Waveform Editor GUI using the following command,
29+ which opens the Waveform Editor in your default browser .
2330
24- .. hint ::
25- Detailed instructions on how to edit the waveform configuration can be found :ref: `here <edit_config >`.
31+ .. code-block :: bash
2632
27- .. md-tab-item :: Solution
33+ waveform-editor gui
2834
29- #. Launch the Waveform Editor GUI using the following command, which opens the Waveform Editor
30- in your default browser.
3135
32- .. code-block :: bash
36+ #. A waveform must *always * belong to a group, so first create a group in which
37+ to store the new waveform, and provide a name for the group, e.g. ``Group1 ``.
38+ #. Create a new waveform in the previously created group, and provide a name for
39+ this waveform, e.g. ``Waveform1 ``.
40+
41+ What do you see in the sidebar on the left?
3342
34- waveform-editor gui
43+ .. hint ::
44+ Detailed instructions on how to add groups and waveforms from the GUI
45+ can be found :ref: `here <edit_config >`.
3546
36- #. Create a group in which to store the new waveform, and provide a name for the group, e.g. ``Group1 ``.
37- #. Create a new waveform in the previously created group, and provide a name for this waveform, e.g. ``Waveform1 ``.
3847
39- You have now created a new, empty waveform, which is shown in the sidebar:
48+ .. md-tab-item :: Solution
49+
50+ .. |add_waveform_icon | image :: ../images/gui/add_waveform_icon.png
51+ :height: 24px
52+ .. |add_group_icon | image :: ../images/gui/add_group_icon.png
53+ :height: 24px
54+
55+ #. Use this button |add_group_icon | to add a new group and call it ``Group1 ``
56+ #. Use this button |add_waveform_icon | to add a new waveform and call it ``Waveform1 ``
57+
58+ You have now created a new waveform, which is shown in the sidebar:
4059
4160 .. image :: ../images/training/ex1_sidebar.png
4261 :align: center
@@ -48,15 +67,28 @@ Exercise 1b: Creating a sine wave
4867.. md-tab-set ::
4968 .. md-tab-item :: Exercise
5069
70+ Now you will edit the empty waveform you created in the previous exercise.
71+ Select the waveform in the sidebar and open the *Edit Waveforms * tab. You will
72+ see an editor window as well as a live view the waveform currently being edited.
73+
74+ The editor currently shows ``- {} ``, indicating an empty tendency.
75+ A tendency can be specified by providing a tendency type and by setting parameters defining
76+ the shape of this tendency. For example:
77+
78+ .. code-block :: yaml
79+
80+ - {type: <waveform type>, <param 1>: <value 1>, <param 2>: <value 2>, ...}
81+
5182 Edit the waveform you created in the previous exercise such that it contains
52- a single sine-wave tendency, with the following properties :
83+ a single sine-wave tendency, with the following parameters :
5384
85+ - Type: sine
5486 - Duration: from 10 to 15 seconds
5587 - Frequency: 0.5 Hz
5688 - Amplitude: 3
5789 - Vertical range: 0 to 6
5890
59- Use the following tendency attributes : ``type ``, ``start ``, ``end ``, ``frequency ``, ``amplitude ``, and ``base ``.
91+ Use the following tendency parameters : ``type ``, ``start ``, ``end ``, ``frequency ``, ``amplitude ``, and ``base ``.
6092
6193 .. hint ::
6294 Detailed descriptions of the tendencies can be found :ref: `here <available-tendencies >`.
@@ -81,7 +113,7 @@ Exercise 1c: Creating a sine wave - part 2
81113 .. md-tab-item :: Exercise
82114
83115 In the previous execise, you might have noticed that there a multiple ways in which you can define the same
84- waveform. Recreate the waveform of previous exercise using only the following tendency attributes :
116+ waveform. Recreate the waveform of previous exercise using only the following tendency parameters :
85117 ``type ``, ``start ``, ``duration ``, ``period ``, ``min ``, and ``max ``.
86118
87119 .. md-tab-item :: Solution
@@ -177,7 +209,7 @@ Exercise 2b: Shortform notation
177209
178210 Some examples:
179211
180- #. If no ``start `` attribute is provided, the end of the previously tendency will be
212+ #. If no ``start `` parameter is provided, the end of the previously tendency will be
181213 used as a start value, or 0 if it is the first tendency.
182214 #. If no tendency ``type `` is provided, it will be considered a linear tendency by default.
183215 #. If no start value e.g. ``from `` is provided, it will try to match end of previous tendency.
@@ -190,10 +222,10 @@ Exercise 2b: Shortform notation
190222
191223 #. The first tendency - No ``start `` or ``from `` is needed because it begins at 0 by default.
192224 #. The second tendency - No ``type `` is provided, so it is a linear tendency by default.
193- The ``start ``, ``from ``, and ``to `` attributes are by default set to the respective
225+ The ``start ``, ``from ``, and ``to `` parameters are by default set to the respective
194226 values at the end of the previous tendency.
195- #. The third tendency - Again, the ``start `` and ``from `` attributes are inferred from the
196- previous tendency. In this case, we do need to specify the ``to `` attribute , otherwise
227+ #. The third tendency - Again, the ``start `` and ``from `` parameters are inferred from the
228+ previous tendency. In this case, we do need to specify the ``to `` parameter , otherwise
197229 we would get a straight line.
198230
199231 .. code-block :: yaml
@@ -268,7 +300,7 @@ Exercise 3c: Repeating Waveforms
268300 .. md-tab-item :: Exercise
269301
270302 You can create repeating patterns using the ``repeat `` tendency. The repeat tendency
271- allows you to specify the ``waveform `` attribute . This allows you to repeat
303+ allows you to specify the ``waveform `` parameter . This allows you to repeat
272304 any number of tendencies.
273305
274306 Take the waveform from the previous exercise and make it repeat three times.
@@ -279,7 +311,7 @@ Exercise 3c: Repeating Waveforms
279311
280312 A smooth tendency was added as a last tendency to smoothly transition from the
281313 linear tendency back into the piecewise linear tendency. This whole waveform is
282- placed in the ``waveform `` attribute of the repeat tendency. Since the tendencies
314+ placed in the ``waveform `` parameter of the repeat tendency. Since the tendencies
283315 combine up to a total length of 11 (6+1+3+1), the total ``duration `` of the repeat
284316 tendency is set to 33, to obtain three full cycles.
285317
@@ -370,13 +402,13 @@ Exercise 4b: Derived Waveforms - part 2
370402
371403 where:
372404
373- - :math: `P_0 ` = 16.5×10⁶ W (nominal power per beam box)
374- - :math: `E_0 ` = 870×10³ eV (reference beam energy for hydrogen)
405+ - :math: `P_0 ` = 16.5e6 W (nominal power per beam box)
406+ - :math: `E_0 ` = 870e3 eV (reference beam energy for hydrogen)
375407 - :math: `E_\mathrm {beam}` is the beam energy
376408
377409 Define the following waveforms:
378410
379- 1. ``nbi/unit(1)/energy/data `` - linear ramps up from 0 to 500 keV , for 100 seconds, then flattops for 500 seconds, and then linearly ramps down for 100 seconds.
411+ 1. ``nbi/unit(1)/energy/data `` - linear ramps up from 0 to 500e3 , for 100 seconds, then flattops for 500 seconds, and then linearly ramps down for 100 seconds.
380412 2. ``nbi/unit(1)/power_launched/data `` - derived from the energy using the above equation.
381413
382414 .. md-tab-item :: Solution
@@ -417,11 +449,12 @@ Exercise 5a: Exporting from the UI
417449 at the instructions :ref: `here <gui >`.
418450
419451 We will export our EC beam power values to an ec_launchers IDS. Export the configuration
420- to an HDF5 file. Sample the time such that there are 20 points in the range from 0 to 800 .
452+ to an HDF5 file. Sample the time such that there are 20 points in the range from 0 to 800s .
421453
422454 Inspect the exported IDS using ``imas print <your URI> ec_launchers ``, which
423- quantities are filled? What happens with the values outside of the waveform range
424- (time steps later than 700 s)?
455+ quantities are filled? Notice that the waveform in the configuration runs from 0 to 700s,
456+ while you export from 0 to 800s . What happens with the exported values outside
457+ of the waveform (time steps later than 700 s)?
425458
426459 .. hint ::
427460 Detailed instructions on how to export the waveform configuration can be found :ref: `here <export_config >`.
0 commit comments