etho-python 1.2__tar.gz → 1.2.1__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 (125) hide show
  1. {etho_python-1.2 → etho_python-1.2.1}/PKG-INFO +1 -1
  2. etho_python-1.2.1/docs/hardware/govee.md +29 -0
  3. {etho_python-1.2 → etho_python-1.2.1}/docs/hardware/hardware.rst +2 -0
  4. {etho_python-1.2 → etho_python-1.2.1}/pyproject.toml +1 -1
  5. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/daq/IOTask.py +66 -51
  6. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/sound.py +1 -1
  7. {etho_python-1.2 → etho_python-1.2.1}/tests/test_sound.py +9 -0
  8. {etho_python-1.2 → etho_python-1.2.1}/.github/workflows/draft-pdf.yml +0 -0
  9. {etho_python-1.2 → etho_python-1.2.1}/.github/workflows/python-package.yml +0 -0
  10. {etho_python-1.2 → etho_python-1.2.1}/.github/workflows/static.yml +0 -0
  11. {etho_python-1.2 → etho_python-1.2.1}/.gitignore +0 -0
  12. {etho_python-1.2 → etho_python-1.2.1}/CITATION.cff +0 -0
  13. {etho_python-1.2 → etho_python-1.2.1}/CONTRIBUTING.md +0 -0
  14. {etho_python-1.2 → etho_python-1.2.1}/LICENSE +0 -0
  15. {etho_python-1.2 → etho_python-1.2.1}/README.md +0 -0
  16. {etho_python-1.2 → etho_python-1.2.1}/docs/Makefile +0 -0
  17. {etho_python-1.2 → etho_python-1.2.1}/docs/README.md +0 -0
  18. {etho_python-1.2 → etho_python-1.2.1}/docs/_static/etho_dark.svg +0 -0
  19. {etho_python-1.2 → etho_python-1.2.1}/docs/_static/etho_light.svg +0 -0
  20. {etho_python-1.2 → etho_python-1.2.1}/docs/_templates/api_head.rst +0 -0
  21. {etho_python-1.2 → etho_python-1.2.1}/docs/_templates/autosummary/module.rst +0 -0
  22. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.app.rst +0 -0
  23. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.cli.rst +0 -0
  24. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.client.rst +0 -0
  25. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.BLTZeroService.rst +0 -0
  26. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.DAQZeroService.rst +0 -0
  27. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.GCMZeroService.rst +0 -0
  28. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.GOVZeroService.rst +0 -0
  29. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.NICounterZeroService.rst +0 -0
  30. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.TemplateZeroService.rst +0 -0
  31. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.ZeroService.rst +0 -0
  32. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.base.rst +0 -0
  33. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.basler.rst +0 -0
  34. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.dummy.rst +0 -0
  35. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.hamamatsu.rst +0 -0
  36. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.spinnaker.rst +0 -0
  37. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.camera.ximea.rst +0 -0
  38. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.dlp.dlp_make_warpfiles.rst +0 -0
  39. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.utils.concurrent_task.rst +0 -0
  40. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.services.utils.log_exceptions.rst +0 -0
  41. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.calibration.rst +0 -0
  42. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.config.rst +0 -0
  43. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.runner.rst +0 -0
  44. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.shuffled_cycle.rst +0 -0
  45. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.sound.rst +0 -0
  46. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.tui.rst +0 -0
  47. {etho_python-1.2 → etho_python-1.2.1}/docs/api/etho.utils.zeroclient.rst +0 -0
  48. {etho_python-1.2 → etho_python-1.2.1}/docs/api_etho.rst +0 -0
  49. {etho_python-1.2 → etho_python-1.2.1}/docs/callbacks.md +0 -0
  50. {etho_python-1.2 → etho_python-1.2.1}/docs/cli.md +0 -0
  51. {etho_python-1.2 → etho_python-1.2.1}/docs/conf.py +0 -0
  52. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/calibration_led.md +0 -0
  53. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/calibration_speaker.md +0 -0
  54. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/configuration.rst +0 -0
  55. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/global.md +0 -0
  56. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/playlist.md +0 -0
  57. {etho_python-1.2 → etho_python-1.2.1}/docs/configuration/protocol.md +0 -0
  58. {etho_python-1.2 → etho_python-1.2.1}/docs/extensions.md +0 -0
  59. {etho_python-1.2 → etho_python-1.2.1}/docs/hardware/camera.md +0 -0
  60. {etho_python-1.2 → etho_python-1.2.1}/docs/hardware/nidaq.md +0 -0
  61. {etho_python-1.2 → etho_python-1.2.1}/docs/hardware/projector.md +0 -0
  62. {etho_python-1.2 → etho_python-1.2.1}/docs/hardware/scanimage.md +0 -0
  63. {etho_python-1.2 → etho_python-1.2.1}/docs/index.rst +0 -0
  64. {etho_python-1.2 → etho_python-1.2.1}/docs/install.rst +0 -0
  65. {etho_python-1.2 → etho_python-1.2.1}/docs/logging.md +0 -0
  66. {etho_python-1.2 → etho_python-1.2.1}/docs/make.bat +0 -0
  67. {etho_python-1.2 → etho_python-1.2.1}/docs/make_api_doctree.py +0 -0
  68. {etho_python-1.2 → etho_python-1.2.1}/docs/tutorial.md +0 -0
  69. {etho_python-1.2 → etho_python-1.2.1}/paper/bib.bib +0 -0
  70. {etho_python-1.2 → etho_python-1.2.1}/paper/fig_flow.pdf +0 -0
  71. {etho_python-1.2 → etho_python-1.2.1}/paper/paper.md +0 -0
  72. {etho_python-1.2 → etho_python-1.2.1}/src/etho/__init__.py +0 -0
  73. {etho_python-1.2 → etho_python-1.2.1}/src/etho/app.py +0 -0
  74. {etho_python-1.2 → etho_python-1.2.1}/src/etho/assets/etho_icon1_pipeline_dark.svg +0 -0
  75. {etho_python-1.2 → etho_python-1.2.1}/src/etho/assets/etho_icon1_pipeline_light.svg +0 -0
  76. {etho_python-1.2 → etho_python-1.2.1}/src/etho/cli.py +0 -0
  77. {etho_python-1.2 → etho_python-1.2.1}/src/etho/client.py +0 -0
  78. {etho_python-1.2 → etho_python-1.2.1}/src/etho/res_app.py +0 -0
  79. {etho_python-1.2 → etho_python-1.2.1}/src/etho/resumable.py +0 -0
  80. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/BLTZeroService.py +0 -0
  81. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/DAQZeroService.py +0 -0
  82. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/DLPZeroService.py +0 -0
  83. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/GCMZeroService.py +0 -0
  84. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/GOVZeroService.py +0 -0
  85. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/NICounterZeroService.py +0 -0
  86. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/ScanImageTriggerZeroService.py +0 -0
  87. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/TemplateZeroService.py +0 -0
  88. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/ZeroService.py +0 -0
  89. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/__init__.py +0 -0
  90. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/callbacks/__init__.py +0 -0
  91. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/callbacks/_base.py +0 -0
  92. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/callbacks/_image.py +0 -0
  93. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/callbacks/_trace.py +0 -0
  94. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/__init__.py +0 -0
  95. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/base.py +0 -0
  96. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/basler.py +0 -0
  97. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/dummy.py +0 -0
  98. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/hamamatsu.py +0 -0
  99. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/spinnaker.py +0 -0
  100. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/camera/ximea.py +0 -0
  101. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/daq/ai.py +0 -0
  102. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/dlp/dlp_make_warpfiles.py +0 -0
  103. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/dlp/dlp_runners.py +0 -0
  104. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/resumable.py +0 -0
  105. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/utils/__init__.py +0 -0
  106. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/utils/concurrent_task.py +0 -0
  107. {etho_python-1.2 → etho_python-1.2.1}/src/etho/services/utils/log_exceptions.py +0 -0
  108. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/__init__.py +0 -0
  109. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/calibration.py +0 -0
  110. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/config.py +0 -0
  111. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/runner.py +0 -0
  112. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/shuffled_cycle.py +0 -0
  113. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/tui.py +0 -0
  114. {etho_python-1.2 → etho_python-1.2.1}/src/etho/utils/zeroclient.py +0 -0
  115. {etho_python-1.2 → etho_python-1.2.1}/tests/test_cli_gui_smoke.py +0 -0
  116. {etho_python-1.2 → etho_python-1.2.1}/tests/test_config.py +0 -0
  117. {etho_python-1.2 → etho_python-1.2.1}/tests/test_config.yaml +0 -0
  118. {etho_python-1.2 → etho_python-1.2.1}/tests/test_gov_service.py +0 -0
  119. {etho_python-1.2 → etho_python-1.2.1}/tests/test_import.py +0 -0
  120. {etho_python-1.2 → etho_python-1.2.1}/tests/test_resumable.py +0 -0
  121. {etho_python-1.2 → etho_python-1.2.1}/tests/test_service_client_wiring.py +0 -0
  122. {etho_python-1.2 → etho_python-1.2.1}/tests/test_services.py +0 -0
  123. {etho_python-1.2 → etho_python-1.2.1}/tests/test_shuffled_cycle.py +0 -0
  124. {etho_python-1.2 → etho_python-1.2.1}/tests/test_sound_playlist_mono.txt +0 -0
  125. {etho_python-1.2 → etho_python-1.2.1}/tests/test_sound_playlist_stereo.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: etho-python
