8.5.5.1.8. pymodaq_gui.plotting.data_viewers.viewerND module

class pymodaq_gui.plotting.data_viewers.viewerND.BaseDataDisplayer(viewer0D, viewer1D, viewer2D, navigator1D, navigator2D, axes_viewer)[source]

Bases: QObject

Attributes:
data_shape
distribution

Methods

get_nav_data(data, x, y[, width, height])

Get filtered data

init()

init viewers or postprocessing once new data are loaded

init_rois(data)

Init crosshairs and ROIs in viewers if needed

update_nav_data(x, y[, width, height])

Display navigator data potentially postprocessed from filters in the signal viewers

update_viewer_data(**kwargs)

Update the signal display depending on the position of the crosshair in the navigation panels

updated_nav_integration()

Means the ROI select of the 2D viewer has been moved

data_dim_signal

get_out_of_range_limits

processor_changed

show_nav_integration

update_data

update_filter

update_nav_data_from_roi

update_nav_indexes

update_nav_limits

update_processor

static get_out_of_range_limits(x, y, width, height)[source]
abstractmethod get_nav_data(data, x, y, width=None, height=None)[source]

Get filtered data

Return type:

DataWithAxes

abstractmethod init()[source]

init viewers or postprocessing once new data are loaded

abstractmethod init_rois(data)[source]

Init crosshairs and ROIs in viewers if needed

show_nav_integration(show=True)[source]
update_data(data, force_update=False)[source]
update_filter(filter_type)[source]
abstractmethod update_nav_data(x, y, width=None, height=None)[source]

Display navigator data potentially postprocessed from filters in the signal viewers

update_nav_data_from_roi(roi)[source]
update_nav_indexes(nav_indexes)[source]
update_nav_limits(x, y, width=None, height=None)[source]
update_processor(math_processor)[source]
abstractmethod update_viewer_data(**kwargs)[source]

Update the signal display depending on the position of the crosshair in the navigation panels

updated_nav_integration()[source]

Means the ROI select of the 2D viewer has been moved

property data_shape
abstract property distribution
class pymodaq_gui.plotting.data_viewers.viewerND.SpreadDataDisplayer(*args, **kwargs)[source]

Bases: BaseDataDisplayer

Specialized object to filter and plot non uniformly spaced data in dedicated viewers

Meant for any navigation axes and up to signal data dimensionality of 2 (images)

Methods

get_nav_data(data, x, y[, width, height])

get_nav_position([posx, posy])

crosshair position from the "spread" data viewer.

init(data)

init_rois([nav_axes_limits, sig_axis_limits])

update_nav_data(x, y[, width, height])

update_viewer_data([posx, posy])

Update the signal display depending on the position of the crosshair in the navigation panels

get_nav_data(data, x, y, width=None, height=None)[source]
get_nav_position(posx=0, posy=None)[source]

crosshair position from the “spread” data viewer. Should return scan index where the scan was closest to posx, posy coordinates :type posx: :param posx: :type posy: :param posy:

init(data)[source]
init_rois(nav_axes_limits=None, sig_axis_limits=None)[source]
update_nav_data(x, y, width=None, height=None)[source]
update_viewer_data(posx=0, posy=0)[source]

Update the signal display depending on the position of the crosshair in the navigation panels

Spread data can be customly represented using: if signal data is 0D:

  • A viewer 1D with non-linearly spaced data points (for 1 navigation axis)

  • A viewer 2D with its SpreadImage item (for 2 navigation axis)

  • A double panel: viewer for signal data and viewer 1D for all nav axes as a function of index in the data

otherwise:
  • A double panel: viewer for signal data and viewer 1D for all nav axes as a function of index in the data

series

Parameters:
  • posx (float) – from the 1D or 2D Navigator crosshair or from one of the navigation axis viewer (in that case nav_axis tells from which navigation axis the position comes from)

  • posy (float) – from the 2D Navigator crosshair

distribution: DataDistribution = 1
class pymodaq_gui.plotting.data_viewers.viewerND.UniformDataDisplayer(*args, **kwargs)[source]

