QInstrument 2.1.0__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 (121) hide show
  1. {qinstrument-2.1.0 → qinstrument-2.2.0}/PKG-INFO +1 -1
  2. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/PKG-INFO +1 -1
  3. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/SOURCES.txt +19 -4
  4. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/fake.py +3 -0
  5. qinstrument-2.2.0/instruments/Novanta/Opus/OpusWidget.ui +231 -0
  6. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus/fake.py +9 -0
  7. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus/instrument.py +37 -6
  8. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus/widget.py +6 -9
  9. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/Proscan/ProscanWidget.ui +76 -29
  10. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/Proscan/fake.py +30 -2
  11. qinstrument-2.2.0/instruments/PriorScientific/Proscan/instrument.py +569 -0
  12. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/Proscan/widget.py +51 -6
  13. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/fake.py +3 -0
  14. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/__init__.py +1 -1
  15. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/fake.py +3 -0
  16. qinstrument-2.2.0/instruments/StanfordResearch/SR830/worker.py +38 -0
  17. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/__init__.py +1 -1
  18. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/fake.py +3 -0
  19. qinstrument-2.2.0/instruments/StanfordResearch/SR844/worker.py +38 -0
  20. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/Configure.py +24 -0
  21. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QAbstractInstrument.py +16 -7
  22. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QFakeInstrument.py +6 -1
  23. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QInstrumentWidget.py +71 -10
  24. qinstrument-2.2.0/lib/QInstrumentWorker.py +111 -0
  25. qinstrument-2.2.0/lib/QReconcileDialog.py +99 -0
  26. {qinstrument-2.1.0 → qinstrument-2.2.0}/pyproject.toml +1 -1
  27. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_Configure.py +30 -0
  28. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QAbstractInstrument.py +23 -0
  29. qinstrument-2.2.0/tests/test_QDS345.py +79 -0
  30. qinstrument-2.2.0/tests/test_QIPGLaser.py +164 -0
  31. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QInstrumentWidget.py +188 -1
  32. qinstrument-2.2.0/tests/test_QInstrumentWorker.py +162 -0
  33. qinstrument-2.2.0/tests/test_QOpus.py +138 -0
  34. qinstrument-2.2.0/tests/test_QPDUS210.py +121 -0
  35. qinstrument-2.2.0/tests/test_QProscan.py +175 -0
  36. qinstrument-2.2.0/tests/test_QSR830.py +73 -0
  37. qinstrument-2.2.0/tests/test_QSR830Worker.py +105 -0
  38. qinstrument-2.2.0/tests/test_QSR844.py +72 -0
  39. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/QJoystick.py +70 -23
  40. qinstrument-2.2.0/widgets/QJoystickPad.py +406 -0
  41. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/QLedWidget.py +46 -19
  42. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/__init__.py +1 -0
  43. qinstrument-2.1.0/instruments/Novanta/Opus/OpusWidget.ui +0 -235
  44. qinstrument-2.1.0/instruments/PriorScientific/Proscan/instrument.py +0 -304
  45. qinstrument-2.1.0/lib/QThreadedInstrumentWidget.py +0 -20
  46. qinstrument-2.1.0/lib/threadedInstrument.py +0 -24
  47. {qinstrument-2.1.0 → qinstrument-2.2.0}/LICENSE.md +0 -0
  48. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/dependency_links.txt +0 -0
  49. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/entry_points.txt +0 -0
  50. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/requires.txt +0 -0
  51. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrument.egg-info/top_level.txt +0 -0
  52. {qinstrument-2.1.0 → qinstrument-2.2.0}/QInstrumentRack.py +0 -0
  53. {qinstrument-2.1.0 → qinstrument-2.2.0}/README.md +0 -0
  54. {qinstrument-2.1.0 → qinstrument-2.2.0}/__init__.py +0 -0
  55. {qinstrument-2.1.0 → qinstrument-2.2.0}/__main__.py +0 -0
  56. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/IPGLaserWidget.ui +0 -0
  57. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/__init__.py +0 -0
  58. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/instrument.py +0 -0
  59. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/tree.py +0 -0
  60. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/IPGLaser/widget.py +0 -0
  61. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/IPGPhotonics/__init__.py +0 -0
  62. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus/__init__.py +0 -0
  63. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus/tree.py +0 -0
  64. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus1064/__init__.py +0 -0
  65. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus1064/fake.py +0 -0
  66. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus1064/instrument.py +0 -0
  67. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus1064/tree.py +0 -0
  68. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus1064/widget.py +0 -0
  69. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus532/__init__.py +0 -0
  70. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus532/fake.py +0 -0
  71. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus532/instrument.py +0 -0
  72. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus532/tree.py +0 -0
  73. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus532/widget.py +0 -0
  74. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus660/__init__.py +0 -0
  75. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus660/fake.py +0 -0
  76. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus660/instrument.py +0 -0
  77. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus660/tree.py +0 -0
  78. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/Opus660/widget.py +0 -0
  79. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Novanta/__init__.py +0 -0
  80. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/PDUS210Widget.ui +0 -0
  81. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/__init__.py +0 -0
  82. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/fake.py +0 -0
  83. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/instrument.py +0 -0
  84. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/tree.py +0 -0
  85. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/PDUS210/widget.py +0 -0
  86. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PiezoDrive/__init__.py +0 -0
  87. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/Proscan/__init__.py +0 -0
  88. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/Proscan/tree.py +0 -0
  89. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/PriorScientific/__init__.py +0 -0
  90. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/DS345Widget.ui +0 -0
  91. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/__init__.py +0 -0
  92. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/instrument.py +0 -0
  93. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/tree.py +0 -0
  94. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/DS345/widget.py +0 -0
  95. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/SR830Widget.ui +0 -0
  96. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/instrument.py +0 -0
  97. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/tree.py +0 -0
  98. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR830/widget.py +0 -0
  99. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/SR844Widget.ui +0 -0
  100. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/instrument.py +0 -0
  101. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/tree.py +0 -0
  102. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/SR844/widget.py +0 -0
  103. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/StanfordResearch/__init__.py +0 -0
  104. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Tektronix/TDS1000/__init__.py +0 -0
  105. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Tektronix/TDS1000/instrument.py +0 -0
  106. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/Tektronix/__init__.py +0 -0
  107. {qinstrument-2.1.0 → qinstrument-2.2.0}/instruments/__init__.py +0 -0
  108. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QInstrumentTree.py +0 -0
  109. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QSerialInstrument.py +0 -0
  110. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/QSerialInterface.py +0 -0
  111. {qinstrument-2.1.0 → qinstrument-2.2.0}/lib/__init__.py +0 -0
  112. {qinstrument-2.1.0 → qinstrument-2.2.0}/setup.cfg +0 -0
  113. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QFakeInstrument.py +0 -0
  114. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QInstrumentRack.py +0 -0
  115. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QLedWidget.py +0 -0
  116. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QRotaryEncoderSpinBox.py +0 -0
  117. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QSerialInstrument.py +0 -0
  118. {qinstrument-2.1.0 → qinstrument-2.2.0}/tests/test_QSerialInterface.py +0 -0
  119. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/QRotaryEncoder.py +0 -0
  120. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/QRotaryEncoderSpinBox.py +0 -0
  121. {qinstrument-2.1.0 → qinstrument-2.2.0}/widgets/QRotaryEncoderSpinBox.ui +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QInstrument