3
- Version: 1.2
3
+ Version: 1.2.1
4
4
  Summary: etho
5
5
  Author-email: Jan Clemens <clemensjan@googlemail.com>
6
6
  Requires-Python: >=3.10
@@ -0,0 +1,29 @@
1
+ # Govee Temperature/Humidity Sensors
2
+
3
+ The `GOV` service supports Govee H5075 sensors over Bluetooth Low Energy (BLE).
4
+
5
+ ## Discover the Sensor Address
6
+
7
+ On the acquisition computer, activate the `etho` conda environment and scan for
8
+ nearby sensors:
9
+
10
+ ```powershell
11
+ conda activate etho
12
+ etho govee
13
+ ```
14
+
15
+ After scanning for 10 seconds, the command lists each sensor's address, name,
16
+ temperature, and humidity. Match the temperature and humidity pair in a row to
17
+ the values shown on the physical sensor's display. If multiple sensors show
18
+ similar values, temporarily move or warm one sensor, run `etho govee` again,
19
+ and match the changed readings.
20
+
21
+ Copy the address from the matching row into the sensor's protocol block:
22
+
23
+ ```yaml
24
+ GOV:
25
+ address: AA:BB:CC:DD:EE:FF
26
+ interval: 60
27
+ ```
28
+
29
+ The `interval` is the logging interval in seconds.
@@ -12,6 +12,7 @@ operated from protocols:
12
12
  - :doc:`National Instruments DAQmx compatible devices <nidaq>`
