pyqtgraph/examples
Martin Chase f2b4a15b2d
Performance enhancement: use CUDA in ImageItem (#1466)
* Add CLI args to video speed test for easier / automated benchmarking

* use a buffer-qimage so we can avoid allocing so much

this should improve performance under windows

* playing with numba

* oh, mins/maxes in the other order

* maybe put the cupy in here and see what happens

* pre-alloc for gpu and cpu

* handle possibility of not having cupy

* no numba in this branch

* organize imports

* name them after their use, not their expected device

* cupy.take does not support clip mode, so do it explicitly

* add CUDA option to the VideoSpeedTest

* rename private attr xp to _xp

* handle resizes at the last moment

* cupy is less accepting of lists as args

* or somehow range isn't allowed? what histogram is this?

* construct the array with python objects

* get the python value right away

* put LUT into cupy if needed

* docstring about cuda toolkit version

* better handling and display of missing cuda lib

* lint

* import need

* handle switching between cupy and numpy in a single ImageItem

* only use xp when necessary

we can now depend on numpy >= 1.17, which means __array_function__-implementing cupy can
seamlessly pass into numpy functions. the remaining uses of xp are for our functions which
need to allocate new data structures, an operation that has to be substrate-specific.

remove empty_cupy; just check if the import succeeded, instead.

* use an option to control use of cupy

* convert cupy.ceil array to int for easier mathing

* RawImageWidget gets to use the getCupy function now, too

* raise error to calm linters; rename for clarity

* Add Generated Template Files

* document things better

* cruft removal

* warnings to communicate when cupy is expected but somehow broken

* playing with settings to suss out timeout

* playing with more stuff to suss out timeout

* replace with empty list

* skip test_ExampleApp on linux+pyside2 only

Co-authored-by: Luke Campagnola <luke.campagnola@gmail.com>
Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-01-19 21:26:24 -08:00
..
cx_freeze Added cx_freeze example (thanks Jerry!) 2014-06-06 15:53:17 -06:00
optics workaround pyside bug #671 2018-05-23 21:12:16 -07:00
py2exe Fix: avoid importing py3 module from pyqt when using py2 2014-04-03 13:33:16 -04:00
relativity Fix QString handling 2018-06-22 17:31:58 -07:00
verlet_chain Fix verlet integration demo 2017-10-18 00:18:46 -07:00
__init__.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
__main__.py Fix ExampleApp: Use pg module from directory when run without installation (#1432) 2020-11-09 14:57:01 -08:00
Arrow.py Implement headWidth parameter for arrows (#385) 2020-06-09 22:04:29 -07:00
BarGraphItem.py Added BarGraphItem.shape() to allow better mouse interaction 2014-02-09 10:38:29 -05:00
beeswarm.py merged many changes from acq4 2013-03-26 13:46:26 -04:00
CLIexample.py python3 fixes 2013-02-24 23:09:03 -05:00
ColorButton.py python3 fixes 2013-02-24 23:09:03 -05:00
colorMaps.py Colormap extension (#1424) 2021-01-04 22:01:30 -08:00
ConsoleWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
contextMenu.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
crosshair.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
customGraphicsItem.py python3 fixes 2013-02-24 23:09:03 -05:00
CustomGraphItem.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
customPlot.py Fix TickSliderItem: Avoid ghost ticks | Improved customPlot.py code (#1459) 2020-11-26 22:28:03 -08:00
DataSlicing.py Added pg.gaussianFilter, removed all dependency on gaussian_filter 2014-03-11 19:01:34 -04:00
DataTreeWidget.py Cleanup, better support for tracebacks in DataTreeWidget 2014-09-25 15:21:28 -04:00
DateAxisItem_QtDesigner.py Date axis item (#1154) 2020-04-27 11:43:22 -07:00
DateAxisItem_QtDesigner.ui Date axis item (#1154) 2020-04-27 11:43:22 -07:00
DateAxisItem.py Date axis item (#1154) 2020-04-27 11:43:22 -07:00
designerExample_pyside2.py Fix up Qt.py and deprecate USE_XX variables 2018-02-16 20:42:34 -08:00
designerExample_pyside6.py generate template files for pyside6 2021-01-15 08:25:07 +08:00
designerExample.py Added Qt.loadUiType function for PySide 2013-12-17 21:23:37 -05:00
designerExample.ui Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
DiffTreeWidget.py Added DiffTreeWidget 2014-09-25 17:26:06 -04:00
dockarea.py minor cleanups 2014-05-08 09:50:26 -04:00
Draw.py python3 fixes 2013-02-24 23:09:03 -05:00
ErrorBarItem.py Add ErrorBarItem.setData 2014-06-27 10:55:55 -04:00
ExampleApp.py import template files using importlib 2021-01-15 08:25:08 +08:00
exampleLoaderTemplate_pyqt.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyqt5.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyside.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyside2.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
exampleLoaderTemplate_pyside6.py generate template files for pyside6 2021-01-15 08:25:07 +08:00
exampleLoaderTemplate.ui QFont.setWeight(75) is redundant 2021-01-15 08:25:05 +08:00
FillBetweenItem.py Fix some bugs in PyQt5 2015-01-17 00:21:33 +08:00
Flowchart.py Clean up examples / docs 2016-08-31 15:14:25 -07:00
FlowchartCustomNode.py Fix opt name for SpinBox: range -> bounds. 2016-04-11 21:05:21 -07:00
fractal.py add reduce import to fractal demo 2018-03-29 08:49:42 -07:00
GLBarGraphItem.py Added GLBarGraphItem example 2013-09-06 15:36:36 -04:00
GLImageItem.py examples: use integer division in indexing 2018-03-30 14:51:29 -04:00
GLIsosurface.py python3 fixes 2013-02-24 23:09:03 -05:00
GLLinePlotItem.py Fixed GLLinePlotItem line width option 2013-03-30 22:39:11 -04:00
GLMeshItem.py Allow GLMeshItem to draw edges from MeshData with face-indexed vertexes. 2014-03-10 23:04:10 -04:00
GLScatterPlotItem.py python3 fixes 2013-02-24 23:09:03 -05:00
GLshaders.py python3 fixes 2013-02-24 23:09:03 -05:00
GLSurfacePlot.py Added pg.gaussianFilter, removed all dependency on gaussian_filter 2014-03-11 19:01:34 -04:00
GLViewWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
GLVolumeItem.py python3 fixes 2013-02-24 23:09:03 -05:00
GradientEditor.py - Major reorganization; we now follow the standard python package structure. 2012-12-26 17:51:52 -05:00
GradientWidget.py TickSliderItem: allowRemove property added (#1442) 2020-11-16 16:18:26 -08:00
GraphicsLayout.py python3 fixes 2013-02-24 23:09:03 -05:00
GraphicsScene.py - Major reorganization; we now follow the standard python package structure. 2012-12-26 17:51:52 -05:00
GraphItem.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
hdf5.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
histogram.py Add "left" and "right" step Modes (#1360) 2020-10-13 08:52:07 -07:00
HistogramLUT.py Update histogramlut example to allow rgb mode 2017-09-26 08:50:31 -07:00
imageAnalysis.py Add image hover callback to imageAnalysis example 2018-07-07 00:10:15 -07:00
ImageItem.py python3 fixes 2013-02-24 23:09:03 -05:00
ImageView.py Clean up examples / docs 2016-08-31 15:14:25 -07:00
infiniteline_performance.py infinite line performance improvement 2016-02-04 03:28:59 +01:00
InfiniteLine.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
initExample.py initExample.py: add PySide6 and PyQt6 2021-01-15 08:25:07 +08:00
isocurve.py examples: use integer division in indexing 2018-03-30 14:51:29 -04:00
JoystickButton.py python3 fixes 2013-02-24 23:09:03 -05:00
Legend.py LegendItem: Make ItemSample customizable (#1404) 2021-01-04 21:02:08 -08:00
linkedViews.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
logAxis.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
LogPlotTest.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
MouseSelection.py Corrected mouse clicking on PlotCurveItem - now uses stroke outline instead of path shape 2013-12-19 09:56:58 -05:00
MultiplePlotAxes.py AxisItem bugfix: corrected x-linked view update behavior 2013-03-19 11:49:10 -04:00
multiplePlotSpeedTest.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
MultiPlotSpeedTest.py Refactor MultiPlotSpeedTest.py 2018-02-03 11:01:03 +08:00
MultiPlotWidget.py Enhancement: [Issue/812]: just pass plotArgs keyword arguments 2020-07-19 19:16:07 +02:00
multiprocess.py Fixed print statements for python 3 2013-01-12 14:35:32 -05:00
optics_demos.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PanningPlot.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
parallelize.py Import from python2_3 for all uses of basestring, cmp, and xrange 2015-05-19 09:29:55 -04:00
parametertree.py Added context menu option to paramtree 2020-05-22 16:05:52 +02:00
PColorMeshItem.py Solve artifacts issues 2020-10-12 12:45:13 +02:00
PlotAutoRange.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PlotSpeedTest.py python3 fixes 2013-02-24 23:09:03 -05:00
Plotting.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
PlotWidget.py Add warning about PySide 5.14, avoid a confusing error message that would appear with 5.14 2020-05-29 23:42:35 -07:00
ProgressDialog.py Prevent dialog from moving label/bar widgets on resize when nested 2017-10-04 09:01:51 -07:00
relativity_demo.py Added new demos: 2014-05-22 01:22:12 -04:00
RemoteGraphicsView.py Bugfixes: 2013-11-06 23:14:27 -05:00
RemoteSpeedTest.py python3 fixes 2013-02-24 23:09:03 -05:00
ROIExamples.py minor fixes 2018-06-15 14:18:38 -07:00
ROItypes.py Replaced usage of deprecated ROI classes in example (#946) 2019-06-21 21:19:02 -07:00
ScaleBar.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
ScatterPlot.py Scatter Plot Improvements (#1420) 2020-12-16 11:07:39 -08:00
ScatterPlotSpeedTest.py import template files using importlib 2021-01-15 08:25:08 +08:00
ScatterPlotSpeedTestTemplate_pyqt.py Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotSpeedTestTemplate_pyqt5.py flip template line endings 2018-05-24 08:54:31 -07:00
ScatterPlotSpeedTestTemplate_pyside.py Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotSpeedTestTemplate_pyside2.py flip pyside2 template line endings 2018-05-17 09:02:41 -07:00
ScatterPlotSpeedTestTemplate_pyside6.py generate template files for pyside6 2021-01-15 08:25:07 +08:00
ScatterPlotSpeedTestTemplate.ui Patch/window handling (#468) 2020-06-01 11:23:18 -07:00
ScatterPlotWidget.py Fix py3 string handling in scatterplotwidget example 2018-05-09 10:56:01 -07:00
scrollingPlots.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
SimplePlot.py Merge branch 'viewbox_limits' into develop 2014-02-04 20:32:44 -05:00
SpinBox.py Permit entry of non-finite values into float SpinBox (#1422) 2020-10-27 21:26:05 -07:00
Symbols.py Peque scatter symbols (#1244) 2020-06-10 23:03:43 -07:00
syntax.py Use raw strings to get rid of DeprecationWarning 2020-09-20 13:59:44 -07:00
TableWidget.py TableWidget updates: 2013-03-06 06:27:24 -05:00
template.py Fix some bugs in PyQt5 2015-01-17 00:21:33 +08:00
test_ExampleApp.py example app now works with Qt4 and Python2 again (#1302) 2020-10-19 11:51:12 -07:00
test_examples.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
text.py Fixed TextItem briefly drawing with incorrect transform. 2016-09-14 18:18:33 -07:00
TreeWidget.py python3 fixes 2013-02-24 23:09:03 -05:00
utils.py Add PColorMeshItem example to the app 2020-07-15 10:30:41 +02:00
verlet_chain_demo.py corrections to manifest 2014-12-23 15:55:52 -05:00
VideoSpeedTest.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
VideoTemplate_pyqt.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
VideoTemplate_pyqt5.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
VideoTemplate_pyside.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
VideoTemplate_pyside2.py Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
VideoTemplate_pyside6.py generate template files for pyside6 2021-01-15 08:25:07 +08:00
VideoTemplate.ui Performance enhancement: use CUDA in ImageItem (#1466) 2021-01-19 21:26:24 -08:00
ViewBox.py Fix line width in a few examples 2015-02-28 11:26:45 -05:00
ViewBoxFeatures.py Replace deprecate class in examples 2018-02-16 12:21:39 +08:00
ViewLimits.py Removed duplicate limit-setting arguments 2014-01-31 13:04:47 -05:00