3
- Version: 2.1.0
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QInstrument
3
- Version: 2.1.0
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
@@ -64,12 +64,14 @@ pyproject.toml
64
64
  ./instruments/StanfordResearch/SR830/instrument.py
65
65
  ./instruments/StanfordResearch/SR830/tree.py
66
66
  ./instruments/StanfordResearch/SR830/widget.py
67
+ ./instruments/StanfordResearch/SR830/worker.py
67
68
  ./instruments/StanfordResearch/SR844/SR844Widget.ui
68
69
  ./instruments/StanfordResearch/SR844/__init__.py
69
70
  ./instruments/StanfordResearch/SR844/fake.py
70
71
  ./instruments/StanfordResearch/SR844/instrument.py
71
72
  ./instruments/StanfordResearch/SR844/tree.py
72
73
  ./instruments/StanfordResearch/SR844/widget.py
74
+ ./instruments/StanfordResearch/SR844/worker.py
73
75
  ./instruments/Tektronix/__init__.py
74
76
  ./instruments/Tektronix/TDS1000/__init__.py
75
77
  ./instruments/Tektronix/TDS1000/instrument.py
@@ -78,12 +80,13 @@ pyproject.toml
78
80
  ./lib/QFakeInstrument.py
79
81
  ./lib/QInstrumentTree.py
80
82
  ./lib/QInstrumentWidget.py
83
+ ./lib/QInstrumentWorker.py
84
+ ./lib/QReconcileDialog.py
81
85
  ./lib/QSerialInstrument.py
