horiba-sdk 0.6.0__tar.gz → 0.7.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 (47) hide show
  1. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/PKG-INFO +1 -1
  2. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/communication/messages.py +6 -5
  3. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/acquisition_format.py +1 -2
  4. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/__init__.py +1 -1
  5. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/linear_spectra_stitch.py +7 -7
  6. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/device_manager.py +3 -5
  7. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/pyproject.toml +1 -1
  8. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/LICENSE +0 -0
  9. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/README.md +0 -0
  10. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/__init__.py +0 -0
  11. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/communication/__init__.py +0 -0
  12. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/communication/abstract_communicator.py +0 -0
  13. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/communication/communication_exception.py +0 -0
  14. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/communication/websocket_communicator.py +0 -0
  15. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/__init__.py +0 -0
  16. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/clean_count_mode.py +0 -0
  17. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/resolution.py +0 -0
  18. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/labspec6_spectra_stitch.py +0 -0
  19. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/simple_cut_spectra_stitch.py +0 -0
  20. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/spectra_stitch.py +0 -0
  21. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/stitching/y_displacement_spectra_stitch.py +0 -0
  22. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/timer_resolution.py +0 -0
  23. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/trigger_input_polarity.py +0 -0
  24. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/core/x_axis_conversion_type.py +0 -0
  25. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/__init__.py +0 -0
  26. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/abstract_device_discovery.py +0 -0
  27. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/abstract_device_manager.py +0 -0
  28. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/ccd_discovery.py +0 -0
  29. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_device_manager.py +0 -0
  30. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_icl_server.py +0 -0
  31. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_responses/ccd.json +0 -0
  32. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_responses/icl.json +0 -0
  33. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_responses/monochromator.json +0 -0
  34. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/fake_responses/spectracq3.json +0 -0
  35. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/monochromator_discovery.py +0 -0
  36. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/single_devices/__init__.py +0 -0
  37. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/single_devices/abstract_device.py +0 -0
  38. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/single_devices/ccd.py +0 -0
  39. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/single_devices/monochromator.py +0 -0
  40. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/single_devices/spectracq3.py +0 -0
  41. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/devices/spectracq3_discovery.py +0 -0
  42. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/__init__.py +0 -0
  43. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/abstract_error.py +0 -0
  44. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/abstract_error_db.py +0 -0
  45. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/error_list.json +0 -0
  46. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/icl_error.py +0 -0
  47. {horiba_sdk-0.6.0 → horiba_sdk-0.7.0}/horiba_sdk/icl_error/icl_error_db.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: horiba-sdk
3
- Version: 0.6.0
3
+ Version: 0.7.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
@@ -1,6 +1,6 @@
1
1
  import json
2
2
  from itertools import count
3
- from typing import Any, Dict, List, Optional, Union, final
3
+ from typing import Any, Optional, Union, final
4
4
 
5
5
 
6
6
  class Command:
@@ -21,7 +21,7 @@ class Command:
21
21
 
22
22
  _id_counter = count(start=1) # Starts counting from 1
23
23
 
24
- def __init__(self, command: str, parameters: Dict[str, Any]):
24
+ def __init__(self, command: str, parameters: dict[str, Any]):
25
25
  self.id = next(self._id_counter) # Automatically assigns the next unique ID
26
26
  self.command = command
27
27
  self.parameters = parameters
@@ -44,9 +44,10 @@ class Response:
44
44
 
45
45
  def __init__(
46
46
  self,
47
- id: int, command: str,
48
- results: Optional[Union[Dict[str, Any], Any]] = None,
49
- errors: Optional[List[str]] = None
47
+ id: int,
48
+ command: str,
49
+ results: Optional[Union[dict[str, Any], Any]] = None,
50
+ errors: Optional[list[str]] = None,
50
51
  ):
51
52
  self.id = id
52
53
  self.command = command
@@ -14,7 +14,6 @@ class AcquisitionFormat(Enum):
14
14
 
15
15
  """
16
16
 
17
- SPECTRA = 0
18
- IMAGE = 1
17
+ SPECTRA_IMAGE = 1
19
18
  CROP = 2
20
19
  FAST_KINETICS = 3
@@ -3,4 +3,4 @@ from .simple_cut_spectra_stitch import SimpleCutSpectraStitch
3
3
  from .spectra_stitch import SpectraStitch
4
4
  from .y_displacement_spectra_stitch import YDisplacementSpectraStitch
5
5
 
6
- __all__ = ['LinearSpectraStitch', 'SimpleCutSpectraStitch', 'YDisplacementSpectraStitch', 'SpectraStitch']
6
+ __all__ = ['LinearSpectraStitch', 'SimpleCutSpectraStitch', 'YDisplacementSpectraStitch', 'SpectraStitch']
@@ -1,4 +1,4 @@
1
- from typing import Any, List
1
+ from typing import Any
2
2
 
3
3
  from loguru import logger
4
4
  from numpy import argsort, array, concatenate, dtype, interp, ndarray
@@ -10,7 +10,7 @@ from horiba_sdk.core.stitching.spectra_stitch import SpectraStitch
10
10
  class LinearSpectraStitch(SpectraStitch):
11
11
  """Stitches a list of spectra using a linear model"""
12
12
 
13
- def __init__(self, spectra_list: List[List[List[float]]]) -> None:
13
+ def __init__(self, spectra_list: list[list[list[float]]]) -> None:
14
14
  """Constructs a linear stitch of spectra.
