evedataviewer.gui.dataset_display_widget module
Widget for setting dataset display options.
Purpose: For each individual dataset, the axes and data to be displayed need to be changeable. Furthermore, depending on the dataset, displaying and flicking through sub-scans should be possible as well.
Design principles: The widget should be as self-contained and self-consistent as possible, corresponding with the model of the main window giving access to the datasets and the list of currently selected datasets.
Limitations: This widget is meant to actively set display options of the individual datasets currently displayed. Presenting information (metadata) of the respective dataset should be handled by other widgets.
Below is a first summary of what the widget should allow doing:
Select a dataset from the list of currently selected/active datasets.
If no dataset is selected, this list and the entire widget may be disabled, at least no dataset should be shown.
The datasets should probably be identified by the filenames excluding the path, as otherwise, the combobox will be quite wide. Best to use the “label” attribute of the dataset and have the importer initially set this to a sensible value (and in the long run, provide the user with the ability to change it).
For the selected dataset, select one or both of x and y axes from the list of available channels (i.e., device data in the dataset).
Usually, all channels have the identical number of values, hence setting arbitrary combinations should be possible.
For the selected dataset, flick through the sub-scans if there are any.
Setting the sub-scan index to
-1
should disable the sub-scan display and display the entire dataset instead. Using-1
rather than0
internally is due to the zero-based indexing of Python. For the actual display, this may be changed depending on user preferences.
The widget gets added to the main GUI window of the evedataviewer GUI, either as dockable window (preferable) or fixed in the layout.
- class evedataviewer.gui.dataset_display_widget.DatasetDisplayWidget
Bases:
QWidget
Display settings for individual datasets, allowing to select the dataset.
For each individual dataset, the axes and data to be displayed need to be changeable. Furthermore, depending on the dataset, displaying and flicking through sub-scans should be possible as well.
- property model
Model of the Model–View architecture used by the widget.
When setting the model, the
evedataviewer.gui.model.Model.dataset_selection_changed
signal is connected to the widget update method.- Parameters:
model (
evedataviewer.gui.model.Model
) – The model used by the widget.- Returns:
model – The model used by the widget.
- Return type: