taurus-org / taurus_pyqtgraph

Moved to https://gitlab.com/taurus-org/taurus_pyqtgraph
3 stars 14 forks source link

Avoid exception when averaging trends #75

Closed cpascual closed 4 years ago

cpascual commented 4 years ago

TaurusTrendSets consist on a dummy empty plotdataitem which composes one or TrendCurve objects that show the actual data. The dummy item has no x or y data set, and this creates issues with features such as Average which do not properly check their inputs. Set an empty array for the dummy x,y as a workaround.

Also, use a "all trends" parameter for the TrendCurve items so that they can be selected as a group for averaging.

Note: as of writing, the "average" feature of pyqtgraph is quite fragile and prone to errors. This is not fixing it, it just prevents some annoying exceptions.

Fixes #73