Bases: BaseDataDisplayer

Specialized object to filter and plot linearly spaced data in dedicated viewers

Meant for any navigation axes and up to signal data dimensionality of 2 (images)

Methods

get_nav_data(data, x, y[, width, height])

init(data)

init_rois([nav_axes_limits, sig_axis_limits])

update_nav_data(x, y[, width, height])

update_viewer_data([posx, posy])

Update the signal display depending on the position of the crosshair in the navigation panels

updated_nav_integration()

Means the ROI select of the 2D viewer has been moved

get_nav_data(data, x, y, width=None, height=None)[source]
init(data)[source]
init_rois(nav_axes_limits=None, sig_axis_limits=None)[source]
update_nav_data(x, y, width=None, height=None)[source]
update_viewer_data(posx=0, posy=0)[source]

Update the signal display depending on the position of the crosshair in the navigation panels

Parameters:
  • posx (float) – from the 1D or 2D Navigator crosshair or from one of the navigation axis viewer (in that case nav_axis tells from which navigation axis the position comes from)

  • posy (float) – from the 2D Navigator crosshair

updated_nav_integration()[source]

Means the ROI select of the 2D viewer has been moved

distribution: DataDistribution = 0
class pymodaq_gui.plotting.data_viewers.viewerND.ViewerND(parent=None, title='')[source]

Bases: ParameterManager, ActionManager, ViewerBase

Methods

setup_actions()

connect_things

prepare_ui

reshape_data

set_data_test

setup_widgets

show_settings

update_data_dim

update_data_displayer

update_filters

update_widget_visibility

connect_things()[source]
prepare_ui()[source]
reshape_data()[source]
set_data_test(data_shape='3D')[source]
setup_actions()[source]
setup_widgets()[source]
show_settings(show=True)[source]
update_data_dim(dim)[source]
update_data_displayer(distribution)[source]
update_filters(processor)[source]
update_widget_visibility(data=None, nav_indexes=None)[source]
axes_viewer: AxesViewer
data_displayer: BaseDataDisplayer
navigator1D: Viewer1D
navigator2D: Viewer2D
params = [{'name': 'set_data_spread1D0D', 'title': 'Set data spread 1D-0D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread1D1D', 'title': 'Set data spread 1D-1D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread1D2D', 'title': 'Set data spread 1D-2D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread2D0D', 'title': 'Set data spread 2D-0D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread2D1D', 'title': 'Set data spread 2D-1D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread2D2D', 'title': 'Set data spread 2D-2D', 'type': 'action', 'visible': False}, {'name': 'set_data_spread3D0D', 'title': 'Set data spread 3D-0D', 'type': 'action', 'visible': False}, {'name': 'set_data_4D', 'title': 'Set data 4D', 'type': 'action', 'visible': False}, {'name': 'set_data_3D', 'title': 'Set data 3D', 'type': 'action', 'visible': False}, {'name': 'set_data_2D', 'title': 'Set data 2D', 'type': 'action', 'visible': False}, {'name': 'set_data_1D', 'title': 'Set data 1D', 'type': 'action', 'visible': False}, {'children': [{'name': 'data_shape_init', 'readonly': True, 'title': 'Initial Data shape:', 'type': 'str', 'value': ''}, {'children': [], 'name': 'nav_axes_shapes', 'readonly': True, 'title': 'Axes shape:', 'type': 'group'}, {'name': 'data_shape', 'readonly': True, 'title': 'Data shape:', 'type': 'str', 'value': ''}, {'name': 'navigator_axes', 'title': 'Navigator axes:', 'type': 'itemselect'}, {'name': 'set_nav_axes', 'title': 'Set Nav axes:', 'type': 'action', 'visible': True}], 'name': 'data_shape_settings', 'title': 'Signal shape', 'type': 'group'}]
viewer0D: Viewer0D
viewer1D: Viewer1D
viewer2D: Viewer2D
pymodaq_gui.plotting.data_viewers.viewerND.main()[source]
pymodaq_gui.plotting.data_viewers.viewerND.spread_main()[source]