13
13
  - :doc:`DLP projectors <projector>`
14
14
  - :doc:`ScanImage microscopes <scanimage>`
15
+ - :doc:`Govee H5075 temperature/humidity sensors <govee>`
15
16
 
16
17
  You can add support for new hardware by implementing the appropriate service interface. See :ref:`extensions`.
17
18
 
@@ -24,3 +25,4 @@ You can add support for new hardware by implementing the appropriate service int
24
25
  nidaq
25
26
  projector
26
27
  scanimage
28
+ govee
@@ -17,7 +17,7 @@ dependencies = [
17
17
  'pydaqmx', 'pyqtgraph', 'qtpy', 'PySide6-Essentials', 'zarr', 'zerorpc-numpy'
18
18
  ]
19
19
  readme= "README.md"
20
- version="1.2"
20
+ version="1.2.1"
21
21
 
22
22
  [project.scripts]
23
23
  etho = "etho.cli:main"
@@ -27,7 +27,7 @@ class IOTask(daq.Task):
27
27
  dev_name="Dev1",
28
28
  cha_name=["ai0"],
29
29
  limits=None,
30
- rate=10000.0,
30
+ rate: float = 10000.0,
31
31
  nb_inputsamples_per_cycle=None,
32
32
  clock_source=None,
33
33
  terminals: Optional[List[str]] = None,
@@ -63,7 +63,8 @@ class IOTask(daq.Task):
63
63
  raise TypeError(f"`cha_name` is {type(cha_name)}. Should be `list` or `tuple`")
64
64
 
65
65
  self.samples_read = daq.int32()
66
-
66
+ self.samples_written = daq.int32()
67
+ self.rate = rate
67
68
  # channels
