8.5.5.1.1. pymodaq_gui.plotting.data_viewers.base module

exception pymodaq_gui.plotting.data_viewers.base.ViewerError[source]

Bases: Exception

class pymodaq_gui.plotting.data_viewers.base.ViewerBase(parent: QWidget = None, title='')[source]

Bases: QObject

Base Class for data viewers implementing all common functionalities

Parameters:
  • parent (QtWidgets.QWidget)

  • title (str)

view

Ui interface of the viewer

Type:

QObject

data_to_export_signal
Type:

Signal[DataToExport]

ROI_changed
Type:

Signal

crosshair_dragged
Type:

Signal[float, float]

crosshair_clicked
Type:

Signal[bool]

sig_double_clicked
Type:

Signal[float, float]

status_signal
Type:

Signal[str]

Attributes:
get_action

Convenience method

has_action

Convenience method

is_action_checked

Convenience method

is_action_visible

Convenience method

roi_target

To be implemented if necessary (Viewer1D and above)

set_action_checked

Convenience method

set_action_visible

Convenience method

toolbar

Convenience property

viewer_type

str: the viewer data type see DATA_TYPES

Methods

activate_roi([activate])

Activate the Roi manager using the corresponding action

add_attributes_from_view()

Convenience function to add attributes from the view to self

move_roi_target([pos])

move a specific read only ROI at the given position on the viewer

setVisible([show])

convenience method to show or hide the parent widget

show_data(data, **kwargs)

Entrypoint to display data into the viewer

show_data_temp(data, **kwargs)

Entrypoint to display temporary data into the viewer

show_roi_target([show])

Show/Hide a specific read only ROI

trigger_action(action_name)

Convenience function to trigger programmatically one of the action of the related view

ROI_changed

ROI_select_signal

crosshair_clicked

crosshair_dragged

data_to_export_signal

roi_select_signal

sig_double_clicked

status_signal

activate_roi(activate=True)[source]

Activate the Roi manager using the corresponding action

add_attributes_from_view()[source]

Convenience function to add attributes from the view to self

move_roi_target(pos: Iterable[float] = None, **kwargs)[source]

move a specific read only ROI at the given position on the viewer

setVisible(show=True)[source]

convenience method to show or hide the parent widget

show_data(data: DataWithAxes, **kwargs)[source]

Entrypoint to display data into the viewer

Parameters:

data (data_mod.DataFromPlugins)

show_data_temp(data: DataWithAxes, **kwargs)[source]

Entrypoint to display temporary data into the viewer

No processed data signal is emitted from the viewer

Parameters:

data (data_mod.DataFromPlugins)

show_roi_target(show=True)[source]

Show/Hide a specific read only ROI

trigger_action(action_name: str)[source]

Convenience function to trigger programmatically one of the action of the related view

ROI_changed

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

ROI_select_signal

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

crosshair_clicked

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

crosshair_dragged

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

data_to_export_signal

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

property get_action

Convenience method

property has_action

Convenience method

property is_action_checked

Convenience method

property is_action_visible

Convenience method

roi_select_signal

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

property roi_target: InfiniteLine | ROI

To be implemented if necessary (Viewer1D and above)

property set_action_checked

Convenience method

property set_action_visible

Convenience method

sig_double_clicked

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

status_signal

int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

Type:

pyqtSignal(*types, name

Type:

str = …, revision

property toolbar

Convenience property

property viewer_type

the viewer data type see DATA_TYPES

Type:

str

class pymodaq_gui.plotting.data_viewers.base.ViewersEnum(*values)[source]

Bases: BaseEnum

enum relating a given viewer with data type

classmethod from_n_axes(n_axes: int)[source]
static get_viewers_enum_from_data(dwa: DataWithAxes) ViewersEnum[source]
static get_viewers_enum_from_metadata(dim: DataDim, distribution: DataDistribution, n_nav_axes: int, n_sig_indexes: int, shape_len: int, size: int) ViewersEnum[source]
get_dim()[source]
increase_dim(ndim: int)[source]
Viewer0D = 'Data0D'
Viewer1D = 'Data1D'
Viewer2D = 'Data2D'
ViewerND = 'DataND'
ViewerSequential = 'DataSequential'