labscript-suite / runviewer

π—Ώπ˜‚π—»π˜ƒπ—Άπ—²π˜„π—²π—Ώ is a graphical interface for visualising hardware-timed experiments composed using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
2 stars 39 forks source link

PyQtGraph v0.9.10 is incompatible with runviewer 2.0.1 #2

Closed philipstarkey closed 9 years ago

philipstarkey commented 9 years ago

Original report (archived issue) by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


The latest version of PyQtGraph has changed the x,y array dimension requirements when stepMode=True.

Traceback raised is:

#!python

Traceback (most recent call last):
  File "__main__.py", line 303, in on_shot_selection_changed
    self.update_channels_treeview()
  File "__main__.py", line 419, in update_channels_treeview
    self.update_plots()
  File "__main__.py", line 478, in update_plots
    self.create_plot(channel, ticked_shots)
  File "__main__.py", line 501, in create_plot
    plot_item = self.plot_widgets[channel].plot([],[], pen=pg.mkPen(QColor(colour), width=2), stepMode=True)
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotItem/PlotItem.py", line 630, in plot
    item = PlotDataItem(*args, **kargs)
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 176, in __init__
    self.setData(*args, **kargs)
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 460, in setData
    self.updateItems()
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotDataItem.py", line 486, in updateItems
    self.curve.setData(x=x, y=y, **curveArgs)
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 299, in setData
    self.updateData(*args, **kargs)
  File "/usr/local/lib/python2.7/dist-packages/pyqtgraph/graphicsItems/PlotCurveItem.py", line 342, in updateData
    raise Exception("len(X) must be len(Y)+1 since stepMode=True (got %s and %s)" % (self.xData.shape, self.yData.shape))
Exception: len(X) must be len(Y)+1 since stepMode=True (got (0,) and (0,))

The current workaround is to only use pyqtgraph v0.9.8 until we fix the issue

philipstarkey commented 9 years ago

Original comment by Chris Billington (Bitbucket: cbillington, GitHub: chrisjbillington).


Update to support stepMode=True in pyqtgraph 0.9.10

Currently switched to the Python resampling algorithm pending recompilation and testing of C resampling function Added pyqtgraph version check

References issue #2

β†’ \<\<cset 428be12187cd0ea6ee5fe0126a7ccb8d9f2a9df6>>

philipstarkey commented 9 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


Resolved in changeset 041991c188c5a382a6c9087ab814da4a6a96e01a