Skip to content

Commit f832259

Browse files
committed
bpms and such
1 parent 3eda7d8 commit f832259

File tree

5 files changed

+61
-57
lines changed

5 files changed

+61
-57
lines changed
52.3 KB
Loading
69.2 KB
Loading
8.62 KB
Loading
22.6 KB
Loading

docs/guis/betabeat/bpm_panel.md

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,91 +8,89 @@
88
</center>
99
</figure>
1010

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

12-
The BPM panel provides a graphical interface to query and visualize information for the BPM data files.
13-
It can load data files for all supported beams, mostly binary SDDS files or files in the SDDS ASCII format.
1413

15-
!!! todo
16-
17-
Include a screenshot, possibly of settings when opening files?
18-
19-
## Opening Files and Applying SVD Cleaning
20-
21-
### Opening Files
22-
23-
- Each tab has now an <span style="color:green;">Open Files</span> button, which opens only the files specific to this tab.
24-
- The magic <span style="color:green">**+**</span> button is gone, as its functionality was confusing (and there were different stories about its workings).
25-
26-
### Automatic BPM removal
14+
## Loading Data
2715

28-
First, BPMs are removed based on the following criteria:
16+
### Measurement Groups aka Kick Groups
2917

30-
- known bad BPMs (list is provided in `Beta-Beat.src/harmonic_analysis/clean.py` and can be extended in `Bad BPMs` field)
31-
- BPMs which are not found in the model are discarded
32-
- Flat BPMs (difference between min/max is smaller than `Pk-2-pk cut`)
33-
- Spiky BPMs (value higher than `Max peak cut` found in at least one turn)
34-
- An exact 0 is detected in at least one turn
18+
!!! warning "Not yet implemented"
19+
The GUI does not yet support loading of measurement groups (i.e. kick groups).
20+
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
21+
or monitor a currently active kick-group and load the files as they are created.
3522

36-
### SVD-cleaning
3723

38-
Secondly, SVD cleaning is performed.
39-
SVD modes with localized spikes in their spatial vectors indicate faulty BPMs using `Sum square` setting to find such spikes.
40-
To globally reduce the noise on all BPM readings, only a predefined number of strongest singular modes (`Sing val cut`) remain in the turn-by-turn data.
41-
While the `Sum square` setting has a direct influence on the number of BPMs identified as faulty, the number of modes affects the overall noise level in turn-by-turn signal.
42-
The original application of SVD on BPMs data cleaning can be found [in this publication][svd_clean_rhic].
24+
### Open Files
4325

44-
If SVD is enabled in the settings, the external SVD cleaning python script will be called for the current file during the loading process.
45-
when SVD cleaning detects and removes bad BPMs, they will be marked in the BPM names list.
26+
Use the ++"Open Files"++{.green-gui-button} button to open turn-by-turn data.
4627

47-
All the settings mentioned above can be changed in the global settings panel:
4828
<figure>
4929
<center>
50-
<img src="../../assets/images/cleaning_settings.png" width="95%" alt="Cleaning thresholds in the settings panel"/>
51-
<figcaption>Settings panel, where cleaning thresholds can be changed.</figcaption>
30+
<img src="../../assets/images/betabeat_gui/open_files.png" width="80%" alt="Open Files Dialog"/>
31+
<figcaption>The Open Files Dialog.</figcaption>
5232
</center>
5333
</figure>
5434

55-
Turn-by-turn data cleaning is summarized in the output file which can be found at:
56-
`Measurements/[email protected]/[email protected]_bpms_{x,y}.`
35+
!!! warning "Model Required"
36+
To be able to load files, you need to first need to have a [model loaded](model_creation.md#model-selection-window).
37+
The name of the model will appear at the top of the GUI.
38+
This is required, as the BPMs are checked vs the model and sorted by longitunial location.
5739

58-
It contains BPM names and corresponding threshold which identified a BPM as faulty.
40+
!!! warning "Naming Filter"
41+
For the LHC, the displayed files in the file-dialog are automatically filtered to show only `@BunchTurn` files of the currently selected beam.
42+
You can change/deactivate that filter ("Files of Type") at the bottom of the dialog!
5943

60-
!!! note
61-
62-
A single BPM can appear twice (for each threshold separately), e.g. in the case of exact zero flat signal.
63-
64-
The content of the loaded files will be displayed in two charts:
44+
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.
45+
If the file contained multiple bunches, they are added as separate entries.
6546

66-
- Horizontal BPMs,
67-
- Vertical BPMs.
47+
!!! warning "Supported Formats"
48+
The GUI itself only supports the opening of LHC-type (dual plane BPMs) or SPS-type (single plane BPMs) binary `.sdds` files.
49+
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
50+
to convert it into one of the supported formats.
51+
The GUI will then call the [`omc3.tbt_converter`][tbt_converter] to convert the file.
52+
All formats that can be read by the [`turn-by-turn` package][tbt_package] are supported.
53+
If you choose the **"DO NOT CONVERT"** option, the files are simply copied into the current `Measurements` directory.
6854

69-
!!! todo
70-
71-
Include a screenshot with two BPM panels.
55+
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).
7256

