Add alignment gui 1d v1
Description
This MR adds a first draft for the alignment GUI. It is a preliminary version of the GUI which is not yet fully functional and can produce popup errors. Those are mostly link to its usage with its components which we will tackle in refactoring of the individual components. For the moment, I suggest to merge it and tackle the refactoring in separate MRs. A list of toDos will be added below.
Related Issues
relates to #350, #349, #348, #322 (closed), #323 (closed), #329 (closed)
Type of Change
- added plot_indicator_items (BECArrowItem and BECTickItem). They can be used to visualise the position of for instance a motor. The
TickItem
is attached to the layout and plotted below the Axis of the WaveformWidget, while theArrowItem
is attached to the plot_item allowing to follow the 1D curve or in future point to a specific pixel in the 2D plot. They consider log scale (note: the arrowItem is a bit off when moved to negative x values. There is a manual fix with the ViewBox.) - added a button to the LMFitDialog that emits a signal with the parameter value of the fit. This can be hooked up to move the motor to the center position of the fit
- improves the linear region selector to consider logarithmic axis
Screenshots / GIFs (if applicable)
Plot Indicators:
Screen_Recording_2024-09-11_at_20.09.01
The full app is best tested with this branch. The recording was too large. Be aware, there are 3 prompt errors upon starting due to the filters in the comboboxes, and one more error if you change the motor. This is to be tackled via separate MRs.
Additional Comments
ToDo list for future improvements of the GUI:
- refactoring of filters for
BECDeviceBox
. Changing the filter after stating the GUI is generating errors because thecurrentTextChanged
signal is already hooked up to adding a plot to theBECWaveformWidget
. This creates issues since we cycle through devices that cannot be plotted, i.e. have no hinted signals/ no signals of type kind.normal/hinted at all. relates to these two issues #323 (closed) #322 (closed) #329 (closed) - Related to the above, the logic for accepting device plot (scan_segment) and dap plots may be improved. Even with properly set filters, I would currently face the issue that I could change the x axis while a DAP process is still added with a different axis. This creates a popup error and removes the DAP. An easier logic to add/remove curves is desired and discussed in more detail, related issue is created (#349)
- Refactor of positioner_box to facilitate a more flexible arrangement of its components (#348 )
- Review LMFitDialog. A button has been added to the ListWidget for each parameter that can be hooked up to an action. This logic should be reviewed and optimised. Maybe we can generalise this even. (#350)
Definition of Done
-
Documentation is up-to-date.