82
86
  ./lib/QSerialInterface.py
83
- ./lib/QThreadedInstrumentWidget.py
84
87
  ./lib/__init__.py
85
- ./lib/threadedInstrument.py
86
88
  ./widgets/QJoystick.py
89
+ ./widgets/QJoystickPad.py
87
90
  ./widgets/QLedWidget.py
88
91
  ./widgets/QRotaryEncoder.py
89
92
  ./widgets/QRotaryEncoderSpinBox.py
@@ -152,12 +155,14 @@ instruments/StanfordResearch/SR830/fake.py
152
155
  instruments/StanfordResearch/SR830/instrument.py
153
156
  instruments/StanfordResearch/SR830/tree.py
154
157
  instruments/StanfordResearch/SR830/widget.py
158
+ instruments/StanfordResearch/SR830/worker.py
155
159
  instruments/StanfordResearch/SR844/SR844Widget.ui
156
160
  instruments/StanfordResearch/SR844/__init__.py
157
161
  instruments/StanfordResearch/SR844/fake.py
158
162
  instruments/StanfordResearch/SR844/instrument.py
159
163
  instruments/StanfordResearch/SR844/tree.py
160
164
  instruments/StanfordResearch/SR844/widget.py
165
+ instruments/StanfordResearch/SR844/worker.py
161
166
  instruments/Tektronix/__init__.py
162
167
  instruments/Tektronix/TDS1000/__init__.py
163
168
  instruments/Tektronix/TDS1000/instrument.py
@@ -166,21 +171,31 @@ lib/QAbstractInstrument.py
166
171
  lib/QFakeInstrument.py
167
172
  lib/QInstrumentTree.py
168
173
  lib/QInstrumentWidget.py
174
+ lib/QInstrumentWorker.py
175
+ lib/QReconcileDialog.py
169
176
  lib/QSerialInstrument.py
170
177
  lib/QSerialInterface.py
171
- lib/QThreadedInstrumentWidget.py
172
178
  lib/__init__.py
173
- lib/threadedInstrument.py
174
179
  tests/test_Configure.py
175
180
  tests/test_QAbstractInstrument.py
181
+ tests/test_QDS345.py
176
182
  tests/test_QFakeInstrument.py
183
+ tests/test_QIPGLaser.py
177
184
  tests/test_QInstrumentRack.py
178
185
  tests/test_QInstrumentWidget.py
186
+ tests/test_QInstrumentWorker.py
179
187
  tests/test_QLedWidget.py
188
+ tests/test_QOpus.py
189
+ tests/test_QPDUS210.py
190
+ tests/test_QProscan.py
180
191
  tests/test_QRotaryEncoderSpinBox.py
192
+ tests/test_QSR830.py
193
+ tests/test_QSR830Worker.py
194
+ tests/test_QSR844.py
181
195
  tests/test_QSerialInstrument.py
182
196
  tests/test_QSerialInterface.py
183
197
  widgets/QJoystick.py
198
+ widgets/QJoystickPad.py
184
199
  widgets/QLedWidget.py
185
200
  widgets/QRotaryEncoder.py
186
201
  widgets/QRotaryEncoderSpinBox.py
@@ -73,5 +73,8 @@ class QFakeIPGLaser(QFakeInstrument, QIPGLaser):
73
73
  getter=lambda: self._store.get('temperature', 25.))
74
74
  self.identification = 'Fake IPG Fiber Laser'
75
75
 
76
+ def identify(self) -> bool:
77
+ return True
78
+
76
79
 
77
80
  __all__ = ['QFakeIPGLaser']
