QInstrument 1.0.1__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. {qinstrument-1.0.1 → qinstrument-2.2.0}/PKG-INFO +50 -18
  2. {qinstrument-1.0.1 → qinstrument-2.2.0}/QInstrument.egg-info/PKG-INFO +50 -18
  3. qinstrument-2.2.0/QInstrument.egg-info/SOURCES.txt +203 -0
  4. qinstrument-2.2.0/QInstrument.egg-info/entry_points.txt +2 -0
  5. qinstrument-2.2.0/QInstrument.egg-info/requires.txt +14 -0
  6. qinstrument-2.2.0/QInstrumentRack.py +581 -0
  7. {qinstrument-1.0.1 → qinstrument-2.2.0}/README.md +41 -14
  8. qinstrument-2.2.0/__main__.py +49 -0
  9. qinstrument-2.2.0/instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui +421 -0
  10. qinstrument-2.2.0/instruments/IPGPhotonics/IPGLaser/fake.py +80 -0
  11. qinstrument-2.2.0/instruments/IPGPhotonics/IPGLaser/instrument.py +363 -0
  12. qinstrument-2.2.0/instruments/IPGPhotonics/IPGLaser/tree.py +14 -0
  13. qinstrument-2.2.0/instruments/IPGPhotonics/IPGLaser/widget.py +133 -0
  14. qinstrument-2.2.0/instruments/IPGPhotonics/__init__.py +0 -0
  15. qinstrument-2.2.0/instruments/Novanta/Opus/OpusWidget.ui +231 -0
  16. qinstrument-2.2.0/instruments/Novanta/Opus/fake.py +58 -0
  17. qinstrument-2.2.0/instruments/Novanta/Opus/instrument.py +238 -0
  18. qinstrument-2.2.0/instruments/Novanta/Opus/tree.py +14 -0
  19. qinstrument-2.2.0/instruments/Novanta/Opus/widget.py +138 -0
  20. qinstrument-2.2.0/instruments/Novanta/Opus1064/__init__.py +15 -0
  21. qinstrument-2.2.0/instruments/Novanta/Opus1064/fake.py +9 -0
  22. qinstrument-2.2.0/instruments/Novanta/Opus1064/instrument.py +15 -0
  23. qinstrument-2.2.0/instruments/Novanta/Opus1064/tree.py +14 -0
  24. qinstrument-2.2.0/instruments/Novanta/Opus1064/widget.py +14 -0
  25. qinstrument-2.2.0/instruments/Novanta/Opus532/__init__.py +15 -0
  26. qinstrument-2.2.0/instruments/Novanta/Opus532/fake.py +9 -0
  27. qinstrument-2.2.0/instruments/Novanta/Opus532/instrument.py +15 -0
  28. qinstrument-2.2.0/instruments/Novanta/Opus532/tree.py +14 -0
  29. qinstrument-2.2.0/instruments/Novanta/Opus532/widget.py +14 -0
  30. qinstrument-2.2.0/instruments/Novanta/Opus660/__init__.py +15 -0
  31. qinstrument-2.2.0/instruments/Novanta/Opus660/fake.py +9 -0
  32. qinstrument-2.2.0/instruments/Novanta/Opus660/instrument.py +15 -0
  33. qinstrument-2.2.0/instruments/Novanta/Opus660/tree.py +14 -0
  34. qinstrument-2.2.0/instruments/Novanta/Opus660/widget.py +14 -0
  35. qinstrument-2.2.0/instruments/Novanta/__init__.py +0 -0
  36. {qinstrument-1.0.1/instruments/PiezoDrive → qinstrument-2.2.0/instruments/PiezoDrive/PDUS210}/fake.py +1 -1
  37. {qinstrument-1.0.1/instruments/PiezoDrive → qinstrument-2.2.0/instruments/PiezoDrive/PDUS210}/instrument.py +0 -4
  38. qinstrument-2.2.0/instruments/PiezoDrive/PDUS210/tree.py +14 -0
  39. {qinstrument-1.0.1/instruments/PiezoDrive → qinstrument-2.2.0/instruments/PiezoDrive/PDUS210}/widget.py +4 -7
  40. qinstrument-2.2.0/instruments/PiezoDrive/__init__.py +0 -0
  41. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/PriorScientific}/Proscan/ProscanWidget.ui +76 -29
  42. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/PriorScientific}/Proscan/fake.py +31 -3
  43. qinstrument-2.2.0/instruments/PriorScientific/Proscan/instrument.py +569 -0
  44. qinstrument-2.2.0/instruments/PriorScientific/Proscan/tree.py +14 -0
  45. qinstrument-2.2.0/instruments/PriorScientific/Proscan/widget.py +105 -0
  46. qinstrument-2.2.0/instruments/PriorScientific/__init__.py +0 -0
  47. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/DS345/fake.py +4 -1
  48. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/DS345/instrument.py +1 -6
  49. qinstrument-2.2.0/instruments/StanfordResearch/DS345/tree.py +14 -0
  50. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/DS345/widget.py +5 -4
  51. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR830/__init__.py +1 -1
  52. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR830/fake.py +4 -1
  53. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR830/instrument.py +10 -13
  54. qinstrument-2.2.0/instruments/StanfordResearch/SR830/tree.py +14 -0
  55. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR830/widget.py +2 -5
  56. qinstrument-2.2.0/instruments/StanfordResearch/SR830/worker.py +38 -0
  57. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR844/SR844Widget.ui +20 -2
  58. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR844/__init__.py +1 -1
  59. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR844/fake.py +4 -1
  60. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR844/instrument.py +0 -5
  61. qinstrument-2.2.0/instruments/StanfordResearch/SR844/tree.py +14 -0
  62. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR844/widget.py +5 -4
  63. qinstrument-2.2.0/instruments/StanfordResearch/SR844/worker.py +38 -0
  64. qinstrument-2.2.0/instruments/StanfordResearch/__init__.py +0 -0
  65. qinstrument-2.2.0/instruments/Tektronix/__init__.py +0 -0
  66. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/Configure.py +24 -0
  67. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/QAbstractInstrument.py +60 -8
  68. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/QFakeInstrument.py +10 -7
  69. qinstrument-2.2.0/lib/QInstrumentTree.py +367 -0
  70. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/QInstrumentWidget.py +205 -22
  71. qinstrument-2.2.0/lib/QInstrumentWorker.py +111 -0
  72. qinstrument-2.2.0/lib/QReconcileDialog.py +99 -0
  73. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/QSerialInstrument.py +13 -2
  74. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/QSerialInterface.py +7 -6
  75. {qinstrument-1.0.1 → qinstrument-2.2.0}/pyproject.toml +29 -11
  76. {qinstrument-1.0.1 → qinstrument-2.2.0}/tests/test_Configure.py +30 -0
  77. {qinstrument-1.0.1 → qinstrument-2.2.0}/tests/test_QAbstractInstrument.py +52 -0
  78. qinstrument-2.2.0/tests/test_QDS345.py +79 -0
  79. qinstrument-2.2.0/tests/test_QIPGLaser.py +164 -0
  80. qinstrument-2.2.0/tests/test_QInstrumentRack.py +234 -0
  81. qinstrument-2.2.0/tests/test_QInstrumentWidget.py +517 -0
  82. qinstrument-2.2.0/tests/test_QInstrumentWorker.py +162 -0
  83. qinstrument-2.2.0/tests/test_QLedWidget.py +179 -0
  84. qinstrument-2.2.0/tests/test_QOpus.py +138 -0
  85. qinstrument-2.2.0/tests/test_QPDUS210.py +121 -0
  86. qinstrument-2.2.0/tests/test_QProscan.py +175 -0
  87. qinstrument-2.2.0/tests/test_QRotaryEncoderSpinBox.py +127 -0
  88. qinstrument-2.2.0/tests/test_QSR830.py +73 -0
  89. qinstrument-2.2.0/tests/test_QSR830Worker.py +105 -0
  90. qinstrument-2.2.0/tests/test_QSR844.py +72 -0
  91. {qinstrument-1.0.1 → qinstrument-2.2.0}/tests/test_QSerialInstrument.py +2 -2
  92. {qinstrument-1.0.1 → qinstrument-2.2.0}/tests/test_QSerialInterface.py +2 -2
  93. {qinstrument-1.0.1 → qinstrument-2.2.0}/widgets/QJoystick.py +70 -23
  94. qinstrument-2.2.0/widgets/QJoystickPad.py +406 -0
  95. qinstrument-2.2.0/widgets/QLedWidget.py +235 -0
  96. {qinstrument-1.0.1 → qinstrument-2.2.0}/widgets/QRotaryEncoderSpinBox.py +77 -51
  97. {qinstrument-1.0.1 → qinstrument-2.2.0}/widgets/QRotaryEncoderSpinBox.ui +12 -2
  98. {qinstrument-1.0.1 → qinstrument-2.2.0}/widgets/__init__.py +1 -0
  99. qinstrument-1.0.1/QInstrument.egg-info/SOURCES.txt +0 -134
  100. qinstrument-1.0.1/QInstrument.egg-info/requires.txt +0 -11
  101. qinstrument-1.0.1/instruments/IPGLaser/IPGLaserWidget.ui +0 -95
  102. qinstrument-1.0.1/instruments/IPGLaser/fake.py +0 -44
  103. qinstrument-1.0.1/instruments/IPGLaser/icons/amber-led-off.png +0 -0
  104. qinstrument-1.0.1/instruments/IPGLaser/icons/amber-led-on.png +0 -0
  105. qinstrument-1.0.1/instruments/IPGLaser/icons/green-led-off.png +0 -0
  106. qinstrument-1.0.1/instruments/IPGLaser/icons/green-led-on.png +0 -0
  107. qinstrument-1.0.1/instruments/IPGLaser/icons/red-led-off.png +0 -0
  108. qinstrument-1.0.1/instruments/IPGLaser/icons/red-led-on.png +0 -0
  109. qinstrument-1.0.1/instruments/IPGLaser/instrument.py +0 -239
  110. qinstrument-1.0.1/instruments/IPGLaser/widget.py +0 -40
  111. qinstrument-1.0.1/instruments/Opus/OpusWidget.ui +0 -382
  112. qinstrument-1.0.1/instruments/Opus/fake.py +0 -31
  113. qinstrument-1.0.1/instruments/Opus/instrument.py +0 -146
  114. qinstrument-1.0.1/instruments/Opus/widget.py +0 -89
  115. qinstrument-1.0.1/instruments/Proscan/instrument.py +0 -308
  116. qinstrument-1.0.1/instruments/Proscan/widget.py +0 -63
  117. qinstrument-1.0.1/lib/QThreadedInstrumentWidget.py +0 -20
  118. qinstrument-1.0.1/lib/threadedInstrument.py +0 -24
  119. qinstrument-1.0.1/tests/test_QInstrumentWidget.py +0 -261
  120. qinstrument-1.0.1/widgets/QLedWidget.py +0 -163
  121. {qinstrument-1.0.1 → qinstrument-2.2.0}/LICENSE.md +0 -0
  122. {qinstrument-1.0.1 → qinstrument-2.2.0}/QInstrument.egg-info/dependency_links.txt +0 -0
  123. {qinstrument-1.0.1 → qinstrument-2.2.0}/QInstrument.egg-info/top_level.txt +0 -0
  124. {qinstrument-1.0.1 → qinstrument-2.2.0}/__init__.py +0 -0
  125. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/IPGPhotonics}/IPGLaser/__init__.py +0 -0
  126. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/Novanta}/Opus/__init__.py +0 -0
  127. {qinstrument-1.0.1/instruments/PiezoDrive → qinstrument-2.2.0/instruments/PiezoDrive/PDUS210}/PDUS210Widget.ui +0 -0
  128. {qinstrument-1.0.1/instruments/PiezoDrive → qinstrument-2.2.0/instruments/PiezoDrive/PDUS210}/__init__.py +0 -0
  129. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/PriorScientific}/Proscan/__init__.py +0 -0
  130. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/DS345/DS345Widget.ui +0 -0
  131. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/DS345/__init__.py +0 -0
  132. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/StanfordResearch}/SR830/SR830Widget.ui +0 -0
  133. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/Tektronix}/TDS1000/__init__.py +0 -0
  134. {qinstrument-1.0.1/instruments → qinstrument-2.2.0/instruments/Tektronix}/TDS1000/instrument.py +0 -0
  135. {qinstrument-1.0.1 → qinstrument-2.2.0}/instruments/__init__.py +0 -0
  136. {qinstrument-1.0.1 → qinstrument-2.2.0}/lib/__init__.py +0 -0
  137. {qinstrument-1.0.1 → qinstrument-2.2.0}/setup.cfg +0 -0
  138. {qinstrument-1.0.1 → qinstrument-2.2.0}/tests/test_QFakeInstrument.py +0 -0
  139. {qinstrument-1.0.1 → qinstrument-2.2.0}/widgets/QRotaryEncoder.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QInstrument
