Commit Graph

2919 Commits

Author SHA1 Message Date
KIU Shueng Chuan
dfddb39ce0 Revert "add QApplication.exec() to Qt5 bindings"
This reverts commit 2dad9862cb.
2021-05-14 06:16:21 +08:00
KIU Shueng Chuan
0fb0209e43 Revert "provide QApplication.exec() for PySide6 6.0"
This reverts commit 3eb69e6d9b.
2021-05-14 06:16:21 +08:00
KIU Shueng Chuan
0754602c3c fix in-library uses of exec_() 2021-05-14 06:16:21 +08:00
KIU Shueng Chuan
21296cd4f3 change all examples to use pg.exec() 2021-05-14 06:16:21 +08:00
KIU Shueng Chuan
61badc88b3 implement pg.exec() 2021-05-14 06:16:21 +08:00
Ogi Moore
1905f83047
Merge pull request #1772 from pijyoi/fix_remote
don't print out expected Exception
2021-05-13 12:22:00 -07:00
KIU Shueng Chuan
381147450d pass through any AttributeError 2021-05-13 14:43:28 +08:00
KIU Shueng Chuan
210203d628 don't print out expected Exception 2021-05-13 13:58:06 +08:00
Ogi Moore
eed220e874
Merge pull request #1771 from pijyoi/fix_pyside6.1
some fixes PySide6 6.1.0
2021-05-12 21:51:01 -07:00
KIU Shueng Chuan
3eb69e6d9b provide QApplication.exec() for PySide6 6.0 2021-05-13 09:48:47 +08:00
KIU Shueng Chuan
2dad9862cb add QApplication.exec() to Qt5 bindings 2021-05-13 09:02:42 +08:00
KIU Shueng Chuan
3b32e27083 RemoteGraphicsView.py : fix deprecated mouse positions 2021-05-13 08:57:15 +08:00
KIU Shueng Chuan
70c123a95c fix localPos() deprecated warnings 2021-05-13 08:42:45 +08:00
KIU Shueng Chuan
60661f586f fix: QVector3D has no copy constructor 2021-05-13 08:23:06 +08:00
Ogi Moore
96e83b7d43
Merge pull request #1766 from pijyoi/vst_numba_toggle
VideoSpeedTest.py : Add numba checkbox
2021-05-07 08:40:03 -07:00
KIU Shueng Chuan
0503f96121 Format_RGB32 will always have alpha equal 255
this also fixes the assumption that we are on little-endian.

In [18]: qimg = QtGui.QImage(1, 1, QtGui.QImage.Format.Format_RGB32)

In [19]: qimg.fill(QtCore.Qt.GlobalColor.transparent)

