horiba-sdk 0.3.3__py3-none-any.whl → 0.4.0__py3-none-any.whl
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.
- horiba_sdk/__init__.py +0 -4
- horiba_sdk/core/__init__.py +0 -0
- horiba_sdk/core/acquisition_format.py +10 -0
- horiba_sdk/core/clean_count_mode.py +11 -0
- horiba_sdk/core/timer_resolution.py +12 -0
- horiba_sdk/core/x_axis_conversion_type.py +13 -0
- horiba_sdk/devices/ccd_discovery.py +10 -12
- horiba_sdk/devices/device_manager.py +13 -10
- horiba_sdk/devices/fake_responses/ccd.json +261 -12
- horiba_sdk/devices/fake_responses/monochromator.json +38 -10
- horiba_sdk/devices/monochromator_discovery.py +16 -9
- horiba_sdk/devices/single_devices/abstract_device.py +8 -0
- horiba_sdk/devices/single_devices/ccd.py +359 -153
- horiba_sdk/devices/single_devices/monochromator.py +73 -70
- horiba_sdk/sync/communication/abstract_communicator.py +2 -3
- horiba_sdk/sync/communication/websocket_communicator.py +37 -17
- horiba_sdk/sync/devices/device_discovery.py +13 -37
- horiba_sdk/sync/devices/device_manager.py +13 -10
- horiba_sdk/sync/devices/fake_icl_server.py +9 -6
- horiba_sdk/sync/devices/single_devices/abstract_device.py +11 -7
- horiba_sdk/sync/devices/single_devices/ccd.py +479 -62
- horiba_sdk/sync/devices/single_devices/monochromator.py +274 -24
- {horiba_sdk-0.3.3.dist-info → horiba_sdk-0.4.0.dist-info}/METADATA +108 -13
- {horiba_sdk-0.3.3.dist-info → horiba_sdk-0.4.0.dist-info}/RECORD +26 -21
- {horiba_sdk-0.3.3.dist-info → horiba_sdk-0.4.0.dist-info}/LICENSE +0 -0
- {horiba_sdk-0.3.3.dist-info → horiba_sdk-0.4.0.dist-info}/WHEEL +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
+
from enum import Enum
|
1
2
|
from types import TracebackType
|
2
|
-
from typing import Optional, final
|
3
|
+
from typing import Any, Optional, final
|
3
4
|
|
4
5
|
from loguru import logger
|
5
|
-
from numericalunits import nm
|
6
6
|
from overrides import override
|
7
7
|
|
8
8
|
from horiba_sdk.communication import Response
|
@@ -19,6 +19,78 @@ class Monochromator(AbstractDevice):
|
|
19
19
|
should be used to access the detected Monochromators on the system.
|
20
20
|
"""
|
21
21
|
|
22
|
+
@final
|
23
|
+
class Shutter(Enum):
|
24
|
+
"""Shutters installed in the monochromator."""
|
25
|
+
|
26
|
+
FIRST = 0
|
27
|
+
SECOND = 1
|
28
|
+
|
29
|
+
@final
|
30
|
+
class ShutterPosition(Enum):
|
31
|
+
"""Position of the shutter."""
|
32
|
+
|
33
|
+
CLOSED = 0
|
34
|
+
OPENED = 1
|
35
|
+
|
36
|
+
@final
|
37
|
+
class Grating(Enum):
|
38
|
+
"""Gratings installed in the monochromator"""
|
39
|
+
|
40
|
+
FIRST = 0
|
41
|
+
SECOND = 1
|
42
|
+
THIRD = 2
|
43
|
+
|
44
|
+
@final
|
45
|
+
class FilterWheel(Enum):
|
46
|
+
"""Filter wheels installed in the monochromator.
|
47
|
+
|
48
|
+
.. note:: the filter wheel is an optional module
|
49
|
+
|
50
|
+
"""
|
51
|
+
|
52
|
+
# TODO: clarify naming of filter wheel
|
53
|
+
FIRST = 0
|
54
|
+
SECOND = 1
|
55
|
+
|
56
|
+
@final
|
57
|
+
class FilterWheelPosition(Enum):
|
58
|
+
"""Positions of the filter wheel installed in the monochromator.
|
59
|
+
|
60
|
+
.. note:: the filter wheel is an optional module
|
61
|
+
|
62
|
+
"""
|
63
|
+
|
64
|
+
# TODO: clarify naming of filter wheel positions
|
65
|
+
RED = 0
|
66
|
+
GREEN = 1
|
67
|
+
BLUE = 2
|
68
|
+
YELLOW = 3
|
69
|
+
|
70
|
+
@final
|
71
|
+
class Mirror(Enum):
|
72
|
+
"""Mirrors installed in the monochromator"""
|
73
|
+
|
74
|
+
ENTRANCE = 0
|
75
|
+
EXIT = 1
|
76
|
+
|
77
|
+
@final
|
78
|
+
class MirrorPosition(Enum):
|
79
|
+
"""Possible positions of the mirrors"""
|
80
|
+
|
81
|
+
AXIAL = 0
|
82
|
+
LATERAL = 1
|
83
|
+
|
84
|
+
@final
|
85
|
+
class Slit(Enum):
|
86
|
+
"""Slits available on the monochromator."""
|
87
|
+
|
88
|
+
# TODO: clarify how the slits are called
|
89
|
+
A = 0
|
90
|
+
B = 1
|
91
|
+
C = 2
|
92
|
+
D = 3
|
93
|
+
|
22
94
|
def __init__(self, device_id: int, communicator: AbstractCommunicator, error_db: AbstractErrorDB) -> None:
|
23
95
|
super().__init__(device_id, communicator, error_db)
|
24
96
|
|
@@ -46,7 +118,7 @@ class Monochromator(AbstractDevice):
|
|
46
118
|
Exception: When an error occured on the device side
|
47
119
|
"""
|
48
120
|
super().open()
|
49
|
-
super()._execute_command('mono_open', {'index': self._id}
|
121
|
+
super()._execute_command('mono_open', {'index': self._id})
|
50
122
|
|
51
123
|
@override
|
52
124
|
def close(self) -> None:
|
@@ -66,7 +138,6 @@ class Monochromator(AbstractDevice):
|
|
66
138
|
response: Response = super()._execute_command('mono_isOpen', {'index': self._id})
|
67
139
|
return bool(response.results['open'])
|
68
140
|
|
69
|
-
@property
|
70
141
|
def is_busy(self) -> bool:
|
71
142
|
"""Checks if the monochromator is busy.
|
72
143
|
|
@@ -86,65 +157,244 @@ class Monochromator(AbstractDevice):
|
|
86
157
|
"""
|
87
158
|
super()._execute_command('mono_init', {'index': self._id})
|
88
159
|
|
89
|
-
|
90
|
-
|
160
|
+
def configuration(self) -> dict[str, Any]:
|
161
|
+
"""Returns the configuration of the monochromator.
|
162
|
+
|
163
|
+
Returns:
|
164
|
+
str: configuration of the monochromator
|
165
|
+
"""
|
166
|
+
response: Response = super()._execute_command('mono_getConfig', {'index': self._id, 'compact': False})
|
167
|
+
return response.results['configuration']
|
168
|
+
|
169
|
+
def get_current_wavelength(self) -> float:
|
91
170
|
"""Current wavelength of the monochromator's position in nm.
|
92
171
|
|
172
|
+
Returns:
|
173
|
+
float: The current wavelength in nm
|
174
|
+
|
93
175
|
Raises:
|
94
176
|
Exception: When an error occured on the device side
|
95
177
|
"""
|
96
178
|
response = super()._execute_command('mono_getPosition', {'index': self._id})
|
97
|
-
return float(response.results['wavelength'])
|
179
|
+
return float(response.results['wavelength'])
|
98
180
|
|
99
|
-
def
|
181
|
+
def calibrate_wavelength(self, wavelength: float) -> None:
|
100
182
|
"""This command sets the wavelength value of the current grating position of the monochromator.
|
101
183
|
|
102
184
|
.. warning:: This could potentially uncalibrate the monochromator and report an incorrect wavelength compared to
|
103
185
|
the actual output wavelength.
|
104
186
|
|
105
187
|
Args:
|
106
|
-
wavelength (
|
188
|
+
wavelength (float): wavelength in nm
|
107
189
|
|
108
190
|
Raises:
|
109
191
|
Exception: When an error occured on the device side
|
110
192
|
"""
|
111
193
|
super()._execute_command('mono_setPosition', {'index': self._id, 'wavelength': wavelength})
|
112
194
|
|
113
|
-
def
|
195
|
+
def move_to_target_wavelength(self, wavelength_nm: float) -> None:
|
114
196
|
"""Orders the monochromator to move to the requested wavelength.
|
115
197
|
|
116
198
|
Use :func:`Monochromator.is_busy()` to know if the operation is still taking place.
|
117
199
|
|
118
200
|
Args:
|
119
|
-
|
201
|
+
wavelength_nm (float): wavelength in nm
|
120
202
|
|
121
203
|
Raises:
|
122
204
|
Exception: When an error occured on the device side
|
123
205
|
"""
|
124
|
-
super()._execute_command('mono_moveToPosition', {'index': self._id, 'wavelength':
|
206
|
+
super()._execute_command('mono_moveToPosition', {'index': self._id, 'wavelength': wavelength_nm}, 180)
|
125
207
|
|
126
|
-
|
127
|
-
|
128
|
-
|
208
|
+
def get_turret_grating(self) -> Grating:
|
209
|
+
"""Current grating of the turret.
|
210
|
+
|
211
|
+
.. note:: Prior to the initialization of the grating turret, this value may not reflect the actual position
|
212
|
+
of the turret. To read the current position of the grating turret, please run
|
213
|
+
:func:`Monochromator.home()` prior to running this command.
|
129
214
|
|
130
215
|
Returns:
|
131
|
-
|
216
|
+
Grating: current grating of turret. See :class:`Monochromator.Grating` for possible values.
|
132
217
|
|
133
218
|
Raises:
|
134
|
-
Exception: When an error
|
219
|
+
Exception: When an error occurred on the device side
|
135
220
|
"""
|
136
221
|
response: Response = super()._execute_command('mono_getGratingPosition', {'index': self._id})
|
137
|
-
return
|
222
|
+
return self.Grating(response.results['position'])
|
138
223
|
|
139
|
-
def
|
140
|
-
"""
|
224
|
+
def set_turret_grating(self, grating: Grating) -> None:
|
225
|
+
"""Select turret grating
|
141
226
|
|
142
|
-
..
|
227
|
+
.. note:: Note: The turret sensor does not re-read the position each time it is moved, therefore the position
|
228
|
+
may not be accurate prior to initialization. See note for get_turret_grating().
|
143
229
|
|
144
230
|
Args:
|
145
|
-
|
231
|
+
grating (Grating): new grating of the turret. See :class:`Monochromator.Grating` for possible values.
|
146
232
|
|
147
233
|
Raises:
|
148
|
-
Exception: When an error
|
234
|
+
Exception: When an error occurred on the device side
|
235
|
+
"""
|
236
|
+
super()._execute_command('mono_moveGrating', {'index': self._id, 'position': grating.value})
|
237
|
+
|
238
|
+
def get_filter_wheel_position(self, filter_wheel: FilterWheel) -> FilterWheelPosition:
|
239
|
+
"""Current position of the filter wheel.
|
240
|
+
|
241
|
+
Returns:
|
242
|
+
FilterWheelPosition: current position of the filter wheel. See :class:`Monochromator.FilterWheelPosition`
|
243
|
+
for possible values.
|
244
|
+
|
245
|
+
Raises:
|
246
|
+
Exception: When an error occurred on the device side
|
247
|
+
"""
|
248
|
+
response: Response = super()._execute_command(
|
249
|
+
'mono_getFilterWheelPosition', {'index': self._id, 'type': filter_wheel.value}
|
250
|
+
)
|
251
|
+
return self.FilterWheelPosition(response.results['position'])
|
252
|
+
|
253
|
+
def set_filter_wheel_position(self, filter_wheel: FilterWheel, position: FilterWheelPosition) -> None:
|
254
|
+
"""Sets the current position of the filter wheel.
|
255
|
+
|
256
|
+
Returns:
|
257
|
+
FilterWheelPosition: current position of the filter wheel. See :class:`Monochromator.FilterWheelPosition`,
|
258
|
+
for possible values.
|
259
|
+
|
260
|
+
Raises:
|
261
|
+
Exception: When an error occurred on the device side
|
262
|
+
"""
|
263
|
+
super()._execute_command(
|
264
|
+
'mono_moveFilterWheel', {'index': self._id, 'locationId': filter_wheel.value, 'position': position.value}
|
265
|
+
)
|
266
|
+
|
267
|
+
def get_mirror_position(self, mirror: Mirror) -> MirrorPosition:
|
268
|
+
"""Position of the selected mirror.
|
269
|
+
|
270
|
+
.. todo:: Get more information about possible values and explain elements contained in monochromator at top
|
271
|
+
of this class.
|
272
|
+
|
273
|
+
Args:
|
274
|
+
mirror (Mirror): desired mirror to get the position from.
|
275
|
+
|
276
|
+
Returns:
|
277
|
+
MirrorPosition: current mirror position. See :class:`Monochromator.MirrorPosition` for possible values
|
278
|
+
|
279
|
+
Raises:
|
280
|
+
Exception: When an error occurred on the device side
|
281
|
+
"""
|
282
|
+
response: Response = super()._execute_command(
|
283
|
+
'mono_getMirrorPosition', {'index': self._id, 'locationId': mirror.value}
|
284
|
+
)
|
285
|
+
return self.MirrorPosition(response.results['position'])
|
286
|
+
|
287
|
+
def set_mirror_position(self, mirror: Mirror, position: MirrorPosition) -> None:
|
288
|
+
"""Sets the position of the selected mirror.
|
289
|
+
|
290
|
+
.. todo:: Get more information about possible values and explain elements contained in monochromator at top
|
291
|
+
of this class.
|
292
|
+
|
293
|
+
Args:
|
294
|
+
mirror (Mirror): desired mirror to set the position.
|
295
|
+
position (MirrorPosition): position to set. See :class:`Monochromator.MirrorPosition` for possible values
|
296
|
+
|
297
|
+
Raises:
|
298
|
+
Exception: When an error occurred on the device side
|
299
|
+
"""
|
300
|
+
super()._execute_command(
|
301
|
+
'mono_moveMirror', {'index': self._id, 'locationId': mirror.value, 'position': position.value}
|
302
|
+
)
|
303
|
+
|
304
|
+
def get_slit_position_in_mm(self, slit: Slit) -> float:
|
305
|
+
"""Returns the position in millimeters [mm] of the selected slit.
|
306
|
+
|
307
|
+
Args:
|
308
|
+
slit (Slit): desired slit to get the position from. See :class:`Monochromator.Slit` for possible
|
309
|
+
|
310
|
+
Returns:
|
311
|
+
float: position in mm
|
312
|
+
|
313
|
+
Raises:
|
314
|
+
Exception: When an error occurred on the device side
|
315
|
+
"""
|
316
|
+
|
317
|
+
response: Response = super()._execute_command(
|
318
|
+
'mono_getSlitPositionInMM', {'index': self._id, 'locationId': slit.value}
|
319
|
+
)
|
320
|
+
return float(response.results['position'])
|
321
|
+
|
322
|
+
def set_slit_position(self, slit: Slit, position_in_mm: float) -> None:
|
323
|
+
"""Sets the position of the selected slit.
|
324
|
+
|
325
|
+
Args:
|
326
|
+
slit (Slit): desired slit to set the position. See :class:`Monochromator.Slit` for possible values.
|
327
|
+
position_in_mm (float): position to set in millimeters [mm].
|
328
|
+
|
329
|
+
Raises:
|
330
|
+
Exception: When an error occurred on the device side
|
331
|
+
"""
|
332
|
+
super()._execute_command(
|
333
|
+
'mono_moveSlitMM', {'index': self._id, 'locationId': slit.value, 'position': position_in_mm}
|
334
|
+
)
|
335
|
+
|
336
|
+
def get_slit_step_position(self, slit: Slit) -> int:
|
337
|
+
"""Returns the position of the specified slit in steps.
|
338
|
+
|
339
|
+
Args:
|
340
|
+
slit (Slit): desired slit to get the position from. See :class:`Monochromator.Slit` for possible
|
341
|
+
Returns:
|
342
|
+
int: step position.
|
343
|
+
|
344
|
+
Raises:
|
345
|
+
Exception: When an error occurred on the device side
|
346
|
+
"""
|
347
|
+
|
348
|
+
response: Response = super()._execute_command(
|
349
|
+
'mono_getSlitStepPosition', {'index': self._id, 'locationId': slit.value}
|
350
|
+
)
|
351
|
+
return int(response.results['position'])
|
352
|
+
|
353
|
+
def set_slit_step_position(self, slit: Slit, step_position: int) -> None:
|
354
|
+
"""Moves the specified slit to the position in steps.
|
355
|
+
|
356
|
+
Args:
|
357
|
+
slit (Slit): desired slit to set the step position. See :class:`Monochromator.Slit` for possible values.
|
358
|
+
step_position (int): the step position.
|
359
|
+
|
360
|
+
Raises:
|
361
|
+
Exception: When an error occurred on the device side
|
362
|
+
"""
|
363
|
+
super()._execute_command(
|
364
|
+
'mono_moveSlit', {'index': self._id, 'locationId': slit.value, 'position': step_position}
|
365
|
+
)
|
366
|
+
|
367
|
+
def open_shutter(self) -> None:
|
368
|
+
"""Opens the shutter.
|
369
|
+
|
370
|
+
Raises:
|
371
|
+
Exception: When an error occurred on the device side
|
372
|
+
"""
|
373
|
+
super()._execute_command('mono_shutterOpen', {'index': self._id})
|
374
|
+
|
375
|
+
def close_shutter(self) -> None:
|
376
|
+
"""Closes the shutter.
|
377
|
+
|
378
|
+
Raises:
|
379
|
+
Exception: When an error occurred on the device side
|
380
|
+
"""
|
381
|
+
super()._execute_command('mono_shutterClose', {'index': self._id})
|
382
|
+
|
383
|
+
def get_shutter_position(self, shutter: Shutter) -> ShutterPosition:
|
384
|
+
"""Returns the shutter position.
|
385
|
+
|
386
|
+
Returns:
|
387
|
+
ShutterPosition: OPEN or CLOSED
|
388
|
+
|
389
|
+
Raises:
|
390
|
+
Exception: When an error occurred on the device side
|
149
391
|
"""
|
150
|
-
super()._execute_command('
|
392
|
+
response: Response = super()._execute_command('mono_getShutterStatus', {'index': self._id})
|
393
|
+
# TODO: How many shutters are there?
|
394
|
+
if shutter == self.Shutter.FIRST:
|
395
|
+
return self.ShutterPosition(response.results['shutter 1'])
|
396
|
+
elif shutter == self.Shutter.SECOND:
|
397
|
+
return self.ShutterPosition(response.results['shutter 2'])
|
398
|
+
else:
|
399
|
+
logger.error(f'shutter {shutter} not implemented')
|
400
|
+
raise Exception('shutter not implemented')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: horiba-sdk
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: 'horiba-sdk' is a package that provides source code for the development with Horiba devices
|
5
5
|
Home-page: https://github.com/ThatsTheEnd/horiba-python-sdk
|
6
6
|
License: MIT
|
@@ -18,7 +18,6 @@ Classifier: Programming Language :: Python :: 3.10
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
20
20
|
Requires-Dist: loguru (>=0.7.2,<0.8.0)
|
21
|
-
Requires-Dist: numericalunits (>=1.25,<2.0)
|
22
21
|
Requires-Dist: overrides (>=7.4.0,<8.0.0)
|
23
22
|
Requires-Dist: pint (>=0.23,<0.24)
|
24
23
|
Requires-Dist: psutil (>=5.9.7,<6.0.0)
|
@@ -47,13 +46,70 @@ Description-Content-Type: text/markdown
|
|
47
46
|
|
48
47
|
</div>
|
49
48
|
|
49
|
+
___
|
50
|
+
|
51
|
+
⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️
|
52
|
+
|
53
|
+
> [!WARNING]
|
54
|
+
> This SDK is under development and not yet released.
|
55
|
+
|
56
|
+
> [!IMPORTANT]
|
57
|
+
> For this python code to work, the SDK from Horiba has to be purchased, installed and licensed.
|
58
|
+
> The code in this repo and the SDK are under development and not yet released for public use!
|
59
|
+
|
60
|
+
⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️
|
61
|
+
|
62
|
+
___
|
63
|
+
|
50
64
|
**📦 Prerequisites**
|
51
65
|
|
52
66
|
* Python `>=3.9`
|
53
|
-
* ICL
|
67
|
+
* ICL.exe installed as part of the Horiba SDK, licensed and activated
|
68
|
+
|
69
|
+
<details>
|
70
|
+
<summary>To make sure that the USB devices do not get disconnected, uncheck the following boxes in the properties</summary>
|
71
|
+
|
72
|
+

|
73
|
+
|
74
|
+
</details>
|
54
75
|
|
55
76
|
## 🛠️ Usage
|
56
77
|
|
78
|
+
<details>
|
79
|
+
<summary>Video of the steps below</summary>
|
80
|
+
|
81
|
+

|
82
|
+
|
83
|
+
</details>
|
84
|
+
|
85
|
+
0. (Optional but recommended) Work in a virtual environment:
|
86
|
+
|
87
|
+
Navigate to the (empty) project folder you want to work and run:
|
88
|
+
|
89
|
+
```bash
|
90
|
+
python -m venv .
|
91
|
+
```
|
92
|
+
|
93
|
+
Activate the virtual environment:
|
94
|
+
|
95
|
+
<details>
|
96
|
+
<summary>Windows</summary>
|
97
|
+
|
98
|
+
```powershell
|
99
|
+
.\Scripts\activate
|
100
|
+
```
|
101
|
+
</details>
|
102
|
+
|
103
|
+
<details>
|
104
|
+
<summary>Unix</summary>
|
105
|
+
|
106
|
+
```bash
|
107
|
+
source ./bin/activate
|
108
|
+
```
|
109
|
+
</details>
|
110
|
+
|
111
|
+
*Note: do deactivate it, simply run `deactivate`.*
|
112
|
+
|
57
113
|
|
58
114
|
1. Install the sdk:
|
59
115
|
|
@@ -68,10 +124,21 @@ Description-Content-Type: text/markdown
|
|
68
124
|
```
|
69
125
|
|
70
126
|
2. Create a file named `center_scan.py` and copy-paste the content of
|
71
|
-
[`examples/asynchronous_examples/center_scan.py`](
|
127
|
+
[`examples/asynchronous_examples/center_scan.py`](examples/asynchronous_examples/center_scan.py)
|
128
|
+
|
129
|
+
3. Install the required library for plotting the graph in the example:
|
130
|
+
|
131
|
+
```bash
|
132
|
+
pip install matplotlib
|
133
|
+
```
|
134
|
+
|
135
|
+
or install with `Poetry`
|
72
136
|
|
137
|
+
```bash
|
138
|
+
poetry add matplotlib
|
139
|
+
```
|
73
140
|
|
74
|
-
|
141
|
+
4. Run the example with:
|
75
142
|
|
76
143
|
```bash
|
77
144
|
python center_scan.py
|
@@ -79,13 +146,13 @@ Description-Content-Type: text/markdown
|
|
79
146
|
|
80
147
|
## 👩💻 First steps as contributor
|
81
148
|
|
82
|
-
###
|
149
|
+
### Clone and setup the repo
|
83
150
|
|
84
|
-
1.
|
151
|
+
1. Clone the repo:
|
85
152
|
|
86
153
|
```bash
|
154
|
+
git clone https://github.com/ThatsTheEnd/horiba-python-sdk.git
|
87
155
|
cd horiba-python-sdk
|
88
|
-
git init
|
89
156
|
```
|
90
157
|
|
91
158
|
2. If you don't have `Poetry` installed run:
|
@@ -107,14 +174,12 @@ make pre-commit-install
|
|
107
174
|
make codestyle
|
108
175
|
```
|
109
176
|
|
110
|
-
5.
|
177
|
+
5. To push local changes to the remote repository, run:
|
111
178
|
|
112
179
|
```bash
|
113
180
|
git add .
|
114
|
-
git commit -m ":
|
115
|
-
git
|
116
|
-
git remote add origin https://github.com/ThatsTheEnd/horiba-python-sdk.git
|
117
|
-
git push -u origin main
|
181
|
+
git commit -m "feat: add new feature xyz"
|
182
|
+
git push
|
118
183
|
```
|
119
184
|
|
120
185
|
<!-- ### Set up bots -->
|
@@ -262,7 +327,37 @@ make mypy
|
|
262
327
|
|
263
328
|
Run `pytest`
|
264
329
|
|
330
|
+
Unix:
|
331
|
+
|
332
|
+
```bash
|
333
|
+
make test
|
334
|
+
```
|
335
|
+
|
336
|
+
Windows:
|
337
|
+
|
338
|
+
```powershell
|
339
|
+
poetry run pytest -c pyproject.toml --cov-report=html --cov=horiba_sdk tests/
|
340
|
+
```
|
341
|
+
|
342
|
+
For the hardware tests run the following:
|
343
|
+
|
344
|
+
Windows:
|
345
|
+
|
346
|
+
```powershell
|
347
|
+
$env:HAS_HARDWARE="true"
|
348
|
+
# If you want a remote ICL be used for the tests
|
349
|
+
# $env:TEST_ICL_IP="192.168.21.24"
|
350
|
+
# $env:TEST_ICL_PORT="1234"
|
351
|
+
poetry run pytest -c pyproject.toml --cov-report=html --cov=horiba_sdk tests/
|
352
|
+
```
|
353
|
+
|
354
|
+
Unix:
|
355
|
+
|
265
356
|
```bash
|
357
|
+
HAS_HARDWARE="true"
|
358
|
+
# If you want a remote ICL be used for the tests
|
359
|
+
# TEST_ICL_IP="192.168.21.24"
|
360
|
+
# TEST_ICL_PORT="1234"
|
266
361
|
make test
|
267
362
|
```
|
268
363
|
|
@@ -1,25 +1,30 @@
|
|
1
|
-
horiba_sdk/__init__.py,sha256=
|
1
|
+
horiba_sdk/__init__.py,sha256=QS1eJSOd6_DgyxAQE3FoKhvHgWRG3JVhkKHpQ1Za8yM,485
|
2
2
|
horiba_sdk/communication/__init__.py,sha256=nhS1rw1ZojM8zmRIx0VEFtYge0IH-B_L4zNBUNBJZYE,1564
|
3
3
|
horiba_sdk/communication/abstract_communicator.py,sha256=E80dfOjrfuNay3W5jeSn4T2tUas6vygRcF46kSoP5j8,1498
|
4
4
|
horiba_sdk/communication/communication_exception.py,sha256=d2ouOoVI6Q69_JL1bUEjjQOmjiO0CEm8K20WsaUuhB0,583
|
5
5
|
horiba_sdk/communication/messages.py,sha256=Gxkw01JI0U5ShILANT0pezywcoSO2aHo06j1ixzZPEQ,2661
|
6
6
|
horiba_sdk/communication/websocket_communicator.py,sha256=LzFaklePVAMkXKsdCQLFcx1XlOrJAAm1_Q9h2nAxeWY,8298
|
7
|
+
horiba_sdk/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
horiba_sdk/core/acquisition_format.py,sha256=fpACwGAL8qXEdsWGPTY0HYt708XSw0AtZ2FYb0RhpRk,152
|
9
|
+
horiba_sdk/core/clean_count_mode.py,sha256=jAiYvTBGnffgZpZAArifPINHd09884FaQ_x4Tq6uFzI,169
|
7
10
|
horiba_sdk/core/resolution.py,sha256=VOQonjPBqZ2TbtiNVDBT3TI1Aymj1pPYWMoobFaXjG8,1029
|
11
|
+
horiba_sdk/core/timer_resolution.py,sha256=sKu_Y2Ev0jfR_UbD3AwzFRAWAJmR6rYXTtdt37HE-Tw,240
|
12
|
+
horiba_sdk/core/x_axis_conversion_type.py,sha256=w44y6NUu_O0klltbIMj_pwFZBIL0MIZ4ouryh65Rzyw,224
|
8
13
|
horiba_sdk/devices/__init__.py,sha256=YYsJL2CSJwc2vsAjFQEKXjA5_QAnKlxSwlx32EgzFME,336
|
9
14
|
horiba_sdk/devices/abstract_device_discovery.py,sha256=04ZCEB5IZkUuJxSisS78eW6lAQNXG4uaDoPv-eBccBA,178
|
10
15
|
horiba_sdk/devices/abstract_device_manager.py,sha256=RXj5_pzFHpiolJe3ZfFsofwpD1hlwUMwYD1DyWMmlI0,1717
|
11
|
-
horiba_sdk/devices/ccd_discovery.py,sha256=
|
12
|
-
horiba_sdk/devices/device_manager.py,sha256=
|
16
|
+
horiba_sdk/devices/ccd_discovery.py,sha256=nGuskZ07Y9myI__dU8LeLnrNiJEBpGPby21EEwgSVUk,2376
|
17
|
+
horiba_sdk/devices/device_manager.py,sha256=S5iIxnvJivXdMLUmEq0rmoG899ENE-BdL_4TLQWQWsg,10327
|
13
18
|
horiba_sdk/devices/fake_device_manager.py,sha256=Tr4Z067smYfy-ya29PO4PK4EWF6Sa1R2UQFZCWfPePE,5015
|
14
19
|
horiba_sdk/devices/fake_icl_server.py,sha256=Yh9oh0YCbw-AXMnCHFWsZvJ7ZFjsnm1JG1y0ix1b-9Q,2348
|
15
|
-
horiba_sdk/devices/fake_responses/ccd.json,sha256=
|
20
|
+
horiba_sdk/devices/fake_responses/ccd.json,sha256=sMg-UqU6W1I01n2kEbkFc5J0XF8E3JVdOjB-1MhufzM,17020
|
16
21
|
horiba_sdk/devices/fake_responses/icl.json,sha256=ZPKhjx0BmwmqNGwbb7reXSStddgVZetCQQYVeNr9CSU,572
|
17
|
-
horiba_sdk/devices/fake_responses/monochromator.json,sha256=
|
18
|
-
horiba_sdk/devices/monochromator_discovery.py,sha256=
|
22
|
+
horiba_sdk/devices/fake_responses/monochromator.json,sha256=I9yBMsJyXXVCLF1J8mNPsfgXasIg60IL-4ToECcoGhw,4308
|
23
|
+
horiba_sdk/devices/monochromator_discovery.py,sha256=KoZ8vfPsI6QRuiD4BiE0YvzO42dQzFZqvoxygDSllE8,2365
|
19
24
|
horiba_sdk/devices/single_devices/__init__.py,sha256=Ai6HLstvMqT1c6A0yKLAH6227TUdS4ZMsC6zFrsmJic,192
|
20
|
-
horiba_sdk/devices/single_devices/abstract_device.py,sha256=
|
21
|
-
horiba_sdk/devices/single_devices/ccd.py,sha256=
|
22
|
-
horiba_sdk/devices/single_devices/monochromator.py,sha256=
|
25
|
+
horiba_sdk/devices/single_devices/abstract_device.py,sha256=0OW4RnZi0NQhS6DsN5BRbbbqbqOGajnYsHz9Nu0L-ws,2800
|
26
|
+
horiba_sdk/devices/single_devices/ccd.py,sha256=TN9sU2re2yhi6yxjtV0tDif7TnbCaOccKgf7n5sepyI,28466
|
27
|
+
horiba_sdk/devices/single_devices/monochromator.py,sha256=kUn2OizpItjrTfB-2AAq8bYz35pdwZpXV8a75LEH150,13969
|
23
28
|
horiba_sdk/icl_error/__init__.py,sha256=EtqHaUeoaLilpb7L7juuVamJgIZ3Anfnca0AO2o46rg,1053
|
24
29
|
horiba_sdk/icl_error/abstract_error.py,sha256=5nQDI6MNfCi4xUx6taJcEWGwANOo8mPEb4kVxrO-DW8,1301
|
25
30
|
horiba_sdk/icl_error/abstract_error_db.py,sha256=IJ3wGb6DWxnY35VIUwZX0X80IPi5k4QoQXnVjDy8lH8,589
|
@@ -28,21 +33,21 @@ horiba_sdk/icl_error/icl_error.py,sha256=IElsKl5nvLjprIV_ub9MacJmdSS327iNwOXhSiJ
|
|
28
33
|
horiba_sdk/icl_error/icl_error_db.py,sha256=5Jbs_ZlMp8Bjr4u8reIxxfOSFYYkzWTfKIqOQ4oUSXQ,2603
|
29
34
|
horiba_sdk/sync/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
35
|
horiba_sdk/sync/communication/__init__.py,sha256=iVHHW0cQ9w_J5dGRkwdBnw7vYgRLn5MVsdIFWGZvJoA,186
|
31
|
-
horiba_sdk/sync/communication/abstract_communicator.py,sha256=
|
36
|
+
horiba_sdk/sync/communication/abstract_communicator.py,sha256=CEkGj2qVNoWYkFD9HOlxV82kls3gsJ517gWPK-9rUBw,1185
|
32
37
|
horiba_sdk/sync/communication/test_client.py,sha256=7N5sM2Y63GSuFDmOEFRXeTHeAY7Nq7yX5MvbdPXeDko,651
|
33
|
-
horiba_sdk/sync/communication/websocket_communicator.py,sha256=
|
38
|
+
horiba_sdk/sync/communication/websocket_communicator.py,sha256=ThM2seSrMldQpX6pdacfi5_JCR05tF8aS8FgHy6V7RU,9233
|
34
39
|
horiba_sdk/sync/devices/__init__.py,sha256=NDHi3zfDC52aTO1RpaPIBfyp7PEXfTqiYdvY_ThkyRE,469
|
35
40
|
horiba_sdk/sync/devices/abstract_device_discovery.py,sha256=hKDWbI8-I3r5mrU3O1Y1ve6vV7sg6KpUa5d3EfcLIE8,447
|
36
41
|
horiba_sdk/sync/devices/abstract_device_manager.py,sha256=hF9BGgVqi6EK0n6hdUDu7dnKI1SfZ5mCweGvm6vCJ5o,1709
|
37
|
-
horiba_sdk/sync/devices/device_discovery.py,sha256=
|
38
|
-
horiba_sdk/sync/devices/device_manager.py,sha256=
|
42
|
+
horiba_sdk/sync/devices/device_discovery.py,sha256=eLErCF3mFYK5Za0jRg2xBLQnWJTwce7LcWdm8OQcI0A,2723
|
43
|
+
horiba_sdk/sync/devices/device_manager.py,sha256=cK5roPvBMzxm9qI3sB9WN_UXmxm5ER89CyDSLP22WY4,8428
|
39
44
|
horiba_sdk/sync/devices/fake_device_manager.py,sha256=myj1GwxjcOmv9jZbaTk8QwC6qYluNaZfuP9xPXrw3do,2809
|
40
|
-
horiba_sdk/sync/devices/fake_icl_server.py,sha256=
|
45
|
+
horiba_sdk/sync/devices/fake_icl_server.py,sha256=DlQOC54p7UCYBTdZOZCD9TgDdK4MarnbaWFUXRo7NP4,3298
|
41
46
|
horiba_sdk/sync/devices/single_devices/__init__.py,sha256=Ai6HLstvMqT1c6A0yKLAH6227TUdS4ZMsC6zFrsmJic,192
|
42
|
-
horiba_sdk/sync/devices/single_devices/abstract_device.py,sha256=
|
43
|
-
horiba_sdk/sync/devices/single_devices/ccd.py,sha256=
|
44
|
-
horiba_sdk/sync/devices/single_devices/monochromator.py,sha256=
|
45
|
-
horiba_sdk-0.
|
46
|
-
horiba_sdk-0.
|
47
|
-
horiba_sdk-0.
|
48
|
-
horiba_sdk-0.
|
47
|
+
horiba_sdk/sync/devices/single_devices/abstract_device.py,sha256=ABQpU6wU5trH0j8OVjDP6MeGTj41e1ey5K5sw7tCCdQ,2883
|
48
|
+
horiba_sdk/sync/devices/single_devices/ccd.py,sha256=Ig3aUFcKSZ3IAyir0onSioVtz08aG6eTp46iPnMOw4M,26833
|
49
|
+
horiba_sdk/sync/devices/single_devices/monochromator.py,sha256=uix3ffDMfSHCHFtKb6aX_SgF4urRaUsRdUTRqg9NqtA,13794
|
50
|
+
horiba_sdk-0.4.0.dist-info/LICENSE,sha256=JD-7TpNZoT7emooLwaTU9bJZbFbeM1ba90b8gpCYxzM,1083
|
51
|
+
horiba_sdk-0.4.0.dist-info/METADATA,sha256=q3J-KfVJSxpHm-y9yF_fVhkRln1BRu_VfAnQtOEiSfA,16035
|
52
|
+
horiba_sdk-0.4.0.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
53
|
+
horiba_sdk-0.4.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|