8.5.5.4.3. pymodaq_gui.plotting.utils.lineout module

Created the 03/11/2022

@author: Sebastien Weber

class pymodaq_gui.plotting.utils.lineout.LineoutPlotter(graph_widgets: OrderedDict, roi_manager: ROIManager, crosshair: Crosshair)[source]

Bases: QObject

Base class to manage and display data filtered out into lineouts (1D, 0D)

Should be inherited and subclass some methods as appropriate

Parameters:
  • graph_widgets (OrderedDict) – Includes plotwidgets to display data

  • roi_manager – The ROIManager to create ROIs and manage their properties

  • crosshair – The Crosshair object

Methods

add_lineout_items(*curve_items)

Add Curve items sequentially to lineouts widgets: (hor, ver and int) :param curve_items: :type curve_items: (PlotCurveItem) at most 3 of them

add_roi_lineout_items(index, pen)

Add specifics lineouts generated from ROIs :param index: :type index: (int) index of the ROI generating these lineouts :param pen: :type pen: (str, tuple) any argument able to generate a QPen, see pyqtgraph.functions.mkPen

get_crosshair_curves_triplet()

Get the dictionary (one key by ImageItem, see IMAGE_TYPES) containing dicts with PlotCurveItem

get_roi_curves_triplet()

Get the dictionary (one key by ROI) containing dicts with ROI PlotCurveItem

remove_lineout_items(*curve_items)

Remove Curve items sequentially to lineouts widgets: (hor, ver and int) :param curve_items: :type curve_items: (PlotCurveItem) at most 3 of them

remove_roi_lineout_items(index)

Remove specifics lineouts generated from ROI referenced by a unique integer :param index: :type index: (int) index of the ROI generating these lineouts

setup_crosshair()

to reimplement if needed

show_crosshair_curves(curve_key[, show])

to reimplement if needed

add_ROI

crosshair_clicked

crosshair_lineout_plotted

get_crosshair_curve_triplet

get_lineout_widget

plot_crosshair_lineouts

plot_other_crosshair_lineouts

plot_other_lineouts

plot_roi_lineouts

remove_ROI

roi_changed

roi_clicked

roi_lineout_plotted

update_roi

add_ROI(newindex, roi_type)[source]
add_lineout_items(*curve_items)[source]

Add Curve items sequentially to lineouts widgets: (hor, ver and int) :param curve_items: :type curve_items: (PlotCurveItem) at most 3 of them

add_roi_lineout_items(index, pen)[source]

Add specifics lineouts generated from ROIs :param index: :type index: (int) index of the ROI generating these lineouts :param pen: :type pen: (str, tuple) any argument able to generate a QPen, see pyqtgraph.functions.mkPen

crosshair_clicked(iscrosshairchecked=True)[source]
get_crosshair_curve_triplet(curve_name)[source]
get_crosshair_curves_triplet()[source]

Get the dictionary (one key by ImageItem, see IMAGE_TYPES) containing dicts with PlotCurveItem

get_lineout_widget(name)[source]
get_roi_curves_triplet()[source]

Get the dictionary (one key by ROI) containing dicts with ROI PlotCurveItem

plot_crosshair_lineouts(crosshair_dict)[source]
plot_other_crosshair_lineouts(crosshair_dict)[source]
plot_other_lineouts(roi_dicts)[source]
plot_roi_lineouts(roi_dicts)[source]
remove_ROI(roi_name)[source]
remove_lineout_items(*curve_items)[source]

Remove Curve items sequentially to lineouts widgets: (hor, ver and int) :param curve_items: :type curve_items: (PlotCurveItem) at most 3 of them

remove_roi_lineout_items(index)[source]

Remove specifics lineouts generated from ROI referenced by a unique integer :param index: :type index: (int) index of the ROI generating these lineouts

roi_clicked(isroichecked=True)[source]
setup_crosshair()[source]

to reimplement if needed

show_crosshair_curves(curve_key, show=True)[source]

to reimplement if needed

update_roi(roi_key, param_changed)[source]
crosshair_lineout_plotted

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

lineout_widgets = ['int']
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_lineout_plotted

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

pymodaq_gui.plotting.utils.lineout.curve_item_factory(pen='red')[source]

Create a PlotCurveItem with the given pen :param pen: :type pen: any type of arguments accepted by pyqtgraph.function.mkColor or one of the COLORS_DICT key

Return type:

PlotCurveItem