@@ -0,0 +1,231 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ui version="4.0">
3
+ <class>OpusWidget</class>
4
+ <widget class="QWidget" name="OpusWidget">
5
+ <property name="windowTitle">
6
+ <string>Opus DPSS Laser</string>
7
+ </property>
8
+ <layout class="QVBoxLayout" name="outerLayout">
9
+ <property name="spacing">
10
+ <number>2</number>
11
+ </property>
12
+ <property name="leftMargin">
13
+ <number>2</number>
14
+ </property>
15
+ <property name="topMargin">
16
+ <number>1</number>
17
+ </property>
18
+ <property name="rightMargin">
19
+ <number>2</number>
20
+ </property>
21
+ <property name="bottomMargin">
22
+ <number>1</number>
23
+ </property>
24
+ <item>
25
+ <widget class="QGroupBox" name="groupBox">
26
+ <property name="title">
27
+ <string>Opus DPSS Laser</string>
28
+ </property>
29
+ <layout class="QHBoxLayout" name="innerLayout">
30
+ <property name="spacing">
31
+ <number>8</number>
32
+ </property>
33
+ <property name="leftMargin">
34
+ <number>6</number>
35
+ </property>
36
+ <property name="topMargin">
37
+ <number>4</number>
38
+ </property>
39
+ <property name="rightMargin">
40
+ <number>6</number>
41
+ </property>
42
+ <property name="bottomMargin">
43
+ <number>6</number>
44
+ </property>
45
+ <!-- Left: rotary encoder for power setpoint -->
46
+ <item>
47
+ <widget class="QRotaryEncoderSpinBox" name="power_setpoint">
48
+ <property name="minimumSize">
49
+ <size>
50
+ <width>100</width>
51
+ <height>100</height>
52
+ </size>
53
+ </property>
54
+ </widget>
55
+ </item>
56
+ <!-- Right: status displays (top) and emission control (bottom) -->
57
+ <item>
58
+ <layout class="QVBoxLayout" name="rightLayout">
59
+ <property name="spacing">
60
+ <number>4</number>
61
+ </property>
62
+ <!-- Framed display group: Power and Current readings -->
63
+ <item>
64
+ <widget class="QFrame" name="displayFrame">
65
+ <property name="frameShape">
66
+ <enum>QFrame::StyledPanel</enum>
67
+ </property>
68
+ <property name="frameShadow">
69
+ <enum>QFrame::Sunken</enum>
70
+ </property>
71
+ <layout class="QGridLayout" name="formLayout">
72
+ <property name="horizontalSpacing">
73
+ <number>6</number>
74
+ </property>
75
+ <property name="verticalSpacing">
76
+ <number>4</number>
77
+ </property>
78
+ <property name="leftMargin">
79
+ <number>4</number>
80
+ </property>
81
+ <property name="topMargin">
82
+ <number>4</number>
83
+ </property>
84
+ <property name="rightMargin">
85
+ <number>4</number>
86
+ </property>
87
+ <property name="bottomMargin">
88
+ <number>4</number>
89
+ </property>
90
+ <!-- Power row -->
91
+ <item row="0" column="0">
92
+ <widget class="QLabel" name="powerLabel">
93
+ <property name="text">
94
+ <string>Power [W]</string>
95
+ </property>
96
+ <property name="alignment">
97
+ <set>Qt::AlignRight|Qt::AlignVCenter</set>
98
+ </property>
99
+ </widget>
100
+ </item>
101
+ <item row="0" column="1">
102
+ <widget class="QDoubleSpinBox" name="power_display">
103
+ <property name="maximumSize">
104
+ <size>
105
+ <width>80</width>
106
+ <height>16777215</height>
107
+ </size>
108
+ </property>
109
+ <property name="readOnly">
110
+ <bool>true</bool>
111
+ </property>
112
+ <property name="buttonSymbols">
113
+ <enum>QAbstractSpinBox::NoButtons</enum>
114
+ </property>
115
+ <property name="alignment">
116
+ <set>Qt::AlignRight|Qt::AlignVCenter</set>
117
+ </property>
118
+ <property name="decimals">
119
+ <number>3</number>
120
+ </property>
121
+ <property name="maximum">
122
+ <double>9.999</double>
123
+ </property>
124
+ </widget>
125
+ </item>
126
+ <!-- Current row -->
127
+ <item row="1" column="0">
128
+ <widget class="QLabel" name="currentLabel">
129
+ <property name="text">
130
+ <string>Current [%]</string>
131
+ </property>
132
+ <property name="alignment">
133
+ <set>Qt::AlignRight|Qt::AlignVCenter</set>
134
+ </property>
135
+ </widget>
136
+ </item>
137
+ <item row="1" column="1">
138
+ <widget class="QDoubleSpinBox" name="current_display">
139
+ <property name="maximumSize">
140
+ <size>
141
+ <width>80</width>
142
+ <height>16777215</height>
143
+ </size>
144
+ </property>
145
+ <property name="readOnly">
146
+ <bool>true</bool>
147
+ </property>
148
+ <property name="buttonSymbols">
149
+ <enum>QAbstractSpinBox::NoButtons</enum>
150
+ </property>
151
+ <property name="alignment">
152
+ <set>Qt::AlignRight|Qt::AlignVCenter</set>
153
+ </property>
154
+ <property name="decimals">
155
+ <number>1</number>
156
+ </property>
157
+ <property name="maximum">
158
+ <double>100.0</double>
159
+ </property>
160
+ </widget>
161
+ </item>
162
+ </layout>
163
+ </widget>
164
+ </item>
165
+ <!-- Spacer pushes emission control to the bottom -->
166
+ <item>
167
+ <spacer name="middleSpacer">
168
+ <property name="orientation">
169
+ <enum>Qt::Vertical</enum>
170
+ </property>
171
+ <property name="sizeHint" stdset="0">
172
+ <size>
173
+ <width>0</width>
174
+ <height>0</height>
175
+ </size>
176
+ </property>
177
+ </spacer>
178
+ </item>
179
+ <!-- Emission control: LED indicator + toggle button -->
180
+ <item>
181
+ <layout class="QHBoxLayout" name="emissionLayout">
182
+ <property name="spacing">
183
+ <number>4</number>
184
+ </property>
185
+ <item>
186
+ <widget class="QLedWidget" name="emission">
187
+ <property name="minimumSize">
188
+ <size>
189
+ <width>20</width>
190
+ <height>20</height>
191
+ </size>
192
+ </property>
193
+ <property name="maximumSize">
194
+ <size>
195
+ <width>24</width>
196
+ <height>24</height>
197
+ </size>
198
+ </property>
199
+ </widget>
200
+ </item>
201
+ <item>
202
+ <widget class="QPushButton" name="emission_button">
203
+ <property name="text">
204
+ <string>Emission</string>
205
+ </property>
206
+ </widget>
207
+ </item>
208
+ </layout>
209
+ </item>
210
+ </layout>
211
+ </item>
212
+ </layout>
213
+ </widget>
214
+ </item>
215
+ </layout>
216
+ </widget>
217
+ <customwidgets>
218
+ <customwidget>
219
+ <class>QLedWidget</class>
220
+ <extends>QWidget</extends>
221
+ <header>QInstrument.widgets.QLedWidget</header>
222
+ </customwidget>
223
+ <customwidget>
224
+ <class>QRotaryEncoderSpinBox</class>
225
+ <extends>QWidget</extends>
226
+ <header>QInstrument.widgets.QRotaryEncoderSpinBox</header>
227
+ </customwidget>
228
+ </customwidgets>
229
+ <resources/>
230
+ <connections/>
231
+ </ui>
@@ -37,6 +37,12 @@ class QFakeOpus(QFakeInstrument, QOpus):
37
37
  'emission', ptype=bool,