73-
The charts are interactive and can be used to zoom in/out, or focus on a given rectangle of the shown data.
7457

75-
The charts 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.
58+
## Investigating Data
7659

77-
!!! todo
60+
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.
61+
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.
62+
You can select multiple measurements at once to compare them, but only one BPM per plane at a time.
7863

79-
Include a screenshot of the bad bpms panel.
64+
<figure>
65+
<center>
66+
<img src="../../assets/images/betabeat_gui/bpm_turn_by_turn_data.png" width="100%" alt="Turn-by-Turn view of BPM data"/>
67+
<figcaption>Turn-by-Turn view of BPM data with two measurements selected.</figcaption>
68+
</center>
69+
</figure>
8070

81-
## Removing Turns and Computing an Average
71+
<figure>
72+
<center>
73+
<img src="../../assets/images/betabeat_gui/bpm_data_phase_space.png" width="100%" alt="Phase space view of BPM data"/>
74+
<figcaption>Phase space view of BPM data.</figcaption>
75+
</center>
76+
</figure>
8277

83-
The buttons on the top left side of the pane provide useful features to handle the BPM data.
78+
!!! info "Bad BPMS"
79+
After [harmonic-analysis](#do-analysis) has been performed, the [bad BPMS][bpm_filtering] will be marked in red in the lists.
8480

85-
- `Remove Turns` can be used to cut turns from the start or the end, to focus on a specified range of the data.
81+
### Averages, Removal of Turns and Splitting Files
8682

87-
!!! todo
83+
!!! warning "Broken Functionality"
84+
These features [are currently broken][issue283] and we are considering whether they are actually needed.
8885

89-
Include a screenshot of before-after comparison for `Remove Turns`.
86+
The buttons on the top left side of the pane provide some features to handle the BPM data.
9087

91-
- `Create Average` allows loading several data files too visualize their average repesentations on the same graph, which helps detecting differences or reducing noise.
88+
- ++"Create Average"++ allows loading several data files too visualize their average repesentations on the same graph, which helps detecting differences or reducing noise.
89+
- ++"Remove Turns"++ can be used to cut turns from the start or the end, to focus on a specified range of the data.
90+
- ++"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.
9291

93-
!!! todo
92+
## Do Analysis
9493

95-
Include a screenshot of `Create Average` effect.
9694

9795
- `Do Analysis` spawns the configuration dialogue for the external analysis.
9896
This will call an external program to perform harmonic analysis of the BPM data, in order to compute tunes and similar beam properties.
@@ -107,4 +105,10 @@ The buttons on the top left side of the pane provide useful features to handle t
107105
The `Create Average` option requires synchronized data from withing the same bounds, otherwise the results will be meaningless.
108106
The figure below shows three runs from LHC beam one with synchronized peaks for every turn and their corresponding averages.
109107

110-
[svd_clean_rhic]: https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB.7.042801
108+
109+
110+
[svd_clean_rhic]: https://journals.aps.org/prab/abstract/10.1103/PhysRevSTAB.7.042801
111+
[tbt_converter]: https://github.com/pylhc/omc3/blob/master/omc3/tbt_converter.py
112+
[tbt_package]: https://github.com/pylhc/turn_by_turn
113+
[issue283]: https://gitlab.cern.ch/acc-co/lhc/lhc-app-beta-beating/-/issues/283
114+
[bpm_filtering]: ../../measurements/physics/bpm_filtering.md

0 commit comments

Comments
 (0)