1+ """
2+ Help Dialogs
3+ ------------
4+ """
5+
6+ from qtpy .QtCore import Qt
7+ from qtpy .QtWidgets import QMessageBox
8+
9+ def show_help_dialog ():
10+ help_text = """
11+ <h3> Frequently Asked Questions </h3><br>
12+
13+ <br>
14+ <b> How do I open a Measurement ?</b><br>
15+
16+ One way to open measurements automatically, is to give them as command line
17+ arguments when starting the sbs_gui, either <i> -m </i> or <i> --measurements </i>.<br>
18+ If you want to load them manually, you click the <i>Load</i> button.<br><br>
19+
20+ The given/selected measurements can be either <i>omc3 optics folders, folders containing sbs-json files
21+ or sbs-json files</i> directly.
22+ The latter are created automatically in the measurement-output folder when editing a loaded measurement.<br>
23+
24+ <br>
25+
26+ <b> Do I have to invert my corrections when using them in the machine? </b><br>
27+
28+ YES! <i>(but it depends)</i><br>
29+ The "corrections" here are actually used to match the model opttics to the
30+ mesured optics (see the info about the dashed "corr" line below).
31+ Therefore you have to invert them, to actually use them as corrections in the machine. <br>
32+ <b> NOTE </b> that these are the MAD-X values. Make how the signs are actually
33+ mapped in the machine! <br>
34+
35+ <br>
36+
37+ <b> What is the solid line ?</b><br>
38+
39+ The solid line is the difference between the Measurement and
40+ the propagated model, i.e. the Measurement at the start (or end) of the segment
41+ propagated through the nominal model via MAD-X.<br>
42+ This line therefore shows you how much the optics deviate through the segment
43+ from the nominal model.<br>
44+
45+ <br>
46+
47+ <b> What is the dashed line that says "corr" ?</b><br>
48+
49+ This is the difference between the <i>"corrected"</i> propagated model and the
50+ nominal propagated model.<br>
51+ This means in both cases the measured values are used as initial conditions.
52+ What you are trying to achieve is a match between the dashed and the solid line,
53+ because that means that now your model matches the optics in the measured data.<br>
54+
55+ <br>
56+
57+ <b> What is the dashed line that says "expct" ?</b><br>
58+
59+ This is the difference between the Measurement and the "corrected" propagated model
60+ and is therefore the <i>expected</i> measured difference to the nominal model after
61+ applying the correction in the machine (same as in global correction).<br>
62+ You can activate this view via the plot-settings <i>"Expectation"</i>.<br>
63+
64+ <br>
65+
66+ <b> Shortcuts </b><br>
67+
68+ In Graph:<br>
69+ <i>Double-Click</i> : Zoom history back one step. <br>
70+ <i>Right-Click</i> : Zoom history back one step. <br>
71+ <i>Shift + Right-Click</i> : Zoom history back all steps. <br>
72+ <i>Alt + Right-Click</i> : pyqtgraph context menu. <br>
73+
74+ <br>
75+
76+ In Measurements-List:<br>
77+ <i>Double-Click</i> : Edit the Measurement.<br>
78+
79+ <br>
80+
81+ """
82+
83+ msg_box = QMessageBox (icon = QMessageBox .Information )
84+ msg_box .setWindowTitle ("Help" )
85+ msg_box .setTextFormat (Qt .TextFormat .RichText )
86+ msg_box .setText (help_text )
87+ msg_box .exec_ ()
0 commit comments