68
69
  cha_types = {
69
70
  "ai": "analog_input",
@@ -80,7 +81,7 @@ class IOTask(daq.Task):
80
81
  self.cha_string = ", ".join(self.cha_names)
81
82
  self.num_channels = len(self.cha_names)
82
83
  if nb_inputsamples_per_cycle is None:
83
- nb_inputsamples_per_cycle = int(rate)
84
+ nb_inputsamples_per_cycle = int(self.rate)
84
85
 
85
86
  # terminals
86
87
  terminal_types = {
@@ -111,21 +112,30 @@ class IOTask(daq.Task):
111
112
  self.data_gen = None # called at start of callback
112
113
  self.data_rec = None # called at end of callback
113
114
 
115
+ self.buffer_seconds = 100
116
+ self.refresh_seconds = 0.1
117
+ self.num_samples_per_chan = int(rate * self.buffer_seconds)
118
+ self.num_samples_per_event = int(rate * self.refresh_seconds)
119
+
114
120
  if len(set(self.cha_type)) != 1:
115
121
  raise ValueError("Mixed channel types (AI, AO, DI, DO).")
116
122
 
117
123
  if self.cha_type[0] == "analog_input":
118
124
  # add all channels
119
125
  for name, terminal, limit in zip(self.cha_names, self.cha_terminals, self.cha_limits):
120
- self.CreateAIVoltageChan(
121
- name,
122
- "",
123
- terminal,
124
- limit[0],
125
- limit[1],
126
- daq.DAQmx_Val_Volts,
127
- None,
128
- )
126
+ try:
127
+ self.CreateAIVoltageChan(
128
+ name,
129
+ "",
130
+ terminal,
131
+ limit[0],
132
+ limit[1],
133
+ daq.DAQmx_Val_Volts,
134
+ None,
135
+ )
136
+ except DAQError as e:
137
+ logging.exception(f"Failed creating AO {name}: %s", e)
138
+ raise
129
139
  self.num_samples_per_chan = nb_inputsamples_per_cycle
130
140
  self.num_samples_per_event = nb_inputsamples_per_cycle # self.num_samples_per_chan*self.num_channels
131
141
  self.AutoRegisterEveryNSamplesEvent(daq.DAQmx_Val_Acquired_Into_Buffer, self.num_samples_per_event, 0)
@@ -140,19 +150,16 @@ class IOTask(daq.Task):
140
150
  daq.DAQmx_Val_Volts,
141
151
  None,
142
152
  )
143
- self.num_samples_per_chan = 5000
144
- self.num_samples_per_event = 1000 # determines shortest interval at which new data can be generated
153
+
145
154
  self.AutoRegisterEveryNSamplesEvent(daq.DAQmx_Val_Transferred_From_Buffer, self.num_samples_per_event, 0)
146
- self.CfgOutputBuffer(self.num_samples_per_chan * self.num_channels * 2)
155
+ self.CfgOutputBuffer(self.num_samples_per_chan)
147
156
  # ensures continuous output and avoids collision of old and new data in buffer
148
157
  self.SetWriteRegenMode(daq.DAQmx_Val_DoNotAllowRegen)
149
158
  elif self.cha_type[0] == "digital_output":
150
159
  for name in self.cha_names:
151
160
  self.CreateDOChan(name, "", daq.DAQmx_Val_ChanPerLine)
152
- self.num_samples_per_chan = 5000
153
- self.num_samples_per_event = 1000 # determines shortest interval at which new data can be generated
154
161
  self.AutoRegisterEveryNSamplesEvent(daq.DAQmx_Val_Transferred_From_Buffer, self.num_samples_per_event, 0)
155
- self.CfgOutputBuffer(self.num_samples_per_chan * self.num_channels * 2)
162
+ self.CfgOutputBuffer(self.num_samples_per_chan)
156
163
  # ensures continuous output and avoids collision of old and new data in buffer
157
164
  self.SetWriteRegenMode(daq.DAQmx_Val_DoNotAllowRegen)
158
165
 
@@ -174,7 +181,7 @@ class IOTask(daq.Task):
174
181
 
175
182
  self.CfgSampClkTiming(
176
183
  clock_source,
177
- rate,
184
+ self.rate,
178
185
  daq.DAQmx_Val_Rising,
179
186
  daq.DAQmx_Val_ContSamps,
180
187
  self.num_samples_per_chan,
@@ -210,50 +217,58 @@ class IOTask(daq.Task):
210
217
  if self.data_gen is not None:
211
218
  try:
212
219
  self._data = next(self.data_gen) # get data from data generator
213
- self.log.warning(f"datagen {self.data_gen}")
214
220
  except StopIteration as e:
215
- self.log.warning(f"datagen {self.data_gen} StopIteration {e}")
221
+ self.log.warning(f"Generator out of data - stopping iteration. This is okay!")
216
222
  self._data = None
217
223
 
218
224
  if self.cha_type[0] == "analog_input":
219
225
  # should only read self.num_samples_per_event!! otherwise recordings will be zeropadded for each chunk
220
- self.ReadAnalogF64(
221
- daq.DAQmx_Val_Auto,
222
- 1.0,
223
- daq.DAQmx_Val_GroupByScanNumber,
224
- self._data,
225
- self.num_samples_per_chan * self.num_channels,
226
- daq.byref(self.samples_read),
227
- None,
228
- )
229
- # only keep samples that were actually read, .value converts c_long to int
230
- self._data = self._data[: self.samples_read.value, :]
226
+ try:
227
+ self.ReadAnalogF64(
228
+ daq.DAQmx_Val_Auto,
229
+ 1.0,
230
+ daq.DAQmx_Val_GroupByScanNumber,
231
+ self._data,
232
+ self.num_samples_per_chan * self.num_channels,
233
+ daq.byref(self.samples_read),
234
+ None,
235
+ )
236
+ # only keep samples that were actually read, .value converts c_long to int
237
+ self._data = self._data[: self.samples_read.value, :]
238
+ except daq.DAQError as e:
239
+ logging.exception("Error Reading Analog %d: %s", e.error, e)
231
240
 
232
241
  elif self.cha_type[0] == "analog_output" and self._data is not None:
233
- self.WriteAnalogF64(
234
- self._data.shape[0],
235
- 0,
236
- daq.DAQmx_Val_WaitInfinitely,
237
- daq.DAQmx_Val_GroupByScanNumber,
238
- self._data,
239
- daq.byref(self.samples_read),
240
- None,
241
- )
242
+ try:
243
+ self.WriteAnalogF64(
244
+ self._data.shape[0],
245
+ 0,
246
+ daq.DAQmx_Val_WaitInfinitely,
247
+ daq.DAQmx_Val_GroupByScanNumber,
248
+ self._data,
249
+ daq.byref(self.samples_written),
250
+ None,
251
+ )
252
+ except daq.DAQError as e:
253
+ logging.exception("Error Writing Analog %d: %s", e.error, e)
254
+
242
255
  elif self.cha_type[0] == "digital_output" and self._data is not None:
243
- self.WriteDigitalLines(
244
- self._data.shape[0],
245
- 0,
246
- daq.DAQmx_Val_WaitInfinitely,
247
- daq.DAQmx_Val_GroupByScanNumber,
248
- self._data,
249
- daq.byref(self.samples_read),
250
- None,
251
- )
256
+ try:
257
+ self.WriteDigitalLines(
258
+ self._data.shape[0],
259
+ 0,
260
+ daq.DAQmx_Val_WaitInfinitely,
261
+ daq.DAQmx_Val_GroupByScanNumber,
262
+ self._data,
263
+ daq.byref(self.samples_read),
264
+ None,
265
+ )
266
+ except daq.DAQError as e:
267
+ logging.exception("Error Writing Digital %d: %s", e.error, e)
252
268
 
253
269
  if self.data_rec is not None:
254
270
  for data_rec in self.data_rec:
255
271
  if self._data is not None:
256
- self.log.warning(f"{data_rec} {systemtime}")
257
272
  data_rec.send((self._data, systemtime))
258
273
  self._newdata_event.set()
259
274
 
@@ -16,7 +16,7 @@ def parse_cell(cell, dtype: Callable = None) -> List:
16
16
  if isinstance(cell, str):
17
17
  cell = cell.strip()
18
18
  token = cell.lstrip("[").rstrip("]").split(",")
19
- token = [tok.strip() for tok in token]
19
+ token = [tok.strip().strip("'\"") for tok in token]
20
20
  if dtype:
21
21
  token = [dtype(tok) for tok in token]
22
22
  else:
@@ -41,3 +41,12 @@ def test_parse_table_ignores_unused_playlist_columns():
41
41
  assert list(parsed.columns) == ["stimFileName", "silencePre", "silencePost", "intensity", "freq"]
42
42
  assert parsed.loc[0, "stimFileName"] == ["SIN_100_0_3000"]
43
43
  assert parsed.loc[0, "intensity"] == [1.0]
44
+
45
+
46
+ def test_parse_table_accepts_quoted_bracketed_stimulus_name():
47
+ playlist = pd.DataFrame(
48
+ [["['SIN_100_0_3000']", 1000, 1000, 1.0, 100]],
49
+ columns=["stimFileName", "silencePre", "silencePost", "intensity", "freq"],
50
+ )
51
+
52
+ assert parse_table(playlist).loc[0, "stimFileName"] == ["SIN_100_0_3000"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes