7.5.5.1.4. pymodaq_gui.plotting.data_viewers.viewer1D module

class pymodaq_gui.plotting.data_viewers.viewer1D.DataDisplayer(plotitem: ~pyqtgraph.graphicsItems.PlotItem.PlotItem.PlotItem, flip_axes=False, plot_colors=<pymodaq_utils.utils.PlotColors object>)[source]

Bases: QObject

This Object deals with the display of 1D data on a plotitem

Attributes:
Ndata
labels
legend

Methods

get_axis

get_plot_item

get_plot_items

labels_changed

legend_items

plot_with_scatter

show_overlay

update_axis

update_colors

update_data

update_display_items

update_errors

update_plot

update_scatter

update_sort

update_xy

update_xyplot

updated_item

get_axis() Axis[source]
get_plot_item(index: int)[source]
get_plot_items()[source]
legend_items()[source]
plot_with_scatter(with_scatter=True, symbol_size=5, symbol='o', color=None)[source]
show_overlay(show=True)[source]
update_axis(axis: Axis)[source]
update_colors(colors: list)[source]
update_data(data: DataRaw, do_xy=False, sort_data=False, force_update=False, do_scatter=False, show_errors=False)[source]
update_display_items(data: DataWithAxes = None, show_errors=False)[source]
update_errors(show_errors=False)[source]
update_plot(do_xy=True, data=None, sort_data=False, scatter=False, show_errors=False)[source]
update_scatter(do_scatter=False)[source]
update_sort(do_sort=False)[source]
update_xy(do_xy=False)[source]
update_xyplot(do_xy=True, dwa: DataWithAxes = None)[source]
property Ndata
property labels
labels_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

property legend
updated_item

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

class pymodaq_gui.plotting.data_viewers.viewer1D.View1D(parent_widget: QWidget = None, show_toolbar=True, no_margins=False, flip_axes=False)[source]

Bases: ActionManager, QObject

Attributes:
axis

Get the current axis used to display data

plotitem

Methods

get_crosshair_position()

Convenience function from the Crosshair

get_crosshair_signal()

Convenience function from the Crosshair

process_xyplot()

Uncheck things if xyplot is active

set_crosshair_position(*positions)

Convenience function from the Crosshair

setup_actions()

Method where to create actions to be subclassed.

update_roi_channels(index[, roi_type])

Update the use_channel setting each time a ROI is added

add_data_displayer

add_plot_item

add_roi_displayer

connect_things

display_data

display_roi_lineouts

do_math

get_double_clicked

lock_aspect_ratio

move_roi_target

prepare_ui

remove_data_displayer

remove_roi_displayer

setup_widgets

show_ROI_select

show_hide_crosshair

update_colors

update_crosshair_data

add_data_displayer(displayer_name: str, plot_colors=<pymodaq_utils.utils.PlotColors object>)[source]
add_plot_item(item)[source]
add_roi_displayer(index, roi_type='', roi_name='')[source]
connect_things()[source]
display_data(data: DataWithAxes | DataToExport, displayer: str = None)[source]
display_roi_lineouts(roi_dte: DataToExport)[source]
do_math()[source]
get_crosshair_position()[source]

Convenience function from the Crosshair

get_crosshair_signal()[source]

Convenience function from the Crosshair

get_double_clicked()[source]
lock_aspect_ratio()[source]
move_roi_target(pos: Iterable[float], **kwargs)[source]
prepare_ui()[source]
process_xyplot()[source]

Uncheck things if xyplot is active

remove_data_displayer(displayer_name: str)[source]
remove_roi_displayer(roi_name='')[source]
set_crosshair_position(*positions)[source]

Convenience function from the Crosshair

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

setup_widgets()[source]
show_ROI_select()[source]
show_hide_crosshair(show=True)[source]
update_colors(colors: list)[source]
update_crosshair_data(crosshair_dte: DataToExport)[source]
update_roi_channels(index, roi_type='')[source]

Update the use_channel setting each time a ROI is added

property axis

Get the current axis used to display data

property plotitem
class pymodaq_gui.plotting.data_viewers.viewer1D.Viewer1D(parent: QWidget = None, title='', show_toolbar=True, no_margins=False, flip_axes=False)[source]

Bases: ViewerBase

DataWithAxis of type Data1D can be plotted using this data viewer

show_data:

parameter: * dwa: a DataWithaxis * scatter_dwa: an optional extra DataWithAxis to be plotted with scatter points

it could define extra_attributes such as symbol: str (to define the symbol layout default: ‘o’) and symbol_size: int (to define the symbol size)

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

selected_region_changed

update_colors

update_status

activate_roi(activate=True)[source]

Activate the Roi manager using the corresponding action

add_plot_item(item)[source]
crosshair_changed()[source]
double_clicked(posx, posy=0)[source]
get_axis_from_view(data: DataWithAxes)[source]
move_roi_target(pos: Iterable[float] = None)[source]

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

prepare_connect_ui()[source]
process_crosshair_lineouts(crosshair_dte: DataToExport)[source]
process_roi_lineouts(roi_dte: DataToExport)[source]
roi_changed()[source]
selected_region_changed()[source]
set_crosshair_position(xpos, ypos=0)[source]

Convenience method to set the crosshair positions

update_colors(colors: List, displayer=None)[source]
update_status(txt)[source]
property crosshair

Convenience method

property labels
property roi_manager

Convenience method

property roi_target: InfiniteLine

To be implemented if necessary (Viewer1D and above)

pymodaq_gui.plotting.data_viewers.viewer1D.main()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_errors()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_extra_scatter()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_nans()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_random()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_unsorted()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_view1D()[source]
pymodaq_gui.plotting.data_viewers.viewer1D.main_xy()[source]