The cryomag_panels module
Panels for controlling cryostat-magnet systems
This module provides a versatile panel for receiving data from and sending
data to a cryostat-magnet system, featuring an indicator to show received
values, a control for setting new values, and a button for sending commands.
Classes
GridPanel
-
class src.gui.instruments.cryomag_panels.GridPanel(parent, panelLabel, rowLabels, buttonIDs=None)[source]
A panel for displaying and setting values, allowing arbitrary rows.
- This panel features four columns:
- A label to indicate what the row represents.
- An indicator to show a measured value.
- A control for specifying new setpoints.
- A button for sending the setpoint to the appropriate handler.
The rows which receive buttons is somewhat customizable. If the
buttonIDs is set to None, no buttons will be created. If it is a
single integer or a list of integers of length 1, a single button will
be created in the last row. If it is a list of integers of the same
length as the list of row labels, each row will receive a button.
Even if no buttons are to be added, the space will be reserved for them
to ensure that, when multiple instances of this panel are placed
above and below one another, the controls will still line up
aesthetically.
Parameters : | parent : wx.Window
The frame or panel which owns this panel.
panelLabel : str
The string which labels the panel (in the border).
rowLabels : list of str
A list of strings which label the rows in the grid.
buttonIDs : list of int
A list of integer IDs for the buttons so that the parent can bind
actions to them.
|
Methods
-
getSetpoints()[source]
Get the values of the setpoints.
Returns : | list of float :
The values of the setpoint controls.
|
-
setCurrents(values)[source]
Set the values of the current indicators.
Parameters : | values : list of float
Set the indicators for the current values of the parameters
contained in the panel.
|
CharValidator
-
class src.gui.instruments.cryomag_panels.CharValidator[source]
A validator to ensure that only digits are entered into a control.
Methods
-
Clone()[source]
Create a new validator.
-
OnChar(event)[source]
Make sure the character is a digit.
-
TransferFromWindow()[source]
No data needs to be transferred.
-
TransferToWindow()[source]
No data needs to be transferred.
-
Validate(win)[source]
Nothing needs doing when the frame is closed.