15
15
 
16
16
  .. warning:: The spectra in the list must overlap
@@ -24,7 +24,7 @@ class LinearSpectraStitch(SpectraStitch):
24
24
  for i in range(1, len(spectra_list)):
25
25
  stitched_spectrum = self._stitch_spectra(stitched_spectrum, spectra_list[i])
26
26
 
27
- self._stitched_spectrum: List[List[float]] = stitched_spectrum
27
+ self._stitched_spectrum: list[list[float]] = stitched_spectrum
28
28
 
29
29
  @override
30
30
  def stitch_with(self, other_stitch: SpectraStitch) -> SpectraStitch:
@@ -48,7 +48,7 @@ class LinearSpectraStitch(SpectraStitch):
48
48
  """
49
49
  return self._stitched_spectrum
50
50
 
51
- def _stitch_spectra(self, spectrum1: List[List[float]], spectrum2: List[List[float]]) -> List[List[float]]:
51
+ def _stitch_spectra(self, spectrum1: list[list[float]], spectrum2: list[list[float]]) -> list[list[float]]:
52
52
  fx1 = spectrum1[0]
53
53
  fy1 = spectrum1[1][0]
54
54
  fx2 = spectrum2[0]
@@ -77,9 +77,9 @@ class LinearSpectraStitch(SpectraStitch):
77
77
  overlap_start = max(x1_min, x2_min)
78
78
  overlap_end = min(x1_max, x2_max)
79
79
 
80
- logger.debug(f"Spectrum 1 range: {x1_min} to {x1_max}")
81
- logger.debug(f"Spectrum 2 range: {x2_min} to {x2_max}")
82
- logger.debug(f"Overlap region: {overlap_start} to {overlap_end}")
80
+ logger.debug(f'Spectrum 1 range: {x1_min} to {x1_max}')
81
+ logger.debug(f'Spectrum 2 range: {x2_min} to {x2_max}')
82
+ logger.debug(f'Overlap region: {overlap_start} to {overlap_end}')
83
83
 
84
84
  if overlap_start >= overlap_end:
85
85
  logger.error(f'No overlap between spectra: [{x1_min}, {x1_max}] and [{x2_min}, {x2_max}]')
@@ -67,7 +67,7 @@ class DeviceManager(AbstractDeviceManager):
67
67
  icl_ip: str = '127.0.0.1',
68
68
  icl_port: str = '25010',
69
69
  enable_binary_messages: bool = True,
70
- enable_logging: bool = False
70
+ enable_logging: bool = False,
71
71
  ):
72
72
  """
73
73
  Initializes the DeviceManager with the specified communicator class.
@@ -82,7 +82,7 @@ class DeviceManager(AbstractDeviceManager):
82
82
  # By default, logging is disabled for a library, so if desired it can be enabled
83
83
  root_name_space: str = __name__.split('.')[0]
84
84
  if enable_logging:
85
- logger.info(f"Initializing logger for namespace: {root_name_space}")
85
+ logger.info(f'Initializing logger for namespace: {root_name_space}')
86
86
  logger.enable(root_name_space)
87
87
  else:
88
88
  logger.disable(root_name_space)
@@ -232,9 +232,7 @@ class DeviceManager(AbstractDeviceManager):
232
232
  await monochromators_discovery.execute(error_on_no_device)
233
233
  self._monochromators = monochromators_discovery.monochromators()
234
234
 
235
- spectracq3_discovery: SpectrAcq3Discovery = SpectrAcq3Discovery(
236
- self._icl_communicator, self._icl_error_db
237
- )
235
+ spectracq3_discovery: SpectrAcq3Discovery = SpectrAcq3Discovery(self._icl_communicator, self._icl_error_db)
238
236
  await spectracq3_discovery.execute(error_on_no_device)
239
237
  self._spectracq3_devices = spectracq3_discovery.spectracq3_devices()
240
238
 
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
 
6
6
  [tool.poetry]
7
7
  name = "horiba-sdk"
8
- version = "0.6.0"
8
+ version = "0.7.0"
9
9
  description = "'horiba-sdk' is a package that provides source code for the development with Horiba devices"
10
10
  readme = "README.md"
11
11
  authors = ["ZühlkeEngineering <nikolaus.naredi-rainer@zuehlke.com>"]
File without changes
File without changes