6.3.4. Data Viewers¶
The data viewers are classes devoted to data display from scalar data up to 4 dimensions data. All the viewers inherits from the base class ViewerBase and then offers options and interactions depending their dimensionality
Summary of the data viewers classes
|
this plots 0D data on a plotwidget with history. |
|
this plots 1D data on a plotwidget. |
|
Object managing plotting and manipulation of 2D data using a View2D |
Methods |
- class pymodaq.utils.plotting.data_viewers.viewer0D.Viewer0D(parent=None, title='')[source]¶
this plots 0D data on a plotwidget with history. Display as numbers in a table is possible.
Datas and measurements are then exported with the signal data_to_export_signal
- Attributes
- labels
- class pymodaq.utils.plotting.data_viewers.viewer1D.Viewer1D(parent=None, title='')[source]¶
this plots 1D data on a plotwidget. Math and measurement can be done on it.
Datas and measurements are then exported with the signal data_to_export_signal
- Attributes
crosshair
Convenience method
- labels
roi_manager
Convenience method
roi_target
To be implemented if necessary (Viewer1D and above)
Methods
activate_roi
([activate])Activate the Roi manager using the corresponding action
move_roi_target
([pos])move a specific read only ROI at the given position on the viewer
set_crosshair_position
(xpos[, ypos])Convenience method to set the crosshair positions
add_plot_item
crosshair_changed
double_clicked
get_axis_from_view
prepare_connect_ui
process_crosshair_lineouts
process_roi_lineouts
roi_changed
update_status
- move_roi_target(pos: Optional[Iterable[float]] = None)[source]¶
move a specific read only ROI at the given position on the viewer
- property crosshair¶
Convenience method
- property roi_manager¶
Convenience method
- property roi_target: InfiniteLine¶
To be implemented if necessary (Viewer1D and above)
- class pymodaq.utils.plotting.data_viewers.viewer2D.Viewer2D(parent=None, title='')[source]¶
Object managing plotting and manipulation of 2D data using a View2D
- Attributes
crosshair
Convenience method
image_widget
Convenience method
roi_manager
Convenience method
roi_target
To be implemented if necessary (Viewer1D and above)
- x_axis
- y_axis
Methods
activate_roi
([activate])Activate the Roi manager using the corresponding action
get_axes_from_view
(data)Obtain axes info from the view
Convenience method
move_roi_target
([pos, size])move a specific read only ROI at the given position on the viewer
set_crosshair_position
(xpos, ypos)Convenience method to set the crosshair positions
set_gradient
(image_key, gradient)convenience function
Deactivate some tool buttons if data type is "spread" then apply transform_image
show_roi
([show, show_roi_widget])convenience function to control roi
ROI_select_signal
crosshair_changed
crosshair_clicked
double_clicked
prepare_connect_ui
process_crosshair_lineouts
process_roi_lineouts
roi_changed
scale_lineout_dicts
selected_region_changed
set_visible_items
transform_image
update_crosshair_data
update_data
- get_axes_from_view(data: DataWithAxes)[source]¶
Obtain axes info from the view
Only for uniform data
- move_roi_target(pos: Optional[Iterable[float]] = None, size: Iterable[float] = (1, 1))[source]¶
move a specific read only ROI at the given position on the viewer
- set_image_transform() DataRaw [source]¶
Deactivate some tool buttons if data type is “spread” then apply transform_image
- property crosshair¶
Convenience method
- property image_widget¶
Convenience method
- property roi_manager¶
Convenience method
- property roi_target: ROI¶
To be implemented if necessary (Viewer1D and above)
- class pymodaq.utils.plotting.data_viewers.viewerND.ViewerND(parent_widget: QWidget, title='')[source]¶
Methods
Method where to create actions to be subclassed.
connect_things
prepare_ui
reshape_data
set_data_test
setup_widgets
show_settings
update_data_dim
update_data_displayer
update_filters
update_widget_visibility
- setup_actions()[source]¶
Method where to create actions to be subclassed. Mandatory
Examples
>>> self.add_action('Quit', 'close2', "Quit program") >>> self.add_action('Grab', 'camera', "Grab from camera", checkable=True) >>> self.add_action('Load', 'Open', "Load target file (.h5, .png, .jpg) or data from camera", checkable=False) >>> self.add_action('Save', 'SaveAs', "Save current data", checkable=False)
See also
ActionManager.add_action