In [20]: np.frombuffer(qimg.bits(), dtype=np.uint8)
Out[20]: array([  0,   0,   0, 255], dtype=uint8)
2021-05-07 18:09:02 +08:00
KIU Shueng Chuan
09ce81655d VideoSpeedTest.py : Add numba checkbox 2021-05-07 15:35:27 +08:00
Nils Nemitz
bfc63bb730
Make plotting with gradients more fun (#1742)
* added convenience functions to better handle plotting with gradients

* docstring correction, example name correction

* retrying to get  documentation format right

* another attempt at cleaning up docs

* Don't hardcode timer type (and docs fixing attempt)

* more docstring re-formatting

* linebreaks in docstrings

* more documentation adjustments

* documentation pass

* some corrections to documentation

* more adjustments to documentation

* again?

* removed some whitespace and redundant blank lines, changed some checks '== None' to 'is None'

* fixed mis-spelling QColor as Qcolor
2021-05-06 23:20:21 -07:00
Martin Chase
2fb7cdafbd
more complete test yields more complete behavior (#1765) 2021-05-05 18:07:34 -07:00
Martin Chase
fa1be1e5bf
show and hide properly for maxTraces; +test (#1764) 2021-05-05 17:08:04 -07:00
Kenneth Lyons
cafe079910
Support horizontal HistogramLUT{Item,Widget} (#1757)
* Improve HistogramLUTItem docs, a few cosmetic changes

* Initial implementation of horizontally-oriented HistogramLUTItem

- Also adds support in HistogramLUTWidget
- Fixes AxisItem orientation bug for vertical orientation
- Make use of GradientEditorItem orientation (fixes another bug for
  vertical orientation)
- Use horizontal orientation in an example for demonstration

* Remove unused HistogramLUTItem option

* A few more minor fixups

* Copy paste bug

* Use f-strings

* Update from review and a couple more minor updates

* Woops

* Add doc for orientation arg

* Add top/bottom orientation to doc. Expand on levelMode doc a bit
2021-05-04 21:25:42 -07:00
Ogi Moore
7dd033c03b
Merge pull request #1759 from alimustafashah/master
#1758 Fixed typo in InfiniteLine (sigclicked vs. sigClicked)
2021-05-03 20:31:51 -07:00
shahmustafa54
e1b1410260 Fixed typo in InfiniteLine (sigclicked vs. sigClicked) 2021-05-04 06:03:17 +05:00
Ogi Moore
cf70cf4395
Merge pull request #1754 from j9ac9k/remove-pytest-extensions-from-ci
Remove pytest extensions from ci
2021-05-01 21:28:49 -07:00
Ogi Moore
2fd5337215 Run processEvents twice to make sure plot is redrawn 2021-05-01 18:05:33 -07:00
Ogi Moore
cb48ce0548 Remove pytest-cov 2021-05-01 14:23:33 -07:00
Ogi Moore
6163a60198 Remove pytest-xdist 2021-05-01 14:23:28 -07:00
Martin Chase
85e2574230
useCupy option should be settable after ImageItem init (#1749)
* do not cache the cupy so the config option can be set later

* getCupy will always return None if the option is not set

* test of failing behavior

* divorce skip from option; restore option after test
2021-04-30 10:41:11 -07:00
Fernando Bordignon
7dc4823cc6
Update symbols documentation and inverted up and down arrows of scatterplotitem (#1747) 2021-04-29 19:34:19 -07:00
pijyoi
4d6a8e4998
add usage of numba (for rescale) (#1695)
* implement rescale using numba

* workaround to pass test_makeARGB.py

* key on (input, output) manually

* remove minimum version check

* signature needs to be a list of signatures

numba considers it a mistake for single-item non-list but works around
it internally

* add numba test to test_makeARGB.py

* add numba as dependency in CI

* handle properly the case where useNumba was already True

* restore useCupy setting after test

* filter numba nan warning

* don't make changes to test_cupy_makeARGB_...
2021-04-28 22:29:09 -07:00
Nils Nemitz
a7bc2b9a63
clean-up of PlotDataItem downsample methods (#1725)
* clean-up of PlotDataItem downsample methods

* high end of range at low end, not zero

Co-authored-by: Ogi Moore <ognyan.moore@gmail.com>
2021-04-28 22:07:24 -07:00
Martin Chase
4ee1fe4388
fix bug when plotting boolean arrays (#1748)
* test and fix for plotting boolean arrays

* smaller is faster

* oh, that bool went away

* tests should keep up with optimizations
2021-04-28 21:35:27 -07:00
Ogi Moore
a534132c62
Various performance improvements to pg.Point (#1741)
This change makes use of QPointF methods which perform faster than the python
equivalent methods.  Furthermore, some tests are added.

* Set __slots__ to empty tuple for pg.Point
* Make Point.angle() behave as Vector.angle()
2021-04-28 21:29:47 -07:00
Ogi Moore
fe66f3fd12
Merge pull request #1746 from pijyoi/fix_cprint_remote
fix: cprint of remote output needs decode()
2021-04-28 20:46:24 -07:00
KIU Shueng Chuan
306e9c2498 fix: cprint of remote output needs decode() 2021-04-28 16:38:15 +08:00
Ogi Moore
2cbc86bee1
Merge pull request #1743 from j9ac9k/cleanup-some-static-code-checks
Cleanup some static code checks
2021-04-25 22:01:06 -07:00
Ogi Moore
2d8d1d6d32 Add tmp_module fixture for test_reload 2021-04-25 21:36:42 -07:00
Ogi Moore
7c48233bfa Remove unreachable code 2021-04-25 21:36:23 -07:00
Ogi Moore
38dccf8642 Fix indentation bug with flowchart 2021-04-25 20:10:54 -07:00
Ogi Moore
00a0ddb0d4 Do not import value of mutable attribute
This was brought to the attention via the stack type checker, Easy fix so it is being
implemented.
2021-04-25 20:08:47 -07:00
Ogi Moore
4d388ee633 Use open context-manager instead of file.open()
Static code checker identified multiple places where a file is opened
but is not necessarily closed.  This commit addressed that with the
exception of RemoteGraphicsView.py
2021-04-25 17:05:05 -07:00
Ogi Moore
cf95964678
Merge pull request #1738 from pijyoi/fix_font
use Format_RGB32 when using QImage as paint device
2021-04-24 09:43:42 -07:00
Ogi Moore
d9a3774f6c
Merge pull request #1739 from pijyoi/manual_form
Export dialog: ParameterTree needs 2 columns
2021-04-24 09:41:40 -07:00
Ogi Moore
6a708dc203
Merge pull request #1724 from j9ac9k/use-math-module-for-single-values
Use math module methods for scalars
2021-04-23 23:10:17 -07:00
Ogi Moore
03ea368454 Clean up Errors for CodeQL analyzer
CodeQL identified some errors and warnings, which this commit cleans up.
2021-04-23 22:44:29 -07:00
Ogi Moore
329423f525 Use QTransform.rotateRadians when appropriate
In a few places in the library, we are doing the conversion from radians
to degrees just so we can call QTransform.rotate(), but there is a
QTransform.rotateRadians() method which would be more suitable, thus
making it so we do not have to handle the conversions ourselves
2021-04-23 22:43:57 -07:00
Ogi Moore
e1415cb3a8 Use np.pi or math.pi instead of just pi 2021-04-23 22:43:57 -07:00
Ogi Moore
6a386e723b Fix overflow warning in QColor by using np.isfinite 2021-04-23 22:43:57 -07:00
Ogi Moore
3ea92736b8 Do not use list comprehensions with any or all
python any and all are able to break early the moment they come across a
member of the iterable that meets the condition; but having a list
comprehension nested within breaks that ability to exit early, as the
list comprehension has to finish being constructed first before it can
be evaluated
2021-04-23 22:43:57 -07:00
Ogi Moore
314121192a Use math module for isfinite or isnan for scalars
Various places in the library attempt to check if scalars are finite
via numpy methods, which are intended to be used on numpy arrays.  Using
the math module equivalent functions on scalars is significantly faster.

In a few places, I also use numpy methods explicitly (np.all vs. all)
2021-04-23 22:43:57 -07:00