38
38
  getter=lambda: self._store.get('emission', False),
39
39
  setter=lambda v: self._store.__setitem__('emission', bool(v)))
40
+ self.registerProperty(
41
+ 'status', ptype=bool, setter=None,
42
+ getter=lambda: self._store.get('status', True))
43
+ self.registerProperty(
44
+ 'version', ptype=str, setter=None,
45
+ getter=lambda: self._store.get('version', 'FAKE'))
40
46
  self.registerProperty(
41
47
  'laser_temperature', ptype=float, setter=None,
42
48
  getter=lambda: self._store.get('laser_temperature', 25.))
@@ -45,5 +51,8 @@ class QFakeOpus(QFakeInstrument, QOpus):
45
51
  getter=lambda: self._store.get('psu_temperature', 25.))
46
52
  self.identification = 'Fake Laser Quantum Opus Laser'
47
53
 
54
+ def identify(self) -> bool:
55
+ return True
56
+
48
57
 
49
58
  __all__ = ['QFakeOpus']
@@ -39,6 +39,10 @@ class QOpus(QSerialInstrument):
39
39
 
40
40
  Status (read-only)
41
41
  ------------------
42
+ status : bool
43
+ True if the laser is ENABLED (interlock satisfied and ready to
44
+ emit). False if DISABLED (keyswitch off or enable button not
45
+ pressed); a warning is logged when DISABLED is received.
42
46
  laser_temperature : float [°C]
43
47
  Laser head temperature.
44
48
  psu_temperature : float [°C]
@@ -79,10 +83,12 @@ class QOpus(QSerialInstrument):
79
83
  setter=lambda v: setattr(self, '_wavelength', float(v)))
80
84
  register('current', ptype=float,
81
85
  getter=self._getCurrent,
82
- setter=lambda v: self.transmit(f'CURRENT={float(v)}'))
86
+ setter=lambda v: self.handshake(f'CURRENT={float(v)}'))
83
87
  register('emission', ptype=bool,
84
88
  getter=lambda: self._power > 0,
85
89
  setter=self._setEmission)
