Curves classes
- class pymeasure.display.curves.BufferCurve(**kwargs)
Bases:
PlotDataItemCreates a curve based on a predefined buffer size and allows data to be added dynamically.
- append(x, y)
Appends data to the curve with optional errors.
- Return type:
None
- prepare(size, dtype=<class 'numpy.float32'>)
Prepares the buffer based on its size, data type
- Return type:
None
- class pymeasure.display.curves.Crosshairs(plot, pen=None)
Bases:
QObjectAttaches crosshairs to the a plot and provides a signal with the x and y graph coordinates
- mouseMoved(event=None)
Updates the mouse position upon mouse movement
- Return type:
None
- teardown()
Release the signal proxy and detach the lines from the plot.
Afterwards the crosshairs must not be used anymore. The method is idempotent and tolerates a plot that is already gone.
- Return type:
None
- update()
Updates the mouse position based on the data in the plot. For dynamic plots, this is called each time the data changes to ensure the x and y values correspond to those on the display.
- Return type:
None
- class pymeasure.display.curves.ResultsCurve(results, x, y, force_reload=False, wdg=None, **kwargs)
Bases:
PlotDataItemCreates a curve loaded dynamically from a file through the Results object. The data can be forced to fully reload on each update, useful for cases when the data is changing across the full file instead of just appending.
- update_data()
Updates the data by polling the results
- Return type:
None
- property x: str
Set the x label.
Deprecated since version 0.17.0: Use
x_labelinstead.
- property y: str
Set the y label.
Deprecated since version 0.17.0: Use
y_labelinstead.
- class pymeasure.display.curves.ResultsImage(results, x, y, z, force_reload=False, wdg=None, **kwargs)
Bases:
ImageItemCreates an image loaded dynamically from a file through the Results object.
- colormap(x)
Return mapped color as 0.0-1.0 floats RGBA
- find_img_index(x, y)
Finds the integer image indices corresponding to the closest x and y points of the data given some x and y data.
- Return type:
list[int]
- round_up(x)
Convenience function since numpy rounds to even