nomad_camels.manual_controls.stage_control package
Submodules
nomad_camels.manual_controls.stage_control.stage_control module
- class nomad_camels.manual_controls.stage_control.stage_control.Move_Thread(parent=None, channels=None, move_speeds=None, manual_functions=None, stop_functions=None, starting_positions=None)
Bases:
QThread
- exception_signal
- move(ax)
- Parameters:
ax
- run() None
- staticMetaObject = PySide6.QtCore.QMetaObject("Move_Thread" inherits "QThread": Methods: #12 type=Signal, signature=exception_signal(PyObject), parameters=PyObject )
- class nomad_camels.manual_controls.stage_control.stage_control.Readback_Thread(parent=None, channels=None, read_time=inf)
Bases:
QThread
- data_sig
- do_reading()
- exception_signal
- run()
- staticMetaObject = PySide6.QtCore.QMetaObject("Readback_Thread" inherits "QThread": Methods: #12 type=Signal, signature=data_sig(double,double,double), parameters=double, double, double #13 type=Signal, signature=exception_signal(PyObject), parameters=PyObject )
- class nomad_camels.manual_controls.stage_control.stage_control.Stage_Control(parent=None, control_data=None)
Bases:
Manual_Control
,Ui_Form
A class that provides a GUI for controlling a stage.
- Parameters:
parent (QWidget) – The parent widget.
control_data (dict) – A dictionary containing the control data. The following keys are expected: - name: The name of the control. - use_axis: A list of three booleans, indicating which axes are used. - axis_channel: A list of three strings, indicating the channels used for each axis. - read_axis: A list of three booleans, indicating which axes are read back. - read_channel: A list of three strings, indicating the channels used for reading back. If an axis is not read back, the corresponding entry should be None. - axis_ref: A list of three functions, indicating the reference drive functions for each axis. If an axis is does not have a reference, the corresponding entry should be None. - axis_stop: A list of three functions, indicating the stop functions for each axis. If an axis does not have a stop function, the corresponding entry should be None. - auto_reference: A list of three booleans, indicating whether the axes should automatically perform their reference function at start. - manual_function: A list of three functions, indicating the manual move functions for each axis. If an axis does not have a manual move function, the corresponding entry should be None. - read_frequ: A float, indicating the frequency at which the axes are read back. - manual_active: A boolean, indicating whether manual control is active by default. - stepSize_X: A float, indicating the step size for the X axis. - stepSize_Y: A float, indicating the step size for the Y axis. - stepSize_Z: A float, indicating the step size for the Z axis. - manual_X: A float, indicating the manual move speed for the X axis. - manual_Y: A float, indicating the manual move speed for the Y axis. - manual_Z: A float, indicating the manual move speed for the Z axis.
- check_change()
Updates the control data when a check box is changed. This method is connected to the clicked signal of the check boxes, including the reference checks and the manual active check.
- close() bool
Stops the readback and move threads when the control is closed.
- closeEvent(a0) None
Stops the readback and move threads when the control is closed.
- Parameters:
a0 (QCloseEvent)
- device_ready()
Overwrites the device_ready method from the Manual_Control class. This method is called when the device is ready. It sets the channels, read channels, reference functions, stop functions, and manual functions from the instantiated devices. It also starts the readback thread and the move thread.
- exception_caught(ex, name)
Handles exceptions caught by the readback or move threads.
- Parameters:
ex (Exception) – The exception that was caught.
name (str) – The name of the thread that caught the exception.
- input_position()
- keyPressEvent(a0: QKeyEvent) None
- Parameters:
a0 (QKeyEvent :)
- keyReleaseEvent(a0: QKeyEvent) None
- Parameters:
a0 (QKeyEvent :)
- line_change()
Updates the control data when a line edit is changed. This method is connected to the textChanged signal of the line edits, including the read frequency, step sizes, manual speeds, and go-to positions.
- move_to_position()
- reference_drive()
- start_move_thread()
- start_read_thread()
- staticMetaObject = PySide6.QtCore.QMetaObject("Stage_Control" inherits "Manual_Control": )
- step_axis(axis, up=True)
- Parameters:
axis
up – (Default value = True)
- stop_moving()
- update_readback(x, y, z)
Updates the readback values in the GUI. This method is connected to the data_sig signal of the readback thread.
- Parameters:
x (float) – The readback value of the X axis.
y (float) – The readback value of the Y axis.
z (float) – The readback value of the Z axis.
- class nomad_camels.manual_controls.stage_control.stage_control.Stage_Control_Config(parent=None, control_data=None)
Bases:
Manual_Control_Config
- accept()
- change_usage()
- staticMetaObject = PySide6.QtCore.QMetaObject("Stage_Control_Config" inherits "Manual_Control_Config": )