3
- Version: 1.0.1
3
+ Version: 2.2.0
4
4
  Summary: Qt-based framework for controlling scientific instruments over serial ports
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -23,6 +23,9 @@ License: GNU GENERAL PUBLIC LICENSE
23
23
 
24
24
  Project-URL: Homepage, https://github.com/davidgrier/QInstrument
25
25
  Project-URL: Repository, https://github.com/davidgrier/QInstrument
26
+ Project-URL: Documentation, https://qinstrument.readthedocs.io
27
+ Project-URL: Changelog, https://github.com/davidgrier/QInstrument/blob/main/CHANGELOG.rst
28
+ Project-URL: Issue Tracker, https://github.com/davidgrier/QInstrument/issues
26
29
  Keywords: scientific instruments,serial port,Qt,laboratory automation
27
30
  Classifier: Development Status :: 5 - Production/Stable
28
31
  Classifier: Intended Audience :: Science/Research
@@ -38,10 +41,12 @@ Description-Content-Type: text/markdown
38
41
  License-File: LICENSE.md
39
42
  Requires-Dist: numpy>=1.20
40
43
  Requires-Dist: qtpy>=2.0
44
+ Provides-Extra: tree
45
+ Requires-Dist: pyqtgraph>=0.13; extra == "tree"
41
46
  Provides-Extra: docs
