Skip to content

Commit d235ac3

Browse files
committed
BPM panel
1 parent 24416ae commit d235ac3

File tree

5 files changed

+89
-37
lines changed

5 files changed

+89
-37
lines changed
6.06 KB
Loading
9.78 KB
Loading

docs/css/custom_colors.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
--color-cernpurple: #6e2466;
1111
}
1212

13+
14+
/* Useful to set a `cern` blue as primary in mkdocs.yml (dark mode) */
15+
[data-md-color-primary="cern"] {
16+
--md-primary-fg-color: #0033a0;
17+
--md-primary-fg-color--light: #9BAEDB;
18+
--md-primary-fg-color--dark: #0033A0;
19+
}
20+
1321
/* General emphasis class */
1422
.omc-emph {
1523
color: var(--md-primary-fg-color);

docs/css/extra.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ a.cern_internal {
9090

9191
}
9292

93-
/* Useful to set a `cern` blue as primary in mkdocs.yml (dark mode) */
94-
[data-md-color-primary="cern"] {
95-
--md-primary-fg-color: #0033a0;
96-
--md-primary-fg-color--light: #9BAEDB;
97-
--md-primary-fg-color--dark: #0033A0;
98-
}
93+
9994

10095
/* Fix the Mathjax scrolling boxes issue */
10196
.md-typeset div.arithmatex {

docs/guis/betabeat/bpm_panel.md

Lines changed: 80 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
<figure>
44
<center>
5-
<img src="../../assets/images/betabeat_gui/bpm_panel.png" width="100%" alt="The BPM Panel"/>
5+
<img class="clickImg" src="../../assets/images/betabeat_gui/bpm_panel.png" width="100%" alt="The BPM Panel"/>
66
<figcaption>The BPM Panel.</figcaption>
77
</center>
88
</figure>
99

10-
The BPM panel provides a graphical interface to query and visualize information for the BPM data files, i.e. the Turn-by-Turn data.
10+
The BPM panel provides a graphical interface to query and visualize information for the BPM data files, i.e. the Turn-by-Turn data
11+
and select the data to be analyzed further.
1112

1213
## Loading Data
1314

1415
### Measurement Groups aka Kick Groups
1516

1617
!!! warning "Not yet implemented"
17-
The GUI does not yet support loading of measurement groups (i.e. kick groups).
18+
The GUI does [not yet support loading of measurement groups][issue282] (i.e. kick groups).
1819
The idea is to load all data from a single [kick-group, as defined in the Multiturn GUI](../multiturn/excitation.html#kick-groups) at once
1920
or monitor a currently active kick-group and load the files as they are created.
2021

@@ -24,7 +25,7 @@ Use the ++"Open Files"++{.green-gui-button} button to open turn-by-turn data.
2425

2526
<figure>
2627
<center>
27-
<img src="../../assets/images/betabeat_gui/open_files.png" width="80%" alt="Open Files Dialog"/>
28+
<img class="clickImg" src="../../assets/images/betabeat_gui/open_files.png" width="95%" alt="Open Files Dialog"/>
2829
<figcaption>The Open Files Dialog.</figcaption>
2930
</center>
3031
</figure>
@@ -34,45 +35,98 @@ Use the ++"Open Files"++{.green-gui-button} button to open turn-by-turn data.
3435
The name of the model will appear at the top of the GUI.
3536
This is required, as the BPMs are checked vs the model and sorted by longitunial location.
3637

37-
!!! warning "Naming Filter"
38+
!!! tip "Naming Filter"
3839
For the LHC, the displayed files in the file-dialog are automatically filtered to show only `@BunchTurn` files of the currently selected beam.
3940
You can change/deactivate that filter ("Files of Type") at the bottom of the dialog!
4041

4142
Multiple files can be opened at once and are added to the current `Measurements` directory, as well as to the table of loaded files in the panel.
42-
If the file contained multiple bunches, they are added as separate entries.
43+
If the file contained multiple bunches, they are added as separate entries (see [below](#table-of-loaded-files)).
4344

44-
!!! warning "Supported Formats"
45-
The GUI itself only supports the opening of LHC-type (dual plane BPMs) or SPS-type (single plane BPMs) binary `.sdds` files.
46-
You can choose in the [gui tab of the settings](settings.md#gui-tab) which format your turn-by-turn data is and if you want
47-
to convert it into one of the supported formats.
48-
The GUI will then call the [`omc3.tbt_converter`][tbt_converter] to convert the file.
49-
All formats that can be read by the [`turn-by-turn` package][tbt_package] are supported.
50-
If you choose the **"DO NOT CONVERT"** option, the files are simply copied into the current `Measurements` directory.
45+
If the ["Analyse TbT files on opening" setting](settings.md#gui-tab) is active, a window will open to prompt the user with the ["Do analysis Dialog"][do_analysis_dialog].
5146

52-
If the ["Analyse TbT files on opening" setting](settings.md#gui-tab) is active, a window will open to prompt the user with the ["Do analysis Dialog"](bpm_panel.md#do-analysis).
47+
!!! tip "Reopening Files"
48+
- If you are opening a file with the same filename as an already opened file, an error will be thrown.
49+
- If you want to open a new file with the same name as an previously opened file, i.e. one with the same name in the `Measurements` directory,
50+
a popup will ask if the old file should be overwritten or simply opened instead (without running the converter).
51+
- If you restart the GUI and select the ["Load Data" option in the beam selection window](beam_selection.md#load-data),
52+
all files in the `Measurements` directory will be reloaded (without running the converter).
5353

54-
## Investigating Data
54+
#### Supported File Formats
55+
56+
The GUI itself only supports the opening of LHC-type (dual plane BPMs) or SPS-type (single plane BPMs) binary `.sdds` files.
57+
You can choose in the [gui tab of the settings](settings.md#gui-tab) which format your turn-by-turn data is and if you want
58+
to convert it into one of the supported formats.
59+
The GUI will then call the [`omc3.tbt_converter`][tbt_converter] to convert the file.
60+
All formats that can be read by the [`turn-by-turn` package][tbt_package] are supported.
61+
If you choose the **"DO NOT CONVERT"** option, the files are simply copied into the current `Measurements` directory.
62+
63+
!!! tip "LHC ASCII files"
64+
The old ASCII format (for SPS and LHC), which is still in use in some older conversion scripts and MAD-X tracking scripts,
65+
are identified automatically by the converter when choosing `lhc` or `sps` as the file type to be opened.
66+
Use then **the same format** for the conversion, i.e. `lhc` or `sps` respectively.
67+
This looks weird, but the converter will output the data in binary format.
68+
69+
## Table of Loaded Files
70+
71+
<figure>
72+
<center>
73+
<img class="clickImg" src="../../assets/images/betabeat_gui/bpm_panel_table.png" width="100%" alt="Table of loaded files"/>
74+
<figcaption>The Table of loaded files in the BPM Panel.</figcaption>
75+
</center>
76+
</figure>
77+
78+
The table at the top of the panel shows the files that are currently opened in the GUI.
79+
These are not necessarily all files present in the `Measurement` directory, as they need to be explicitly opened!
80+
81+
82+
- **File**:
83+
Name of the file, without the path.
84+
- **Bunch ID**:
85+
The ID of the bunch within the file.
86+
If the file contains multiple bunches, multiple entries with the same _File_ name, but different _Bunch IDs_ will be created.
87+
- **Analysis Done**:
88+
Idicator if the analysis has been performed on this file.
89+
_(:fontawesome-solid-triangle-exclamation:{.warning-colored} [Currently not working.][issue285])_
90+
- **Kick Group**:
91+
Name of the [Kick Group](#measurement-groups-aka-kick-groups) this file belongs to.
92+
_(:fontawesome-solid-triangle-exclamation:{.warning-colored} [Currently not working.][issue282])_
93+
- **No. of bad BPMs**:
94+
Number of [bad BPMs][bpm_filtering] identified in this file.
95+
This value is `0` upon loading the file and will be updated when the harmonic analysis is done.
96+
These will be marked in red in the BPM lists below.
97+
98+
!!! warning "Memory Usage"
99+
File that are opened in this panel are stored in memory.
100+
If your computer is running low on memory, you might want to close some of the open files.
101+
102+
### Removing Entries
103+
104+
Clicking on the ++"Remove"++{.red-gui-button} button will remove the selected entries from the table of loaded files.<br>
105+
:fontawesome-solid-triangle-exclamation:{.warning-colored} This will **not** remove the files from the `Measurements` directory!
106+
107+
## Investigating Turn-by-Turn Data
55108

56109
After selecting one or more files in the table of loaded files, the turn-by-turn data is visualized in the two bottom charts, one for each plane.
57110
The charts are [interactive](common_components.md#plotting) and can display either the measured amplitude values over turns for every BPM from the list or display the phase space, which is calculated by two consecutive BPMs.
58111
You can select multiple measurements at once to compare them, but only one BPM per plane at a time.
59112

60113
<figure>
61114
<center>
62-
<img src="../../assets/images/betabeat_gui/bpm_turn_by_turn_data.png" width="100%" alt="Turn-by-Turn view of BPM data"/>
115+
<img class="clickImg" src="../../assets/images/betabeat_gui/bpm_turn_by_turn_data.png" width="100%" alt="Turn-by-Turn view of BPM data"/>
63116
<figcaption>Turn-by-Turn view of BPM data with two measurements selected.</figcaption>
64117
</center>
65118
</figure>
66119

67120
<figure>
68121
<center>
69-
<img src="../../assets/images/betabeat_gui/bpm_data_phase_space.png" width="100%" alt="Phase space view of BPM data"/>
122+
<img class="clickImg" src="../../assets/images/betabeat_gui/bpm_data_phase_space.png" width="100%" alt="Phase space view of BPM data"/>
70123
<figcaption>Phase space view of BPM data.</figcaption>
71124
</center>
72125
</figure>
73126

74127
!!! info "Bad BPMS"
75128
After [harmonic-analysis](#do-analysis) has been performed, the [bad BPMS][bpm_filtering] will be marked in red in the lists.
129+
_(To be checked: This feature might only work if you re-load the data after the analysis.)_
76130

77131
### Averages, Removal of Turns and Splitting Files
78132

@@ -85,23 +139,18 @@ The buttons on the top left side of the pane provide some features to handle the
85139
- ++"Remove Turns"++ can be used to cut turns from the start or the end, to focus on a specified range of the data.
86140
- ++"Split Files"++ splits the current BPM data file into N files, where N is specified in the dialog and the resulting files will have old-turns/N turns.
87141

88-
## Do Analysis
89-
90-
- `Do Analysis` spawns the configuration dialogue for the external analysis.
91-
This will call an external program to perform harmonic analysis of the BPM data, in order to compute tunes and similar beam properties.
92-
The results from the analysis can be seen in the [Analysis Panel](analysis_panel.md).
93-
94-
!!! todo
95-
96-
Include of screenshot of `Do Analysis` dialogue window.
142+
## Start Analysis
97143

98-
!!! note
144+
The ++"Analyse Spectra"++{.green-gui-button} button spawns [the configuration dialog][do_analysis_dialog] for the harmonic analysis.
145+
This will call an external program to perform a frequency analysis of the BPM data **of the selected files**, in order to compute tunes and similar beam properties.
146+
The results from the analysis can be seen in the [Analysis Panel](analysis_panel.md), in which also the settings are discussed in detail.
99147

100-
The `Create Average` option requires synchronized data from withing the same bounds, otherwise the results will be meaningless.
101-
The figure below shows three runs from LHC beam one with synchronized peaks for every turn and their corresponding averages.
148+
The **"Run optics as well"** checkbox will define whether the _"Optics Analysis"_ in the _["Do analysis Dialog"][do_analysis_dialog]_ is automatically pre-checked.
102149

103-
[svd_clean_rhic]: https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB.7.042801
104150
[tbt_converter]: https://github.com/pylhc/omc3/blob/master/omc3/tbt_converter.py
105151
[tbt_package]: https://github.com/pylhc/turn_by_turn
152+
[issue282]: https://gitlab.cern.ch/acc-co/lhc/lhc-app-beta-beating/-/issues/282
106153
[issue283]: https://gitlab.cern.ch/acc-co/lhc/lhc-app-beta-beating/-/issues/283
107-
[bpm_filtering]: ../../measurements/physics/bpm_filtering.md
154+
[issue285]: https://gitlab.cern.ch/acc-co/lhc/lhc-app-beta-beating/-/issues/285
155+
[bpm_filtering]: ../../measurements/physics/bpm_filtering.md
156+
[do_analysis_dialog]: analysis_panel.md#do-analysis-dialog

0 commit comments

Comments
 (0)