90
+ register('status', ptype=bool, setter=None,
91
+ getter=self._getStatus)
86
92
  register('version', ptype=str, setter=None, getter=self.version)
87
93
  register('laser_temperature', ptype=float, setter=None,
88
94
  getter=lambda: self._parseTemp('LASTEMP?'))
@@ -92,10 +98,16 @@ class QOpus(QSerialInstrument):
92
98
  def identify(self) -> bool:
93
99
  '''Return True if the connected device identifies as an Opus laser.
94
100
 
95
- Queries the firmware version and checks for the
96
- ``'MPC-D'`` controller model token in the response.
101
+ Queries the firmware version and checks for the ``'MPC-D'``
102
+ controller model token in the response. On success, sends
103
+ ``CONTROL=POWER`` to ensure the controller regulates output
104
+ power rather than diode current for all subsequent setpoint
105
+ commands.
97
106
  '''
98
- return 'MPC-D' in self.version()
107
+ if 'MPC-D' not in self.version():
108
+ return False
109
+ self.handshake('CONTROL=POWER')
110
+ return True
99
111
 
100
112
  def _getPower(self) -> float:
101
113
  '''Query and return the actual output power [mW].
@@ -131,6 +143,25 @@ class QOpus(QSerialInstrument):
131
143
  response = self.handshake(cmd)
132
144
  return float(response.rstrip(' C')) if response else 0.
133
145
 
146
+ def _getStatus(self) -> bool:
147
+ '''Query and return the laser enable status.
148
+
149
+ Returns
150
+ -------
151
+ bool
152
+ True if the laser responds ``ENABLED``.
153
+ False if the laser responds ``DISABLED``; a warning is
154
+ logged in that case because the condition requires user
155
+ intervention (keyswitch or enable button).
156
+ '''
157
+ response = self.handshake('STATUS?')
158
+ if response == 'DISABLED':
159
+ logger.warning(
160
+ 'Opus laser is DISABLED: '
161
+ 'check keyswitch and front-panel enable button')
162
+ return False
163
+ return response == 'ENABLED'
164
+
134
165
  def _setPower(self, v: float) -> None:
135
166
  '''Transmit a new power setpoint, clamped to ``maximum_power``.
136
167
 
@@ -145,7 +176,7 @@ class QOpus(QSerialInstrument):
145
176
  logger.warning(
146
177
  f'power {v:.1f} mW exceeds maximum_power '
147
178
  f'{limit:.1f} mW; clamped to {clamped:.1f} mW')
148
- self.transmit(f'POWER={clamped}')
179
+ self.handshake(f'POWER={clamped}')
149
180
 
150
181
  def _setMaximumPower(self, v: float) -> None:
151
182
  '''Set the software upper bound on the power setpoint.
@@ -172,7 +203,7 @@ class QOpus(QSerialInstrument):
172
203
  state : bool
173
204
  True to enable (``ON``), False to disable (``OFF``).
174
205
  '''
175
- self.transmit('ON' if bool(state) else 'OFF')
206
+ self.handshake('ON' if bool(state) else 'OFF')
176
207
 
177
208
  def version(self) -> str:
178
209
  '''Return the firmware version string.'''
@@ -118,21 +118,18 @@ class QOpusWidget(QInstrumentWidget):
118
118
  '''
119
119
  power = self.device.get('power')
120
120
  if power is not None:
121
- self.power_display.blockSignals(True)
122
- self.power_display.setValue(float(power) / 1000.)
123
- self.power_display.blockSignals(False)
121
+ with QtCore.QSignalBlocker(self.power_display):
122
+ self.power_display.setValue(float(power) / 1000.)
124
123
 
125
124
  current = self.device.get('current')
126
125
  if current is not None:
127
- self.current_display.blockSignals(True)
128
- self.current_display.setValue(float(current))
129
- self.current_display.blockSignals(False)
126
+ with QtCore.QSignalBlocker(self.current_display):
127
+ self.current_display.setValue(float(current))
130
128
 
131
129
  emission = self.device.get('emission')
132
130
  if emission is not None:
133
- self.emission.blockSignals(True)
134
- self.emission.setValue(bool(emission))
135
- self.emission.blockSignals(False)
131
+ with QtCore.QSignalBlocker(self.emission):
132
+ self.emission.setValue(bool(emission))
136
133
 
137
134
 
138
135
  if __name__ == '__main__':