42
- Requires-Dist: sphinx>=7.0; extra == "docs"
43
- Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
44
- Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
47
+ Requires-Dist: sphinx>=8.0; extra == "docs"
48
+ Requires-Dist: pydata-sphinx-theme>=0.16; extra == "docs"
49
+ Requires-Dist: sphinx-autodoc-typehints>=2.0; extra == "docs"
45
50
  Provides-Extra: dev
46
51
  Requires-Dist: pytest>=7.0; extra == "dev"
47
52
  Requires-Dist: pytest-qt>=4.0; extra == "dev"
@@ -52,6 +57,7 @@ Dynamic: license-file
52
57
  [![PyPI version](https://img.shields.io/pypi/v/QInstrument.svg)](https://pypi.org/project/QInstrument/)
53
58
  [![Tests](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml/badge.svg)](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml)
54
59
  [![Documentation](https://readthedocs.org/projects/qinstrument/badge/?version=latest)](https://qinstrument.readthedocs.io/en/latest/)
60
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19424797.svg)](https://doi.org/10.5281/zenodo.19424797)
55
61
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
56
62
 
57
63
  A Qt-based framework for controlling scientific instruments over serial ports.
@@ -62,7 +68,7 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
62
68
  ## Instruments
63
69
 
64
70
  ### IPG Photonics
65
- - **YLR Series**: Ytterbium fibre laser
71
+ - **YLR Series**: Ytterbium fiber laser
66
72
 
67
73
  ### Laser Quantum
68
74
  - **Opus**: Continuous-wave laser
@@ -71,10 +77,10 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
71
77
  - **PDUS210**: Piezo transducer driver
72
78
 
73
79
  ### Prior Scientific
74
- - **Proscan II/III**: Motorised microscope stage controller
80
+ - **Proscan II/III**: Motorized microscope stage controller
75
81
 
76
82
  ### Stanford Research Systems
77
- - **DS345**: 30 MHz Synthesised Function Generator
83
+ - **DS345**: 30 MHz Synthesized Function Generator
78
84
  - **SR830**: 100 kHz Digital Lock-in Amplifier
79
85
  - **SR844**: 200 MHz RF Lock-in Amplifier
80
86
 
@@ -83,28 +89,53 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
83
89
 
84
90
  ## Installation
85
91
 
92
+ ```bash
93
+ pip install QInstrument
94
+ pip install PyQt6 # or PyQt5, PySide2, PySide6
95
+ ```
96
+
97
+ Installing from PyPI also places a `qinstrument` command on your PATH.
98
+
99
+ To install from source:
100
+
86
101
  ```bash
87
102
  git clone https://github.com/davidgrier/QInstrument
88
103
  cd QInstrument
89
104
  python -m venv .qi
90
105
  source .qi/bin/activate
91
- pip install -r requirements.txt
106
+ pip install -e ".[dev]"
92
107
  ```
93
108
 
94
109
  ## Quick start
95
110
 
96
- Each instrument widget has a built-in `example()` entry point.
97
- Run it directly from the command line:
111
+ ### Rack application
112
+
113
+ Launch the rack to control multiple instruments at once:
114
+
115
+ ```bash
116
+ qinstrument DS345 SR830
117
+ ```
118
+
119
+ On subsequent runs, `qinstrument` with no arguments restores the
120
+ last-used instrument list automatically. Use the **Add instrument…**
121
+ button to add instruments at runtime, or right-click any instrument
122
+ to remove it.
123
+
124
+ <img src="https://raw.githubusercontent.com/davidgrier/QInstrument/main/docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
125
+
126
+ ### Single instrument widget
127
+
128
+ Each instrument widget also has a built-in `example()` entry point:
98
129
 
99
130
  ```bash
100
131
  python -m QInstrument.instruments.DS345.widget
101
132
  ```
102
133
 
103
134
  This finds a connected DS345 and opens its control panel.
104
- If no instrument is detected it falls back automatically to a simulated
105
- (fake) device so the UI is always usable.
135
+ If no instrument is detected it falls back automatically to a
136
+ simulated (fake) device so the UI is always usable.
106
137
 
107
- You can also drive the widget from your own application:
138
+ ### Embedding a widget in your application
108
139
 
109
140
  ```python
110
141
  from qtpy.QtWidgets import QApplication
@@ -116,11 +147,9 @@ widget.show()
116
147
  app.exec()
117
148
  ```
118
149
 
119
- <img src="https://raw.githubusercontent.com/davidgrier/QInstrument/main/docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
120
-
121
150
  ### Using a simulated instrument
122
151
 
123
- When hardware is not available, import the fake class directly:
152
+ When hardware is not available, pass a fake device directly:
124
153
 
125
154
  ```python
126
155
  from QInstrument.instruments.DS345 import QDS345Widget, QFakeDS345
@@ -135,7 +164,7 @@ app.exec()
135
164
 
136
165
  ```
137
166
  QtCore.QObject
138
- └── QAbstractInstrument # property/method registry, thread-safe get/set, settings I/O
167
+ └── QAbstractInstrument # property/method registry, thread-safe get/set
139
168
  └── QSerialInstrument # holds QSerialInterface; adds open/find/identify
140
169
  └── QXxxInstrument # concrete instrument
141
170
 
@@ -143,7 +172,10 @@ QtSerialPort.QSerialPort
143
172
  └── QSerialInterface # raw serial I/O (owned by QSerialInstrument)
144
173
 
145
174
  QWidget
146
- └── QInstrumentWidget # loads .ui file, auto-binds widgets to registered properties
175
+ ├── QInstrumentWidget # loads .ui file; auto-binds widgets to properties;
176
+ │ # saves/restores device state via Configure
177
+ └── QInstrumentRack # holds multiple QInstrumentWidgets; runtime
178
+ # add/remove; saves/restores instrument list
147
179
  ```
148
180
 
149
181
  Each instrument lives in `instruments/<Name>/` with three files:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QInstrument
3
- Version: 1.0.1
3
+ Version: 2.2.0
4
4
  Summary: Qt-based framework for controlling scientific instruments over serial ports
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -23,6 +23,9 @@ License: GNU GENERAL PUBLIC LICENSE
23
23
 
24
24
  Project-URL: Homepage, https://github.com/davidgrier/QInstrument
25
25
  Project-URL: Repository, https://github.com/davidgrier/QInstrument
26
+ Project-URL: Documentation, https://qinstrument.readthedocs.io
27
+ Project-URL: Changelog, https://github.com/davidgrier/QInstrument/blob/main/CHANGELOG.rst
28
+ Project-URL: Issue Tracker, https://github.com/davidgrier/QInstrument/issues
26
29
  Keywords: scientific instruments,serial port,Qt,laboratory automation
27
30
  Classifier: Development Status :: 5 - Production/Stable
28
31
  Classifier: Intended Audience :: Science/Research
@@ -38,10 +41,12 @@ Description-Content-Type: text/markdown
38
41
  License-File: LICENSE.md
39
42
  Requires-Dist: numpy>=1.20
40
43
  Requires-Dist: qtpy>=2.0
44
+ Provides-Extra: tree
45
+ Requires-Dist: pyqtgraph>=0.13; extra == "tree"
41
46
  Provides-Extra: docs
42
- Requires-Dist: sphinx>=7.0; extra == "docs"
43
- Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
44
- Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
47
+ Requires-Dist: sphinx>=8.0; extra == "docs"
48
+ Requires-Dist: pydata-sphinx-theme>=0.16; extra == "docs"
49
+ Requires-Dist: sphinx-autodoc-typehints>=2.0; extra == "docs"
45
50
  Provides-Extra: dev
46
51
  Requires-Dist: pytest>=7.0; extra == "dev"
47
52
  Requires-Dist: pytest-qt>=4.0; extra == "dev"
@@ -52,6 +57,7 @@ Dynamic: license-file
52
57
  [![PyPI version](https://img.shields.io/pypi/v/QInstrument.svg)](https://pypi.org/project/QInstrument/)
53
58
  [![Tests](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml/badge.svg)](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml)
54
59
  [![Documentation](https://readthedocs.org/projects/qinstrument/badge/?version=latest)](https://qinstrument.readthedocs.io/en/latest/)
60
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19424797.svg)](https://doi.org/10.5281/zenodo.19424797)
55
61
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
56
62
 
57
63
  A Qt-based framework for controlling scientific instruments over serial ports.
@@ -62,7 +68,7 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
62
68
  ## Instruments
63
69
 
64
70
  ### IPG Photonics
65
- - **YLR Series**: Ytterbium fibre laser
71
+ - **YLR Series**: Ytterbium fiber laser
66
72
 
67
73
  ### Laser Quantum
68
74
  - **Opus**: Continuous-wave laser
@@ -71,10 +77,10 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
71
77
  - **PDUS210**: Piezo transducer driver
72
78
 
73
79
  ### Prior Scientific
74
- - **Proscan II/III**: Motorised microscope stage controller
80
+ - **Proscan II/III**: Motorized microscope stage controller
75
81
 
76
82
  ### Stanford Research Systems
77
- - **DS345**: 30 MHz Synthesised Function Generator
83
+ - **DS345**: 30 MHz Synthesized Function Generator
78
84
  - **SR830**: 100 kHz Digital Lock-in Amplifier
79
85
  - **SR844**: 200 MHz RF Lock-in Amplifier
80
86
 
@@ -83,28 +89,53 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
83
89
 
84
90
  ## Installation
85
91
 
92
+ ```bash
93
+ pip install QInstrument
94
+ pip install PyQt6 # or PyQt5, PySide2, PySide6
95
+ ```
96
+
97
+ Installing from PyPI also places a `qinstrument` command on your PATH.
98
+
99
+ To install from source:
100
+
86
101
  ```bash
87
102
  git clone https://github.com/davidgrier/QInstrument
88
103
  cd QInstrument
89
104
  python -m venv .qi
90
105
  source .qi/bin/activate
91
- pip install -r requirements.txt
106
+ pip install -e ".[dev]"
92
107
  ```
93
108
 
94
109
  ## Quick start
95
110
 
96
- Each instrument widget has a built-in `example()` entry point.
97
- Run it directly from the command line:
111
+ ### Rack application
112
+
113
+ Launch the rack to control multiple instruments at once:
114
+
115
+ ```bash
116
+ qinstrument DS345 SR830
117
+ ```
118
+
119
+ On subsequent runs, `qinstrument` with no arguments restores the
120
+ last-used instrument list automatically. Use the **Add instrument…**
121
+ button to add instruments at runtime, or right-click any instrument
122
+ to remove it.
123
+
124
+ <img src="https://raw.githubusercontent.com/davidgrier/QInstrument/main/docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
125
+
126
+ ### Single instrument widget
127
+
128
+ Each instrument widget also has a built-in `example()` entry point:
98
129
 
99
130
  ```bash
100
131
  python -m QInstrument.instruments.DS345.widget
101
132
  ```
102
133
 
103
134
  This finds a connected DS345 and opens its control panel.
104
- If no instrument is detected it falls back automatically to a simulated
105
- (fake) device so the UI is always usable.
135
+ If no instrument is detected it falls back automatically to a
136
+ simulated (fake) device so the UI is always usable.
106
137
 
107
- You can also drive the widget from your own application:
138
+ ### Embedding a widget in your application
108
139
 
109
140
  ```python
110
141
  from qtpy.QtWidgets import QApplication
@@ -116,11 +147,9 @@ widget.show()
116
147
  app.exec()
117
148
  ```
118
149
 
119
- <img src="https://raw.githubusercontent.com/davidgrier/QInstrument/main/docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
120
-
121
150
  ### Using a simulated instrument
122
151
 
123
- When hardware is not available, import the fake class directly:
152
+ When hardware is not available, pass a fake device directly:
124
153
 
125
154
  ```python
126
155
  from QInstrument.instruments.DS345 import QDS345Widget, QFakeDS345
@@ -135,7 +164,7 @@ app.exec()
135
164
 
136
165
  ```
137
166
  QtCore.QObject
138
- └── QAbstractInstrument # property/method registry, thread-safe get/set, settings I/O
167
+ └── QAbstractInstrument # property/method registry, thread-safe get/set
139
168
  └── QSerialInstrument # holds QSerialInterface; adds open/find/identify
140
169
  └── QXxxInstrument # concrete instrument
141
170
 
@@ -143,7 +172,10 @@ QtSerialPort.QSerialPort
143
172
  └── QSerialInterface # raw serial I/O (owned by QSerialInstrument)
144
173
 
145
174
  QWidget
146
- └── QInstrumentWidget # loads .ui file, auto-binds widgets to registered properties
175
+ ├── QInstrumentWidget # loads .ui file; auto-binds widgets to properties;
176
+ │ # saves/restores device state via Configure
177
+ └── QInstrumentRack # holds multiple QInstrumentWidgets; runtime
178
+ # add/remove; saves/restores instrument list
147
179
  ```
148
180
 
149
181
  Each instrument lives in `instruments/<Name>/` with three files:
@@ -0,0 +1,203 @@
1
+ LICENSE.md
2
+ QInstrumentRack.py
3
+ README.md
4
+ __init__.py
5
+ __main__.py
6
+ pyproject.toml
7
+ ./QInstrumentRack.py
8
+ ./__init__.py
9
+ ./__main__.py
10
+ ./instruments/__init__.py
11
+ ./instruments/IPGPhotonics/__init__.py
12
+ ./instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui
13
+ ./instruments/IPGPhotonics/IPGLaser/__init__.py
14
+ ./instruments/IPGPhotonics/IPGLaser/fake.py
15
+ ./instruments/IPGPhotonics/IPGLaser/instrument.py
16
+ ./instruments/IPGPhotonics/IPGLaser/tree.py
17
+ ./instruments/IPGPhotonics/IPGLaser/widget.py
18
+ ./instruments/Novanta/__init__.py
19
+ ./instruments/Novanta/Opus/OpusWidget.ui
20
+ ./instruments/Novanta/Opus/__init__.py
21
+ ./instruments/Novanta/Opus/fake.py
22
+ ./instruments/Novanta/Opus/instrument.py
23
+ ./instruments/Novanta/Opus/tree.py
24
+ ./instruments/Novanta/Opus/widget.py
25
+ ./instruments/Novanta/Opus1064/__init__.py
26
+ ./instruments/Novanta/Opus1064/fake.py
27
+ ./instruments/Novanta/Opus1064/instrument.py
28
+ ./instruments/Novanta/Opus1064/tree.py
29
+ ./instruments/Novanta/Opus1064/widget.py
30
+ ./instruments/Novanta/Opus532/__init__.py
31
+ ./instruments/Novanta/Opus532/fake.py
32
+ ./instruments/Novanta/Opus532/instrument.py
33
+ ./instruments/Novanta/Opus532/tree.py
34
+ ./instruments/Novanta/Opus532/widget.py
35
+ ./instruments/Novanta/Opus660/__init__.py
36
+ ./instruments/Novanta/Opus660/fake.py
37
+ ./instruments/Novanta/Opus660/instrument.py
38
+ ./instruments/Novanta/Opus660/tree.py
39
+ ./instruments/Novanta/Opus660/widget.py
40
+ ./instruments/PiezoDrive/__init__.py
41
+ ./instruments/PiezoDrive/PDUS210/PDUS210Widget.ui
42
+ ./instruments/PiezoDrive/PDUS210/__init__.py
43
+ ./instruments/PiezoDrive/PDUS210/fake.py
44
+ ./instruments/PiezoDrive/PDUS210/instrument.py
45
+ ./instruments/PiezoDrive/PDUS210/tree.py
46
+ ./instruments/PiezoDrive/PDUS210/widget.py
47
+ ./instruments/PriorScientific/__init__.py
48
+ ./instruments/PriorScientific/Proscan/ProscanWidget.ui
49
+ ./instruments/PriorScientific/Proscan/__init__.py
50
+ ./instruments/PriorScientific/Proscan/fake.py
51
+ ./instruments/PriorScientific/Proscan/instrument.py
52
+ ./instruments/PriorScientific/Proscan/tree.py
53
+ ./instruments/PriorScientific/Proscan/widget.py
54
+ ./instruments/StanfordResearch/__init__.py
55
+ ./instruments/StanfordResearch/DS345/DS345Widget.ui
56
+ ./instruments/StanfordResearch/DS345/__init__.py
57
+ ./instruments/StanfordResearch/DS345/fake.py
58
+ ./instruments/StanfordResearch/DS345/instrument.py
59
+ ./instruments/StanfordResearch/DS345/tree.py
60
+ ./instruments/StanfordResearch/DS345/widget.py
61
+ ./instruments/StanfordResearch/SR830/SR830Widget.ui
62
+ ./instruments/StanfordResearch/SR830/__init__.py
63
+ ./instruments/StanfordResearch/SR830/fake.py
64
+ ./instruments/StanfordResearch/SR830/instrument.py
65
+ ./instruments/StanfordResearch/SR830/tree.py
66
+ ./instruments/StanfordResearch/SR830/widget.py
67
+ ./instruments/StanfordResearch/SR830/worker.py
68
+ ./instruments/StanfordResearch/SR844/SR844Widget.ui
69
+ ./instruments/StanfordResearch/SR844/__init__.py
70
+ ./instruments/StanfordResearch/SR844/fake.py
71
+ ./instruments/StanfordResearch/SR844/instrument.py
72
+ ./instruments/StanfordResearch/SR844/tree.py
73
+ ./instruments/StanfordResearch/SR844/widget.py
74
+ ./instruments/StanfordResearch/SR844/worker.py
75
+ ./instruments/Tektronix/__init__.py
76
+ ./instruments/Tektronix/TDS1000/__init__.py
77
+ ./instruments/Tektronix/TDS1000/instrument.py
78
+ ./lib/Configure.py
79
+ ./lib/QAbstractInstrument.py
80
+ ./lib/QFakeInstrument.py
81
+ ./lib/QInstrumentTree.py
82
+ ./lib/QInstrumentWidget.py
83
+ ./lib/QInstrumentWorker.py
84
+ ./lib/QReconcileDialog.py
85
+ ./lib/QSerialInstrument.py
86
+ ./lib/QSerialInterface.py
87
+ ./lib/__init__.py
88
+ ./widgets/QJoystick.py
89
+ ./widgets/QJoystickPad.py
90
+ ./widgets/QLedWidget.py
91
+ ./widgets/QRotaryEncoder.py
92
+ ./widgets/QRotaryEncoderSpinBox.py
93
+ ./widgets/QRotaryEncoderSpinBox.ui
94
+ ./widgets/__init__.py
95
+ QInstrument.egg-info/PKG-INFO
96
+ QInstrument.egg-info/SOURCES.txt
97
+ QInstrument.egg-info/dependency_links.txt
98
+ QInstrument.egg-info/entry_points.txt
99
+ QInstrument.egg-info/requires.txt
100
+ QInstrument.egg-info/top_level.txt
101
+ instruments/__init__.py
102
+ instruments/IPGPhotonics/__init__.py
103
+ instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui
104
+ instruments/IPGPhotonics/IPGLaser/__init__.py
105
+ instruments/IPGPhotonics/IPGLaser/fake.py
106
+ instruments/IPGPhotonics/IPGLaser/instrument.py
107
+ instruments/IPGPhotonics/IPGLaser/tree.py
108
+ instruments/IPGPhotonics/IPGLaser/widget.py
109
+ instruments/Novanta/__init__.py
110
+ instruments/Novanta/Opus/OpusWidget.ui
111
+ instruments/Novanta/Opus/__init__.py
112
+ instruments/Novanta/Opus/fake.py
113
+ instruments/Novanta/Opus/instrument.py
114
+ instruments/Novanta/Opus/tree.py
115
+ instruments/Novanta/Opus/widget.py
116
+ instruments/Novanta/Opus1064/__init__.py
117
+ instruments/Novanta/Opus1064/fake.py
118
+ instruments/Novanta/Opus1064/instrument.py
119
+ instruments/Novanta/Opus1064/tree.py
120
+ instruments/Novanta/Opus1064/widget.py
121
+ instruments/Novanta/Opus532/__init__.py
122
+ instruments/Novanta/Opus532/fake.py
123
+ instruments/Novanta/Opus532/instrument.py
124
+ instruments/Novanta/Opus532/tree.py
125
+ instruments/Novanta/Opus532/widget.py
126
+ instruments/Novanta/Opus660/__init__.py
127
+ instruments/Novanta/Opus660/fake.py
128
+ instruments/Novanta/Opus660/instrument.py
129
+ instruments/Novanta/Opus660/tree.py
130
+ instruments/Novanta/Opus660/widget.py
131
+ instruments/PiezoDrive/__init__.py
132
+ instruments/PiezoDrive/PDUS210/PDUS210Widget.ui
133
+ instruments/PiezoDrive/PDUS210/__init__.py
134
+ instruments/PiezoDrive/PDUS210/fake.py
135
+ instruments/PiezoDrive/PDUS210/instrument.py
136
+ instruments/PiezoDrive/PDUS210/tree.py
137
+ instruments/PiezoDrive/PDUS210/widget.py
138
+ instruments/PriorScientific/__init__.py
139
+ instruments/PriorScientific/Proscan/ProscanWidget.ui
140
+ instruments/PriorScientific/Proscan/__init__.py
141
+ instruments/PriorScientific/Proscan/fake.py
142
+ instruments/PriorScientific/Proscan/instrument.py
143
+ instruments/PriorScientific/Proscan/tree.py
144
+ instruments/PriorScientific/Proscan/widget.py
145
+ instruments/StanfordResearch/__init__.py
146
+ instruments/StanfordResearch/DS345/DS345Widget.ui
147
+ instruments/StanfordResearch/DS345/__init__.py
148
+ instruments/StanfordResearch/DS345/fake.py
149
+ instruments/StanfordResearch/DS345/instrument.py
150
+ instruments/StanfordResearch/DS345/tree.py
151
+ instruments/StanfordResearch/DS345/widget.py
152
+ instruments/StanfordResearch/SR830/SR830Widget.ui
153
+ instruments/StanfordResearch/SR830/__init__.py
154
+ instruments/StanfordResearch/SR830/fake.py
155
+ instruments/StanfordResearch/SR830/instrument.py
156
+ instruments/StanfordResearch/SR830/tree.py
157
+ instruments/StanfordResearch/SR830/widget.py
158
+ instruments/StanfordResearch/SR830/worker.py
159
+ instruments/StanfordResearch/SR844/SR844Widget.ui
160
+ instruments/StanfordResearch/SR844/__init__.py
161
+ instruments/StanfordResearch/SR844/fake.py
162
+ instruments/StanfordResearch/SR844/instrument.py
163
+ instruments/StanfordResearch/SR844/tree.py
164
+ instruments/StanfordResearch/SR844/widget.py
165
+ instruments/StanfordResearch/SR844/worker.py
166
+ instruments/Tektronix/__init__.py
167
+ instruments/Tektronix/TDS1000/__init__.py
168
+ instruments/Tektronix/TDS1000/instrument.py
169
+ lib/Configure.py
170
+ lib/QAbstractInstrument.py
171
+ lib/QFakeInstrument.py
172
+ lib/QInstrumentTree.py
173
+ lib/QInstrumentWidget.py
174
+ lib/QInstrumentWorker.py
175
+ lib/QReconcileDialog.py
176
+ lib/QSerialInstrument.py
177
+ lib/QSerialInterface.py
178
+ lib/__init__.py
179
+ tests/test_Configure.py
180
+ tests/test_QAbstractInstrument.py
181
+ tests/test_QDS345.py
182
+ tests/test_QFakeInstrument.py
183
+ tests/test_QIPGLaser.py
184
+ tests/test_QInstrumentRack.py
185
+ tests/test_QInstrumentWidget.py
186
+ tests/test_QInstrumentWorker.py
187
+ tests/test_QLedWidget.py
188
+ tests/test_QOpus.py
189
+ tests/test_QPDUS210.py
190
+ tests/test_QProscan.py
191
+ tests/test_QRotaryEncoderSpinBox.py
192
+ tests/test_QSR830.py
193
+ tests/test_QSR830Worker.py
194
+ tests/test_QSR844.py
195
+ tests/test_QSerialInstrument.py
196
+ tests/test_QSerialInterface.py
197
+ widgets/QJoystick.py
198
+ widgets/QJoystickPad.py
199
+ widgets/QLedWidget.py
200
+ widgets/QRotaryEncoder.py
201
+ widgets/QRotaryEncoderSpinBox.py
202
+ widgets/QRotaryEncoderSpinBox.ui
203
+ widgets/__init__.py
@@ -0,0 +1,2 @@
1
+ [gui_scripts]
2
+ qinstrument = QInstrument.__main__:main
@@ -0,0 +1,14 @@
1
+ numpy>=1.20
2
+ qtpy>=2.0
3
+
4
+ [dev]
5
+ pytest>=7.0
6
+ pytest-qt>=4.0
7
+
8
+ [docs]
9
+ sphinx>=8.0
10
+ pydata-sphinx-theme>=0.16
11
+ sphinx-autodoc-typehints>=2.0
12
+
13
+ [tree]
14
+ pyqtgraph>=0.13