QInstrument 0.4.0__tar.gz → 2.1.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.
- {qinstrument-0.4.0 → qinstrument-2.1.0}/PKG-INFO +54 -21
- {qinstrument-0.4.0 → qinstrument-2.1.0}/QInstrument.egg-info/PKG-INFO +54 -21
- qinstrument-2.1.0/QInstrument.egg-info/SOURCES.txt +188 -0
- qinstrument-2.1.0/QInstrument.egg-info/entry_points.txt +2 -0
- qinstrument-2.1.0/QInstrument.egg-info/requires.txt +14 -0
- qinstrument-2.1.0/QInstrumentRack.py +581 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/README.md +44 -14
- qinstrument-2.1.0/__main__.py +49 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui +421 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/IPGLaser/fake.py +77 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/IPGLaser/instrument.py +363 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/IPGLaser/tree.py +14 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/IPGLaser/widget.py +133 -0
- qinstrument-2.1.0/instruments/IPGPhotonics/__init__.py +0 -0
- qinstrument-2.1.0/instruments/Novanta/Opus/OpusWidget.ui +235 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/Novanta}/Opus/__init__.py +1 -1
- qinstrument-2.1.0/instruments/Novanta/Opus/fake.py +49 -0
- qinstrument-2.1.0/instruments/Novanta/Opus/instrument.py +207 -0
- qinstrument-2.1.0/instruments/Novanta/Opus/tree.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus/widget.py +141 -0
- qinstrument-2.1.0/instruments/Novanta/Opus1064/__init__.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus1064/fake.py +9 -0
- qinstrument-2.1.0/instruments/Novanta/Opus1064/instrument.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus1064/tree.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus1064/widget.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus532/__init__.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus532/fake.py +9 -0
- qinstrument-2.1.0/instruments/Novanta/Opus532/instrument.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus532/tree.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus532/widget.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus660/__init__.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus660/fake.py +9 -0
- qinstrument-2.1.0/instruments/Novanta/Opus660/instrument.py +15 -0
- qinstrument-2.1.0/instruments/Novanta/Opus660/tree.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/Opus660/widget.py +14 -0
- qinstrument-2.1.0/instruments/Novanta/__init__.py +0 -0
- {qinstrument-0.4.0/instruments/Proscan → qinstrument-2.1.0/instruments/PiezoDrive/PDUS210}/__init__.py +1 -1
- qinstrument-2.1.0/instruments/PiezoDrive/PDUS210/fake.py +92 -0
- qinstrument-2.1.0/instruments/PiezoDrive/PDUS210/instrument.py +184 -0
- qinstrument-2.1.0/instruments/PiezoDrive/PDUS210/tree.py +14 -0
- qinstrument-2.1.0/instruments/PiezoDrive/PDUS210/widget.py +42 -0
- qinstrument-2.1.0/instruments/PiezoDrive/__init__.py +0 -0
- {qinstrument-0.4.0/instruments/PiezoDrive → qinstrument-2.1.0/instruments/PriorScientific/Proscan}/__init__.py +1 -1
- qinstrument-2.1.0/instruments/PriorScientific/Proscan/fake.py +123 -0
- qinstrument-2.1.0/instruments/PriorScientific/Proscan/instrument.py +304 -0
- qinstrument-2.1.0/instruments/PriorScientific/Proscan/tree.py +14 -0
- qinstrument-2.1.0/instruments/PriorScientific/Proscan/widget.py +60 -0
- qinstrument-2.1.0/instruments/PriorScientific/__init__.py +0 -0
- qinstrument-2.1.0/instruments/StanfordResearch/DS345/fake.py +42 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/DS345/instrument.py +3 -8
- qinstrument-2.1.0/instruments/StanfordResearch/DS345/tree.py +14 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/DS345/widget.py +5 -4
- qinstrument-2.1.0/instruments/StanfordResearch/SR830/fake.py +29 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR830/instrument.py +250 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR830/tree.py +14 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR830/widget.py +16 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/SR844/SR844Widget.ui +20 -2
- qinstrument-2.1.0/instruments/StanfordResearch/SR844/fake.py +33 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR844/instrument.py +238 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR844/tree.py +14 -0
- qinstrument-2.1.0/instruments/StanfordResearch/SR844/widget.py +20 -0
- qinstrument-2.1.0/instruments/StanfordResearch/__init__.py +0 -0
- qinstrument-2.1.0/instruments/Tektronix/__init__.py +0 -0
- qinstrument-2.1.0/lib/Configure.py +166 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QAbstractInstrument.py +44 -1
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QFakeInstrument.py +4 -6
- qinstrument-2.1.0/lib/QInstrumentTree.py +367 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QInstrumentWidget.py +139 -17
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QSerialInstrument.py +13 -2
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QSerialInterface.py +7 -6
- {qinstrument-0.4.0 → qinstrument-2.1.0}/pyproject.toml +29 -14
- qinstrument-2.1.0/tests/test_Configure.py +132 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/tests/test_QAbstractInstrument.py +29 -0
- qinstrument-2.1.0/tests/test_QInstrumentRack.py +234 -0
- qinstrument-2.1.0/tests/test_QInstrumentWidget.py +330 -0
- qinstrument-2.1.0/tests/test_QLedWidget.py +179 -0
- qinstrument-2.1.0/tests/test_QRotaryEncoderSpinBox.py +127 -0
- qinstrument-2.1.0/tests/test_QSerialInstrument.py +136 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/tests/test_QSerialInterface.py +2 -2
- qinstrument-2.1.0/widgets/QJoystick.py +339 -0
- qinstrument-2.1.0/widgets/QLedWidget.py +208 -0
- qinstrument-2.1.0/widgets/QRotaryEncoder.py +102 -0
- qinstrument-2.1.0/widgets/QRotaryEncoderSpinBox.py +185 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/widgets/QRotaryEncoderSpinBox.ui +12 -2
- qinstrument-0.4.0/QInstrument.egg-info/SOURCES.txt +0 -134
- qinstrument-0.4.0/QInstrument.egg-info/requires.txt +0 -14
- qinstrument-0.4.0/instruments/DS345/fake.py +0 -21
- qinstrument-0.4.0/instruments/IPGLaser/IPGLaserWidget.ui +0 -95
- qinstrument-0.4.0/instruments/IPGLaser/Ipglaser.py +0 -182
- qinstrument-0.4.0/instruments/IPGLaser/fake.py +0 -20
- qinstrument-0.4.0/instruments/IPGLaser/icons/amber-led-off.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/icons/amber-led-on.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/icons/green-led-off.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/icons/green-led-on.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/icons/red-led-off.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/icons/red-led-on.png +0 -0
- qinstrument-0.4.0/instruments/IPGLaser/instrument.py +0 -121
- qinstrument-0.4.0/instruments/IPGLaser/widget.py +0 -35
- qinstrument-0.4.0/instruments/Opus/OpusWidget.ui +0 -382
- qinstrument-0.4.0/instruments/Opus/instrument.py +0 -125
- qinstrument-0.4.0/instruments/Opus/widget.py +0 -89
- qinstrument-0.4.0/instruments/PiezoDrive/instrument.py +0 -128
- qinstrument-0.4.0/instruments/PiezoDrive/widget.py +0 -43
- qinstrument-0.4.0/instruments/Proscan/instrument.py +0 -265
- qinstrument-0.4.0/instruments/Proscan/widget.py +0 -65
- qinstrument-0.4.0/instruments/SR830/fake.py +0 -45
- qinstrument-0.4.0/instruments/SR830/instrument.py +0 -187
- qinstrument-0.4.0/instruments/SR830/widget.py +0 -19
- qinstrument-0.4.0/instruments/SR844/QFakeSR844.py +0 -8
- qinstrument-0.4.0/instruments/SR844/QSR844.py +0 -7
- qinstrument-0.4.0/instruments/SR844/QSR844Widget.py +0 -28
- qinstrument-0.4.0/instruments/SR844/fake.py +0 -45
- qinstrument-0.4.0/instruments/SR844/instrument.py +0 -208
- qinstrument-0.4.0/instruments/SR844/widget.py +0 -19
- qinstrument-0.4.0/lib/Configure.py +0 -130
- qinstrument-0.4.0/tests/test_QInstrumentWidget.py +0 -114
- qinstrument-0.4.0/widgets/QJoystick.py +0 -118
- qinstrument-0.4.0/widgets/QLedWidget.py +0 -158
- qinstrument-0.4.0/widgets/QRotaryEncoder.py +0 -86
- qinstrument-0.4.0/widgets/QRotaryEncoderSpinBox.py +0 -155
- {qinstrument-0.4.0 → qinstrument-2.1.0}/LICENSE.md +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/QInstrument.egg-info/dependency_links.txt +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/QInstrument.egg-info/top_level.txt +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/__init__.py +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/IPGPhotonics}/IPGLaser/__init__.py +0 -0
- {qinstrument-0.4.0/instruments/PiezoDrive → qinstrument-2.1.0/instruments/PiezoDrive/PDUS210}/PDUS210Widget.ui +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/PriorScientific}/Proscan/ProscanWidget.ui +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/DS345/DS345Widget.ui +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/DS345/__init__.py +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/SR830/SR830Widget.ui +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/SR830/__init__.py +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/StanfordResearch}/SR844/__init__.py +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/Tektronix}/TDS1000/__init__.py +0 -0
- {qinstrument-0.4.0/instruments → qinstrument-2.1.0/instruments/Tektronix}/TDS1000/instrument.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/instruments/__init__.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/QThreadedInstrumentWidget.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/__init__.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/lib/threadedInstrument.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/setup.cfg +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/tests/test_QFakeInstrument.py +0 -0
- {qinstrument-0.4.0 → qinstrument-2.1.0}/widgets/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: QInstrument
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.1.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,8 +23,11 @@ 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
|
-
Classifier: Development Status ::
|
|
30
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
28
31
|
Classifier: Intended Audience :: Science/Research
|
|
29
32
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
30
33
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -38,12 +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
|
|
41
|
-
Provides-Extra:
|
|
42
|
-
Requires-Dist:
|
|
44
|
+
Provides-Extra: tree
|
|
45
|
+
Requires-Dist: pyqtgraph>=0.13; extra == "tree"
|
|
43
46
|
Provides-Extra: docs
|
|
44
|
-
Requires-Dist: sphinx>=
|
|
45
|
-
Requires-Dist: sphinx-
|
|
46
|
-
Requires-Dist: sphinx-autodoc-typehints>=
|
|
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"
|
|
47
50
|
Provides-Extra: dev
|
|
48
51
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
49
52
|
Requires-Dist: pytest-qt>=4.0; extra == "dev"
|
|
@@ -51,6 +54,10 @@ Dynamic: license-file
|
|
|
51
54
|
|
|
52
55
|
# QInstrument
|
|
53
56
|
|
|
57
|
+
[](https://pypi.org/project/QInstrument/)
|
|
58
|
+
[](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml)
|
|
59
|
+
[](https://qinstrument.readthedocs.io/en/latest/)
|
|
60
|
+
[](https://doi.org/10.5281/zenodo.19424797)
|
|
54
61
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
55
62
|
|
|
56
63
|
A Qt-based framework for controlling scientific instruments over serial ports.
|
|
@@ -61,7 +68,7 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
61
68
|
## Instruments
|
|
62
69
|
|
|
63
70
|
### IPG Photonics
|
|
64
|
-
- **YLR Series**: Ytterbium
|
|
71
|
+
- **YLR Series**: Ytterbium fiber laser
|
|
65
72
|
|
|
66
73
|
### Laser Quantum
|
|
67
74
|
- **Opus**: Continuous-wave laser
|
|
@@ -70,10 +77,10 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
70
77
|
- **PDUS210**: Piezo transducer driver
|
|
71
78
|
|
|
72
79
|
### Prior Scientific
|
|
73
|
-
- **Proscan II/III**:
|
|
80
|
+
- **Proscan II/III**: Motorized microscope stage controller
|
|
74
81
|
|
|
75
82
|
### Stanford Research Systems
|
|
76
|
-
- **DS345**: 30 MHz
|
|
83
|
+
- **DS345**: 30 MHz Synthesized Function Generator
|
|
77
84
|
- **SR830**: 100 kHz Digital Lock-in Amplifier
|
|
78
85
|
- **SR844**: 200 MHz RF Lock-in Amplifier
|
|
79
86
|
|
|
@@ -82,28 +89,53 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
82
89
|
|
|
83
90
|
## Installation
|
|
84
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
|
+
|
|
85
101
|
```bash
|
|
86
102
|
git clone https://github.com/davidgrier/QInstrument
|
|
87
103
|
cd QInstrument
|
|
88
104
|
python -m venv .qi
|
|
89
105
|
source .qi/bin/activate
|
|
90
|
-
pip install -
|
|
106
|
+
pip install -e ".[dev]"
|
|
91
107
|
```
|
|
92
108
|
|
|
93
109
|
## Quick start
|
|
94
110
|
|
|
95
|
-
|
|
96
|
-
|
|
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:
|
|
97
129
|
|
|
98
130
|
```bash
|
|
99
131
|
python -m QInstrument.instruments.DS345.widget
|
|
100
132
|
```
|
|
101
133
|
|
|
102
134
|
This finds a connected DS345 and opens its control panel.
|
|
103
|
-
If no instrument is detected it falls back automatically to a
|
|
104
|
-
(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.
|
|
105
137
|
|
|
106
|
-
|
|
138
|
+
### Embedding a widget in your application
|
|
107
139
|
|
|
108
140
|
```python
|
|
109
141
|
from qtpy.QtWidgets import QApplication
|
|
@@ -115,11 +147,9 @@ widget.show()
|
|
|
115
147
|
app.exec()
|
|
116
148
|
```
|
|
117
149
|
|
|
118
|
-
<img src="docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
|
|
119
|
-
|
|
120
150
|
### Using a simulated instrument
|
|
121
151
|
|
|
122
|
-
When hardware is not available,
|
|
152
|
+
When hardware is not available, pass a fake device directly:
|
|
123
153
|
|
|
124
154
|
```python
|
|
125
155
|
from QInstrument.instruments.DS345 import QDS345Widget, QFakeDS345
|
|
@@ -134,7 +164,7 @@ app.exec()
|
|
|
134
164
|
|
|
135
165
|
```
|
|
136
166
|
QtCore.QObject
|
|
137
|
-
└── QAbstractInstrument # property/method registry, thread-safe get/set
|
|
167
|
+
└── QAbstractInstrument # property/method registry, thread-safe get/set
|
|
138
168
|
└── QSerialInstrument # holds QSerialInterface; adds open/find/identify
|
|
139
169
|
└── QXxxInstrument # concrete instrument
|
|
140
170
|
|
|
@@ -142,7 +172,10 @@ QtSerialPort.QSerialPort
|
|
|
142
172
|
└── QSerialInterface # raw serial I/O (owned by QSerialInstrument)
|
|
143
173
|
|
|
144
174
|
QWidget
|
|
145
|
-
|
|
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
|
|
146
179
|
```
|
|
147
180
|
|
|
148
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:
|
|
3
|
+
Version: 2.1.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,8 +23,11 @@ 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
|
-
Classifier: Development Status ::
|
|
30
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
28
31
|
Classifier: Intended Audience :: Science/Research
|
|
29
32
|
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
30
33
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -38,12 +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
|
|
41
|
-
Provides-Extra:
|
|
42
|
-
Requires-Dist:
|
|
44
|
+
Provides-Extra: tree
|
|
45
|
+
Requires-Dist: pyqtgraph>=0.13; extra == "tree"
|
|
43
46
|
Provides-Extra: docs
|
|
44
|
-
Requires-Dist: sphinx>=
|
|
45
|
-
Requires-Dist: sphinx-
|
|
46
|
-
Requires-Dist: sphinx-autodoc-typehints>=
|
|
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"
|
|
47
50
|
Provides-Extra: dev
|
|
48
51
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
49
52
|
Requires-Dist: pytest-qt>=4.0; extra == "dev"
|
|
@@ -51,6 +54,10 @@ Dynamic: license-file
|
|
|
51
54
|
|
|
52
55
|
# QInstrument
|
|
53
56
|
|
|
57
|
+
[](https://pypi.org/project/QInstrument/)
|
|
58
|
+
[](https://github.com/davidgrier/QInstrument/actions/workflows/tests.yml)
|
|
59
|
+
[](https://qinstrument.readthedocs.io/en/latest/)
|
|
60
|
+
[](https://doi.org/10.5281/zenodo.19424797)
|
|
54
61
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
55
62
|
|
|
56
63
|
A Qt-based framework for controlling scientific instruments over serial ports.
|
|
@@ -61,7 +68,7 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
61
68
|
## Instruments
|
|
62
69
|
|
|
63
70
|
### IPG Photonics
|
|
64
|
-
- **YLR Series**: Ytterbium
|
|
71
|
+
- **YLR Series**: Ytterbium fiber laser
|
|
65
72
|
|
|
66
73
|
### Laser Quantum
|
|
67
74
|
- **Opus**: Continuous-wave laser
|
|
@@ -70,10 +77,10 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
70
77
|
- **PDUS210**: Piezo transducer driver
|
|
71
78
|
|
|
72
79
|
### Prior Scientific
|
|
73
|
-
- **Proscan II/III**:
|
|
80
|
+
- **Proscan II/III**: Motorized microscope stage controller
|
|
74
81
|
|
|
75
82
|
### Stanford Research Systems
|
|
76
|
-
- **DS345**: 30 MHz
|
|
83
|
+
- **DS345**: 30 MHz Synthesized Function Generator
|
|
77
84
|
- **SR830**: 100 kHz Digital Lock-in Amplifier
|
|
78
85
|
- **SR844**: 200 MHz RF Lock-in Amplifier
|
|
79
86
|
|
|
@@ -82,28 +89,53 @@ Any Qt binding (PyQt5, PyQt6, PySide2, PySide6) is supported via `qtpy`.
|
|
|
82
89
|
|
|
83
90
|
## Installation
|
|
84
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
|
+
|
|
85
101
|
```bash
|
|
86
102
|
git clone https://github.com/davidgrier/QInstrument
|
|
87
103
|
cd QInstrument
|
|
88
104
|
python -m venv .qi
|
|
89
105
|
source .qi/bin/activate
|
|
90
|
-
pip install -
|
|
106
|
+
pip install -e ".[dev]"
|
|
91
107
|
```
|
|
92
108
|
|
|
93
109
|
## Quick start
|
|
94
110
|
|
|
95
|
-
|
|
96
|
-
|
|
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:
|
|
97
129
|
|
|
98
130
|
```bash
|
|
99
131
|
python -m QInstrument.instruments.DS345.widget
|
|
100
132
|
```
|
|
101
133
|
|
|
102
134
|
This finds a connected DS345 and opens its control panel.
|
|
103
|
-
If no instrument is detected it falls back automatically to a
|
|
104
|
-
(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.
|
|
105
137
|
|
|
106
|
-
|
|
138
|
+
### Embedding a widget in your application
|
|
107
139
|
|
|
108
140
|
```python
|
|
109
141
|
from qtpy.QtWidgets import QApplication
|
|
@@ -115,11 +147,9 @@ widget.show()
|
|
|
115
147
|
app.exec()
|
|
116
148
|
```
|
|
117
149
|
|
|
118
|
-
<img src="docs/QDS345Widget.png" width="50%" alt="DS345 Widget">
|
|
119
|
-
|
|
120
150
|
### Using a simulated instrument
|
|
121
151
|
|
|
122
|
-
When hardware is not available,
|
|
152
|
+
When hardware is not available, pass a fake device directly:
|
|
123
153
|
|
|
124
154
|
```python
|
|
125
155
|
from QInstrument.instruments.DS345 import QDS345Widget, QFakeDS345
|
|
@@ -134,7 +164,7 @@ app.exec()
|
|
|
134
164
|
|
|
135
165
|
```
|
|
136
166
|
QtCore.QObject
|
|
137
|
-
└── QAbstractInstrument # property/method registry, thread-safe get/set
|
|
167
|
+
└── QAbstractInstrument # property/method registry, thread-safe get/set
|
|
138
168
|
└── QSerialInstrument # holds QSerialInterface; adds open/find/identify
|
|
139
169
|
└── QXxxInstrument # concrete instrument
|
|
140
170
|
|
|
@@ -142,7 +172,10 @@ QtSerialPort.QSerialPort
|
|
|
142
172
|
└── QSerialInterface # raw serial I/O (owned by QSerialInstrument)
|
|
143
173
|
|
|
144
174
|
QWidget
|
|
145
|
-
|
|
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
|
|
146
179
|
```
|
|
147
180
|
|
|
148
181
|
Each instrument lives in `instruments/<Name>/` with three files:
|
|
@@ -0,0 +1,188 @@
|
|
|
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/SR844/SR844Widget.ui
|
|
68
|
+
./instruments/StanfordResearch/SR844/__init__.py
|
|
69
|
+
./instruments/StanfordResearch/SR844/fake.py
|
|
70
|
+
./instruments/StanfordResearch/SR844/instrument.py
|
|
71
|
+
./instruments/StanfordResearch/SR844/tree.py
|
|
72
|
+
./instruments/StanfordResearch/SR844/widget.py
|
|
73
|
+
./instruments/Tektronix/__init__.py
|
|
74
|
+
./instruments/Tektronix/TDS1000/__init__.py
|
|
75
|
+
./instruments/Tektronix/TDS1000/instrument.py
|
|
76
|
+
./lib/Configure.py
|
|
77
|
+
./lib/QAbstractInstrument.py
|
|
78
|
+
./lib/QFakeInstrument.py
|
|
79
|
+
./lib/QInstrumentTree.py
|
|
80
|
+
./lib/QInstrumentWidget.py
|
|
81
|
+
./lib/QSerialInstrument.py
|
|
82
|
+
./lib/QSerialInterface.py
|
|
83
|
+
./lib/QThreadedInstrumentWidget.py
|
|
84
|
+
./lib/__init__.py
|
|
85
|
+
./lib/threadedInstrument.py
|
|
86
|
+
./widgets/QJoystick.py
|
|
87
|
+
./widgets/QLedWidget.py
|
|
88
|
+
./widgets/QRotaryEncoder.py
|
|
89
|
+
./widgets/QRotaryEncoderSpinBox.py
|
|
90
|
+
./widgets/QRotaryEncoderSpinBox.ui
|
|
91
|
+
./widgets/__init__.py
|
|
92
|
+
QInstrument.egg-info/PKG-INFO
|
|
93
|
+
QInstrument.egg-info/SOURCES.txt
|
|
94
|
+
QInstrument.egg-info/dependency_links.txt
|
|
95
|
+
QInstrument.egg-info/entry_points.txt
|
|
96
|
+
QInstrument.egg-info/requires.txt
|
|
97
|
+
QInstrument.egg-info/top_level.txt
|
|
98
|
+
instruments/__init__.py
|
|
99
|
+
instruments/IPGPhotonics/__init__.py
|
|
100
|
+
instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui
|
|
101
|
+
instruments/IPGPhotonics/IPGLaser/__init__.py
|
|
102
|
+
instruments/IPGPhotonics/IPGLaser/fake.py
|
|
103
|
+
instruments/IPGPhotonics/IPGLaser/instrument.py
|
|
104
|
+
instruments/IPGPhotonics/IPGLaser/tree.py
|
|
105
|
+
instruments/IPGPhotonics/IPGLaser/widget.py
|
|
106
|
+
instruments/Novanta/__init__.py
|
|
107
|
+
instruments/Novanta/Opus/OpusWidget.ui
|
|
108
|
+
instruments/Novanta/Opus/__init__.py
|
|
109
|
+
instruments/Novanta/Opus/fake.py
|
|
110
|
+
instruments/Novanta/Opus/instrument.py
|
|
111
|
+
instruments/Novanta/Opus/tree.py
|
|
112
|
+
instruments/Novanta/Opus/widget.py
|
|
113
|
+
instruments/Novanta/Opus1064/__init__.py
|
|
114
|
+
instruments/Novanta/Opus1064/fake.py
|
|
115
|
+
instruments/Novanta/Opus1064/instrument.py
|
|
116
|
+
instruments/Novanta/Opus1064/tree.py
|
|
117
|
+
instruments/Novanta/Opus1064/widget.py
|
|
118
|
+
instruments/Novanta/Opus532/__init__.py
|
|
119
|
+
instruments/Novanta/Opus532/fake.py
|
|
120
|
+
instruments/Novanta/Opus532/instrument.py
|
|
121
|
+
instruments/Novanta/Opus532/tree.py
|
|
122
|
+
instruments/Novanta/Opus532/widget.py
|
|
123
|
+
instruments/Novanta/Opus660/__init__.py
|
|
124
|
+
instruments/Novanta/Opus660/fake.py
|
|
125
|
+
instruments/Novanta/Opus660/instrument.py
|
|
126
|
+
instruments/Novanta/Opus660/tree.py
|
|
127
|
+
instruments/Novanta/Opus660/widget.py
|
|
128
|
+
instruments/PiezoDrive/__init__.py
|
|
129
|
+
instruments/PiezoDrive/PDUS210/PDUS210Widget.ui
|
|
130
|
+
instruments/PiezoDrive/PDUS210/__init__.py
|
|
131
|
+
instruments/PiezoDrive/PDUS210/fake.py
|
|
132
|
+
instruments/PiezoDrive/PDUS210/instrument.py
|
|
133
|
+
instruments/PiezoDrive/PDUS210/tree.py
|
|
134
|
+
instruments/PiezoDrive/PDUS210/widget.py
|
|
135
|
+
instruments/PriorScientific/__init__.py
|
|
136
|
+
instruments/PriorScientific/Proscan/ProscanWidget.ui
|
|
137
|
+
instruments/PriorScientific/Proscan/__init__.py
|
|
138
|
+
instruments/PriorScientific/Proscan/fake.py
|
|
139
|
+
instruments/PriorScientific/Proscan/instrument.py
|
|
140
|
+
instruments/PriorScientific/Proscan/tree.py
|
|
141
|
+
instruments/PriorScientific/Proscan/widget.py
|
|
142
|
+
instruments/StanfordResearch/__init__.py
|
|
143
|
+
instruments/StanfordResearch/DS345/DS345Widget.ui
|
|
144
|
+
instruments/StanfordResearch/DS345/__init__.py
|
|
145
|
+
instruments/StanfordResearch/DS345/fake.py
|
|
146
|
+
instruments/StanfordResearch/DS345/instrument.py
|
|
147
|
+
instruments/StanfordResearch/DS345/tree.py
|
|
148
|
+
instruments/StanfordResearch/DS345/widget.py
|
|
149
|
+
instruments/StanfordResearch/SR830/SR830Widget.ui
|
|
150
|
+
instruments/StanfordResearch/SR830/__init__.py
|
|
151
|
+
instruments/StanfordResearch/SR830/fake.py
|
|
152
|
+
instruments/StanfordResearch/SR830/instrument.py
|
|
153
|
+
instruments/StanfordResearch/SR830/tree.py
|
|
154
|
+
instruments/StanfordResearch/SR830/widget.py
|
|
155
|
+
instruments/StanfordResearch/SR844/SR844Widget.ui
|
|
156
|
+
instruments/StanfordResearch/SR844/__init__.py
|
|
157
|
+
instruments/StanfordResearch/SR844/fake.py
|
|
158
|
+
instruments/StanfordResearch/SR844/instrument.py
|
|
159
|
+
instruments/StanfordResearch/SR844/tree.py
|
|
160
|
+
instruments/StanfordResearch/SR844/widget.py
|
|
161
|
+
instruments/Tektronix/__init__.py
|
|
162
|
+
instruments/Tektronix/TDS1000/__init__.py
|
|
163
|
+
instruments/Tektronix/TDS1000/instrument.py
|
|
164
|
+
lib/Configure.py
|
|
165
|
+
lib/QAbstractInstrument.py
|
|
166
|
+
lib/QFakeInstrument.py
|
|
167
|
+
lib/QInstrumentTree.py
|
|
168
|
+
lib/QInstrumentWidget.py
|
|
169
|
+
lib/QSerialInstrument.py
|
|
170
|
+
lib/QSerialInterface.py
|
|
171
|
+
lib/QThreadedInstrumentWidget.py
|
|
172
|
+
lib/__init__.py
|
|
173
|
+
lib/threadedInstrument.py
|
|
174
|
+
tests/test_Configure.py
|
|
175
|
+
tests/test_QAbstractInstrument.py
|
|
176
|
+
tests/test_QFakeInstrument.py
|
|
177
|
+
tests/test_QInstrumentRack.py
|
|
178
|
+
tests/test_QInstrumentWidget.py
|
|
179
|
+
tests/test_QLedWidget.py
|
|
180
|
+
tests/test_QRotaryEncoderSpinBox.py
|
|
181
|
+
tests/test_QSerialInstrument.py
|
|
182
|
+
tests/test_QSerialInterface.py
|
|
183
|
+
widgets/QJoystick.py
|
|
184
|
+
widgets/QLedWidget.py
|
|
185
|
+
widgets/QRotaryEncoder.py
|
|
186
|
+
widgets/QRotaryEncoderSpinBox.py
|
|
187
|
+
widgets/QRotaryEncoderSpinBox.ui
|
|
188
|
+
widgets/__init__.py
|