You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guis/betabeat/analysis_panel.md
+36-27Lines changed: 36 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,15 @@ The analysis panel provides graphical interface to visualize results from harmon
11
11
12
12
## Loading Files
13
13
14
-
The buttons at the top of the panel provide functionality to load and remove files from the analysis table as well as to start the [optics analysis](#do-optics-dialog).
14
+
When the `harpy` analysis is started from the [BPM-Panel](bpm_panel.md), the results are automatically loaded when the analysis task has finished.
15
+
The buttons at the top of the panel provide functionality to manually load files and remove entries from the analysis table,
16
+
as well as to start the [optics analysis](#do-optics-dialog).
15
17
16
18
- ++"Open Files"++{.green-gui-button}: Opens a dialog to select files to be loaded. The files will be **copied** into the `Measurements` folder and opened from there.
17
19
- ++"Attach Files"++{.yellow-gui-button}: Opens a dialog to select files to be loaded. The files will be **opened from their current location**.
18
20
- ++"Delete Files"++{.red-gui-button}: Removes the selected files from the analysis table.
21
+
A dialog will pop up, asking if the files should only be removed from this table, i.e. from being loaded in memory (see admonition below), or if they should also be deleted from disk.<br>
22
+
:fontawesome-solid-triangle-exclamation:{.warning-colored} Due to [an unresolved issue][issue268]{target=_blank} it is currently **not advised** to delete files from disk.
19
23
- ++"Get Optics"++{.green-gui-button}: Opens [the optics analysis dialog](#do-optics-dialog) which can trigger an external python script to compute the optics functions from the harmonic analysis data of the selected files.
20
24
21
25
<figure>
@@ -31,7 +35,7 @@ The buttons at the top of the panel provide functionality to load and remove fil
31
35
32
36
## The Time / Space Tab
33
37
34
-
In the `Time / Space` tab one can examine the phases and amplitudes over the length of the accelerator (per BPM), and can clean the values if needed.
38
+
In the `Time / Space` tab one can examine the phases and amplitudes of different spectral lines over the length of the accelerator (per BPM), and perform cleaning procedures if needed.
35
39
36
40
<figure>
37
41
<center>
@@ -42,10 +46,11 @@ In the `Time / Space` tab one can examine the phases and amplitudes over the len
42
46
43
47
In the lists on the left-hand side, one can select from the resulting values of the [`harpy` analysis].
44
48
These correspond to the columns in the `.lin[xy]` files and are separated by plane.
45
-
In here you can find phase (`PHASE`), frequency (`FREQ`) and amplitude (`AMP`) of the lines identified by `harpy`and their respective errors (`ERR`).
49
+
These include phase (`PHASE`), frequency (`FREQ`) and amplitude (`AMP`) of the lines identified by `harpy`as well as their respective errors (`ERR`).
46
50
The lines are multiples of the found tunes (`TUNE`) and can be identified by the two numbers in their name,
47
-
which correspond to the multiples of the horizontal and vertical tune, respectively, using underscores to represent a minus sign.
48
-
In addition to these lines additional data from the harmonic analysis is available, such as:
51
+
which correspond to the multiples of the horizontal and vertical tune, respectively, using underscores to represent a minus sign;
52
+
e.g. `PHASE1_2`, as seen in the screenshot above, corresponds to the phase of the line at frequency `Qx - 2Qy`.
53
+
In addtion, further data from the harmonic analysis is available, such as:
49
54
50
55
-`TUNE`: (driven) tune
51
56
-`NATTUNE`: natural tune (if available)
@@ -55,7 +60,7 @@ In addition to these lines additional data from the harmonic analysis is availab
55
60
-`PK2PK`: peak-to-peak oscillation value
56
61
-`NOISE`: estimated cleaned noise
57
62
58
-
It is possible to select multiple files (++ctrl++ / ++shift++) at once to compare the same value between them and also multiple entries, e.g. to compare the amplitudes of different lines.
63
+
It is possible to select multiple files (++ctrl++ / ++shift++) at once, to compare the same quantities between measurements, and also multiple entries, e.g. to compare the amplitudes of different lines.
59
64
60
65
!!! tip "Deselection"
61
66
To see the data of one plane only, one can deselect the other plane by either chosing `None` at the bottom of the list
@@ -100,9 +105,11 @@ which trigger the python [`linfile_clean` script][omc3_linfile_clean]{target=_bl
100
105
</center>
101
106
</figure>
102
107
103
-
This section allows for the most manual cleaning of the data: You can set the cursors (lines) around the data that you want to keep,
104
-
either manually by dragging their markers on the right-hand-side of the chart, or by using the ++"Set Cursors"++ button,
105
-
which will set them at the position corresponding to the _Sigmas_, i.e. the number of standard deviations away from the mean **of all data currently shown in the chart**.
108
+
This section allows for the most manual cleaning of the data by setting the cursors (lines) around the data to keep.
109
+
This can be done manually by dragging their markers on the right-hand-side of the chart.
110
+
They can also be set automatically at the position corresponding to the _Sigmas_,
111
+
i.e. the number of standard deviations away from the mean **of all data currently shown in the chart**,
112
+
by using the ++"Set Cursors"++ button.
106
113
Then press ++"Clean"++{.red-gui-button} to remove the data outside of the selected area, as shown in the images above.
107
114
108
115
!!! info "Automatic Data Selection"
@@ -115,8 +122,8 @@ Then press ++"Clean"++{.red-gui-button} to remove the data outside of the select
115
122
116
123
#### Auto Clean
117
124
118
-
A more automated cleaning approach can be utilized with the help of the _outlier filter_ (see Section 3.2.3 in [Malina2018][malina2018]
119
-
or Section II.E.1 in [Dilly2023][dilly2023]), which iteratively removes points in the tails of the data until the distribution of the remaining data is close to a normal distribution.
125
+
A more automated cleaning approach can be utilized with the help of the _outlier filter_ (see Section 3.2.3 in [Malina2018][malina2018]{target=_blank}
126
+
or Section II.E.1 in [Dilly2023][dilly2023]{target=_blank}), which iteratively removes points in the tails of the data until the distribution of the remaining data is close to a normal distribution.
120
127
The _limit_ parameter defines a "save zone" in standard deviations around the mean, in which data will not be removed (default: `0.0`, i.e. any datapoint could be removed).
121
128
This cleaning can be run by simply pressing the ++"Auto"++{.red-gui-button} button and is then applied to **all data currently shown in the chart**, individually per column, plane and `sdds`-file.
122
129
@@ -229,16 +236,15 @@ The lines in the charts will only update after clicking ++"Approve"++.
229
236
</center>
230
237
</figure>
231
238
232
-
233
239
### Natural Tune Window
234
240
235
-
The natural tune window controls help you, to correctly identify the natural tune in the spectrum and assign it to the `NATTUNE`-column in the lin-file
236
-
using the [`update_nattune_in_linfile` script][omc3_update_nattune]{target=_blank} and
237
-
helps to avoid re-running the `harpy` analysis with different tolerance windows and natural tunes settings.
241
+
The natural tune window controls help to correctly identify the natural tune in the spectrum and assign it to the `NATTUNE`-column in the lin-file
242
+
using the [`update_nattune_in_linfile` script][omc3_update_nattune]{target=_blank}.
243
+
This avoids having to re-run the `harpy` analysis with different tolerance windows and natural tunes settings.
238
244
Accurate identification of the natural tune is important e.g. for [amplitude detuning analysis][amplitude_detuning_analysis].
239
245
240
-
There are two main reasons, why the natural tune line might be misidentified in the spectrum by the `harpy` analysis,
241
-
even when the natural tune and tolerance window are set "correctly" in the [`Tune Settings`](settings.md#tunes-tab):
246
+
There are two main reasons for a possible misidentification of the natural tune line in the spectrum by the `harpy` analysis,
247
+
even when the values are set "correctly" (in accordance with the model) in the [`Tune Settings`](settings.md#tunes-tab):
242
248
243
249
- Due to detuning, the natural tune line can be shifted and might not be any longer within the tolerance window.
244
250
This can in particular happen during a wide range of amplitude detuning scans, for which one does not want to change the tolerance window at every kick,
@@ -271,7 +277,7 @@ both of which are taken from the [`Tune Settings`](settings.md#tunes-tab).
271
277
</center>
272
278
</figure>
273
279
274
-
You can now adapt the cursors to your liking, such that the natural tune line is the highest line between them,
280
+
Adapt the cursors such that the natural tune line is the highest line between them,
275
281
avoiding resonances and the driven tune line.
276
282
For measurements with many BPMs not showing a clear natural tune line, tightening the window can also help reducing the errorbar on the tune.
277
283
@@ -315,7 +321,8 @@ Use the first drop-down in the chart options to select the display type of the c
315
321
This shows the spectrum in a stem plot, i.e. as thin vertical lines for each measured frequency, starting at the bottom of the chart and ending in a marker at the amplitude value.
316
322
-**Bars**:
317
323
This also shows the spectrum in a stem-like plot, but with wider stems and no markers at the top.
318
-
This was the default in GUI versions pre 2019 and comes with a warning: When plotting multiple files/BPMs the bars are "stacked" **next** to each other, which makes it hard to see which frequency they actually belong to.
324
+
This was the default in GUI versions pre 2019 and comes with a warning: When plotting multiple files/BPMs the bars are "stacked" **next** to each other,
325
+
which makes it hard to see which frequency they actually belong to.
319
326
-**Points**:
320
327
This shows the spectrum in a scatter plot, i.e. as markers for each frequency set at the corresponding amplitude.
321
328
These are the markers of the _Stems_ plot, but without the actual stems.
@@ -332,9 +339,10 @@ The output will look exactly like the chart in the GUI, as it is rendered direct
332
339
This button allows passing the currently selected data to the [`plot_spectrum` script][omc3_plot_spectrum]{target=_blank} to save the spectrum as a **PDF file**.
333
340
As the spectrum is completely rendered by the `python` script, the output will look different from the chart in the GUI but will show in general the same information, with some important caveats listed below.
334
341
335
-
- Clicking the button you will be requested to select an output **directory**.
342
+
- Clicking the button will open a dialog to select an output **directory**.
336
343
As multiple files might be created, the filenames are determined automatically.
337
-
Then a dialog will pop up, in which you can change the path again, but also define which data should be plotted in the same file:
344
+
Subsequently, a second dialog will appear, displaying the selected path (modifiable if required).
345
+
In this window, the data to be grouped within the same plots/files can be defined:
338
346
339
347
<figure>
340
348
<center>
@@ -344,18 +352,18 @@ As the spectrum is completely rendered by the `python` script, the output will l
344
352
</figure>
345
353
346
354
- In any case, the spectrum of horizontal and vertical BPMs will be split into separate plots on the top and bottom of the same file.
347
-
Which also means, that no matter in which plane you have selected a BPM - if it has a horizontal and a vertical spectrum they will both be plotted.
355
+
Which also means, that no matter in which plane you have selected a BPM - if it has a horizontal and a vertical spectrum they will both be plotted.
348
356
- _"Combine Plots by BPMs"_: Will plot all selected BPMs into the same plots in the same file, with the BPM name in the legend.
349
-
If deactivated, there will be separate files per BPM with the BPM name in the filename.
357
+
If deactivated, there will be separate files per BPM with the BPM name in the filename.
350
358
- _"Combine Plots by Measurements"_: Will plot all selected Mesurements into the same plots in the same file, with the Measurement name in the legend.
351
-
If deactivated, there will be separate files per Measurement with the Measurement name in the filename.
352
-
- Having both _"BPMs"_ and _"Measurements"_ activated will therefore lead to a single output file, with two charts (for the horizontal and vertical planes) and a combination of BPM-names and Measurement-names as legend.
359
+
If deactivated, there will be separate files per Measurement with the Measurement name in the filename.
360
+
- Having both _"BPMs"_ and _"Measurements"_ activated will therefore lead to a single output file, with a chart for each plane and a combination of BPM and Measurementnames as legend.
353
361
- Having both _"BPMs"_ and _"Measurements"_ deactivated will lead to `N = No. of selected BPMs x No. of selected Measurements` files, containing two charts for the planes with each showing only a single spectrum.
354
-
Both, BPM name and Measurement name will be in the filename.
362
+
Both, BPM and Measurement name will be in the filename.
355
363
356
364
## Do Optics Dialog
357
365
358
-
The ++"Get Optics"++{.green-gui-button} button opens a dialog that allows you to select the settings for the [optics analysis][optics_analysis],
366
+
The ++"Get Optics"++{.green-gui-button} button opens a dialog to select the settings and run the [optics analysis][optics_analysis],
359
367
which will calculate the optics parameters based on the spectra of the [currently selected files](#loading-files).
360
368
361
369
=== "Closed Settings"
@@ -402,6 +410,7 @@ one can change the [settings](settings.md) of the _[Optics tab](settings.md#opti
Copy file name to clipboardExpand all lines: docs/guis/betabeat/settings.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The settings window can be initialized by the gear icon <span class="settings-ic
12
12
13
13
!!! info "Defaults"
14
14
The "Default" values given here are the defaults used in `python`,
15
-
These might not be up-to-date, check the [omc3 python documentation][python-docs]{:target="_blank"} for more information.
15
+
These might not be up-to-date, check the [omc3 python documentation][python-docs]{target=_blank} for more information.
16
16
They might also be different from the defaults used in the GUI, as there are some defaults set upon startup determined by the selected machine.
17
17
These GUI defaults are directly visible in the settings, while the `python` defaults are used when no value is given.
18
18
@@ -22,7 +22,7 @@ There is some general behaviour, that is true for all settings-tabs:
22
22
23
23
-**Empty** text-fields are treated as _"Not given"_ and the **`python` defaults** will be used.
24
24
-**Hovering the mouse over the label** of a setting will give additional information.
25
-
This is often the `help` provided by the corresponding `python` argument. Check the [omc3 python documentation][python-docs]{:target="_blank"} for more information.
25
+
This is often the `help` provided by the corresponding `python` argument. Check the [omc3 python documentation][python-docs]{target=_blank} for more information.
26
26
- Entries in the settings that are lists (e.g. _Turns_, which will be `STARTTURN ENDTURN`) are given as **space-separated** values, NOT comma separated.
27
27
- Of the buttons at the bottom, the top row refers to the current tab, the bottom row to all tabs.
28
28
- Settings that have been changed since the last ++"Apply"++ / ++"Apply All"++ are <spanstyle="color: red">highlighted in red</span> and can be reverted with the ++"Reset"++ button.
Copy file name to clipboardExpand all lines: docs/guis/usage/guidelines.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ This is for three reasons:
11
11
12
12
### Model-View-Controller Architecture
13
13
14
-
While not strictly enforced, our GUIs follow the [Model-View-Controller][mvc_wiki]{target="_blank"} architecture,
14
+
While not strictly enforced, our GUIs follow the [Model-View-Controller][mvc_wiki]{target=_blank} architecture,
15
15
as it is a very useful and therefore also very common GUI pattern.
16
-
[A better explanation can be found here][mvc_geeks]{target="_blank"}, but this section summarizes a few key points relevant to our usecase.
16
+
[A better explanation can be found here][mvc_geeks]{target=_blank}, but this section summarizes a few key points relevant to our usecase.
17
17
18
18
The main philosophy of the MVC architecture is to separate the actual GUI elments, the _View_, from the underlying data, stored in the _Model_,
19
19
and let the _Controller_ handle the communication between the two and with the user.
@@ -35,7 +35,7 @@ this code has been used for many years and probably will be continued to be used
35
35
36
36
**Try to keep it clean!**
37
37
38
-
Because GUI testing is hard and because we have easy access to old versions via [CAS][cas_cern]{target="_blank" .cern_internal},
38
+
Because GUI testing is hard and because we have easy access to old versions via [CAS][cas_cern]{target=_blank .cern_internal},
39
39
there is no tests suite and no review process for the `java` development and changes can be simply pushed to the `master` branch.
40
40
41
41
Some "best practices" have been established through the years:
@@ -51,9 +51,9 @@ Some "best practices" have been established through the years:
51
51
- Do not use `Strings` for file paths, for now we mostly use `File` objects (but see also the [Issue #239][issue_239]).
52
52
53
53
!!! tip "Factory Pattern"
54
-
One pattern that you will find in different places of `java` code is the [factory design-pattern][factory_pattern_wiki]{target="_blank"}.
54
+
One pattern that you will find in different places of `java` code is the [factory design-pattern][factory_pattern_wiki]{target=_blank}.
55
55
While useful in some scenarios, I personally (jdilly) find it too verbose and annoying to implement,
56
-
in the past there were even [scripts to automatically write the factory-code][internal_program_writer]{target="_blank"} because it needs so many lines of repeating code.
56
+
in the past there were even [scripts to automatically write the factory-code][internal_program_writer]{target=_blank} because it needs so many lines of repeating code.
57
57
58
58
In particular, this pattern was used for the [creation of the `ExternalProgram` classes][factory_pattern_doc] to allow the setting of
59
59
multiple attributes before even creating the class, without having to write multiple constructors
0 commit comments