pymmcore-plus 0.10.0__tar.gz → 0.10.2__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.
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/PKG-INFO +1 -1
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/pyproject.toml +1 -1
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_psygnal.py +2 -2
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/_engine.py +10 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/events/_psygnal.py +2 -2
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_events.py +41 -97
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/.gitignore +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/LICENSE +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/README.md +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/_build.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/_cli.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/_logger.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/_util.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_adapter.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_config.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_config_group.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_constants.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_device.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_metadata.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_mmcore_plus.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_property.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_sequencing.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/_state.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_device_signal_view.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_norm_slot.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_prop_event_mixin.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_protocol.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_qsignals.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/install.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/_protocol.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/_runner.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/_thread_relay.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/events/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/events/_protocol.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/events/_qsignals.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_5d_writer_base.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_img_sequence_writer.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_ome_tiff_writer.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_ome_zarr_writer.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_tensorstore_handler.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_util.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_config_file.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_config_group.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_core_device.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_core_link.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_device.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_microscope.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_pixel_size_config.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/model/_property.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/py.typed +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/seq_tester.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/__init__.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/conftest.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/io/test_image_sequence_writer.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/io/test_ome_tiff.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/io/test_zarr_writers.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/local_config.cfg +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_adapter_class.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_bench.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_cli.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_config_group_class.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_core.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_device_class.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_mda.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_misc.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_model.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_pixel_config_class.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_property_class.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_sequencing.py +0 -0
- {pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/tests/test_thread_relay.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pymmcore-plus
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.2
|
|
4
4
|
Summary: pymmcore superset providing improved APIs, event handling, and a pure python acquisition engine
|
|
5
5
|
Project-URL: Source, https://github.com/pymmcore-plus/pymmcore-plus
|
|
6
6
|
Project-URL: Tracker, https://github.com/pymmcore-plus/pymmcore-plus/issues
|
|
@@ -139,7 +139,7 @@ docstring-code-format = true
|
|
|
139
139
|
[tool.pytest.ini_options]
|
|
140
140
|
minversion = "6.0"
|
|
141
141
|
testpaths = ["tests"]
|
|
142
|
-
filterwarnings = ["error"]
|
|
142
|
+
filterwarnings = ["error", "ignore:Failed to disconnect::pytestqt"]
|
|
143
143
|
|
|
144
144
|
# https://mypy.readthedocs.io/en/stable/config_file.html
|
|
145
145
|
[tool.mypy]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
from psygnal import Signal, SignalInstance
|
|
1
|
+
from psygnal import Signal, SignalGroup, SignalInstance
|
|
2
2
|
|
|
3
3
|
from pymmcore_plus.mda import MDAEngine
|
|
4
4
|
|
|
5
5
|
from ._prop_event_mixin import _DevicePropertyEventMixin
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class CMMCoreSignaler(_DevicePropertyEventMixin):
|
|
8
|
+
class CMMCoreSignaler(SignalGroup, _DevicePropertyEventMixin):
|
|
9
9
|
"""Signals that will be emitted from CMMCorePlus objects."""
|
|
10
10
|
|
|
11
11
|
# native MMCore callback events
|
|
@@ -329,6 +329,8 @@ class MDAEngine(PMDAEngine):
|
|
|
329
329
|
core = self._mmc
|
|
330
330
|
if not event.keep_shutter_open and self._autoshutter_was_set:
|
|
331
331
|
core.setAutoShutter(True)
|
|
332
|
+
# FIXME: this may not be hitting as intended...
|
|
333
|
+
# https://github.com/pymmcore-plus/pymmcore-plus/pull/353#issuecomment-2159176491
|
|
332
334
|
if isinstance(event, SequencedEvent):
|
|
333
335
|
if event.exposure_sequence:
|
|
334
336
|
core.stopExposureSequence(self._mmc.getCameraDevice())
|
|
@@ -356,15 +358,23 @@ class MDAEngine(PMDAEngine):
|
|
|
356
358
|
cam_device = self._mmc.getCameraDevice()
|
|
357
359
|
|
|
358
360
|
if event.exposure_sequence:
|
|
361
|
+
with suppress(RuntimeError):
|
|
362
|
+
core.stopExposureSequence(cam_device)
|
|
359
363
|
core.loadExposureSequence(cam_device, event.exposure_sequence)
|
|
360
364
|
if event.x_sequence: # y_sequence is implied and will be the same length
|
|
361
365
|
stage = core.getXYStageDevice()
|
|
366
|
+
with suppress(RuntimeError):
|
|
367
|
+
core.stopXYStageSequence(stage)
|
|
362
368
|
core.loadXYStageSequence(stage, event.x_sequence, event.y_sequence)
|
|
363
369
|
if event.z_sequence:
|
|
364
370
|
zstage = core.getFocusDevice()
|
|
371
|
+
with suppress(RuntimeError):
|
|
372
|
+
core.stopStageSequence(zstage)
|
|
365
373
|
core.loadStageSequence(zstage, event.z_sequence)
|
|
366
374
|
if prop_seqs := event.property_sequences(core):
|
|
367
375
|
for (dev, prop), value_sequence in prop_seqs.items():
|
|
376
|
+
with suppress(RuntimeError):
|
|
377
|
+
core.stopPropertySequence(dev, prop)
|
|
368
378
|
core.loadPropertySequence(dev, prop, value_sequence)
|
|
369
379
|
|
|
370
380
|
# TODO: SLM
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from psygnal import Signal
|
|
2
|
+
from psygnal import Signal, SignalGroup
|
|
3
3
|
from useq import MDAEvent, MDASequence
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class MDASignaler:
|
|
6
|
+
class MDASignaler(SignalGroup):
|
|
7
7
|
sequenceStarted = Signal(MDASequence, dict) # at the start of an MDA sequence
|
|
8
8
|
sequencePauseToggled = Signal(bool) # when MDA is paused/unpaused
|
|
9
9
|
sequenceCanceled = Signal(MDASequence) # when mda is canceled
|
|
@@ -68,7 +68,7 @@ def test_events_protocols(cls):
|
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
def test_set_property_events(core: CMMCorePlus):
|
|
71
|
+
def test_set_property_events(core: CMMCorePlus) -> None:
|
|
72
72
|
"""Test that using setProperty always emits a propertyChanged event."""
|
|
73
73
|
mock = Mock()
|
|
74
74
|
core.events.propertyChanged.connect(mock)
|
|
@@ -89,7 +89,7 @@ def test_set_property_events(core: CMMCorePlus):
|
|
|
89
89
|
mock.assert_called_once_with("Camera", "AllowMultiROI", "1")
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
def test_set_state_events(core: CMMCorePlus):
|
|
92
|
+
def test_set_state_events(core: CMMCorePlus) -> None:
|
|
93
93
|
mock = Mock()
|
|
94
94
|
core.events.propertyChanged.connect(mock)
|
|
95
95
|
assert core.getState("Objective") == 1
|
|
@@ -111,7 +111,7 @@ def test_set_state_events(core: CMMCorePlus):
|
|
|
111
111
|
assert core.getState("Dichroic") == 1
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def test_set_statedevice_property_emits_events(core: CMMCorePlus):
|
|
114
|
+
def test_set_statedevice_property_emits_events(core: CMMCorePlus) -> None:
|
|
115
115
|
mock = Mock()
|
|
116
116
|
core.events.propertyChanged.connect(mock)
|
|
117
117
|
assert core.getState("Objective") == 1
|
|
@@ -137,7 +137,7 @@ def test_set_statedevice_property_emits_events(core: CMMCorePlus):
|
|
|
137
137
|
assert core.getProperty("Dichroic", STATE) == "1"
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
def test_device_property_events(core: CMMCorePlus):
|
|
140
|
+
def test_device_property_events(core: CMMCorePlus) -> None:
|
|
141
141
|
mock1 = Mock()
|
|
142
142
|
mock2 = Mock()
|
|
143
143
|
core.events.devicePropertyChanged("Camera", "Gain").connect(mock1)
|
|
@@ -162,7 +162,7 @@ def test_device_property_events(core: CMMCorePlus):
|
|
|
162
162
|
mock2.assert_not_called()
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
def test_sequence_acquisition_events(core: CMMCorePlus):
|
|
165
|
+
def test_sequence_acquisition_events(core: CMMCorePlus) -> None:
|
|
166
166
|
mock1 = Mock()
|
|
167
167
|
mock2 = Mock()
|
|
168
168
|
mock3 = Mock()
|
|
@@ -172,124 +172,72 @@ def test_sequence_acquisition_events(core: CMMCorePlus):
|
|
|
172
172
|
core.events.sequenceAcquisitionStarted.connect(mock3)
|
|
173
173
|
|
|
174
174
|
core.startContinuousSequenceAcquisition()
|
|
175
|
-
mock1.
|
|
176
|
-
[
|
|
177
|
-
call(),
|
|
178
|
-
]
|
|
179
|
-
)
|
|
175
|
+
mock1.assert_called_once()
|
|
180
176
|
|
|
181
177
|
core.stopSequenceAcquisition()
|
|
182
|
-
mock2.
|
|
183
|
-
[
|
|
184
|
-
call(core.getCameraDevice()),
|
|
185
|
-
]
|
|
186
|
-
)
|
|
178
|
+
mock2.assert_any_call(core.getCameraDevice())
|
|
187
179
|
|
|
188
180
|
# without camera label
|
|
189
181
|
core.startSequenceAcquisition(5, 100.0, True)
|
|
190
|
-
mock3.
|
|
191
|
-
[
|
|
192
|
-
call(core.getCameraDevice(), 5, 100.0, True),
|
|
193
|
-
]
|
|
194
|
-
)
|
|
182
|
+
mock3.assert_any_call(core.getCameraDevice(), 5, 100.0, True)
|
|
195
183
|
core.stopSequenceAcquisition()
|
|
196
|
-
mock2.
|
|
197
|
-
[
|
|
198
|
-
call(core.getCameraDevice()),
|
|
199
|
-
]
|
|
200
|
-
)
|
|
184
|
+
mock2.assert_any_call(core.getCameraDevice())
|
|
201
185
|
|
|
202
186
|
# with camera label
|
|
203
187
|
cam = core.getCameraDevice()
|
|
204
188
|
core.startSequenceAcquisition(cam, 5, 100.0, True)
|
|
205
|
-
mock3.
|
|
206
|
-
[
|
|
207
|
-
call(cam, 5, 100.0, True),
|
|
208
|
-
]
|
|
209
|
-
)
|
|
189
|
+
mock3.assert_any_call(cam, 5, 100.0, True)
|
|
210
190
|
core.stopSequenceAcquisition(cam)
|
|
211
|
-
mock2.
|
|
212
|
-
[
|
|
213
|
-
call(cam),
|
|
214
|
-
]
|
|
215
|
-
)
|
|
191
|
+
mock2.assert_any_call(cam)
|
|
216
192
|
|
|
217
193
|
|
|
218
|
-
def test_shutter_device_events(core: CMMCorePlus):
|
|
194
|
+
def test_shutter_device_events(core: CMMCorePlus) -> None:
|
|
219
195
|
mock = Mock()
|
|
220
196
|
core.events.propertyChanged.connect(mock)
|
|
221
197
|
core.setShutterOpen("White Light Shutter", True)
|
|
222
|
-
mock.
|
|
223
|
-
[
|
|
224
|
-
call("White Light Shutter", STATE, "1"),
|
|
225
|
-
]
|
|
226
|
-
)
|
|
198
|
+
mock.assert_called_once_with("White Light Shutter", STATE, "1")
|
|
227
199
|
assert core.getShutterOpen("White Light Shutter")
|
|
228
200
|
assert core.getProperty("White Light Shutter", STATE) == "1"
|
|
229
201
|
|
|
230
202
|
|
|
231
|
-
def test_autoshutter_device_events(core: CMMCorePlus):
|
|
203
|
+
def test_autoshutter_device_events(core: CMMCorePlus) -> None:
|
|
232
204
|
mock = Mock()
|
|
233
205
|
core.events.autoShutterSet.connect(mock)
|
|
234
206
|
core.setAutoShutter(True)
|
|
235
|
-
mock.
|
|
236
|
-
[
|
|
237
|
-
call(True),
|
|
238
|
-
]
|
|
239
|
-
)
|
|
207
|
+
mock.assert_called_once_with(True)
|
|
240
208
|
assert core.getAutoShutter()
|
|
241
209
|
|
|
242
210
|
|
|
243
|
-
def test_groups_and_presets_events(core: CMMCorePlus):
|
|
244
|
-
|
|
245
|
-
core.events.configDeleted.connect(
|
|
211
|
+
def test_groups_and_presets_events(core: CMMCorePlus) -> None:
|
|
212
|
+
cfg_deleted = Mock()
|
|
213
|
+
core.events.configDeleted.connect(cfg_deleted)
|
|
246
214
|
core.deleteConfig("Camera", "HighRes")
|
|
247
|
-
|
|
248
|
-
[
|
|
249
|
-
call("Camera", "HighRes"),
|
|
250
|
-
]
|
|
251
|
-
)
|
|
215
|
+
cfg_deleted.assert_called_once_with("Camera", "HighRes")
|
|
252
216
|
assert "HighRes" not in core.getAvailableConfigs("Camera")
|
|
253
217
|
|
|
254
|
-
|
|
255
|
-
core.events.configGroupDeleted.connect(
|
|
218
|
+
grp_deleted = Mock()
|
|
219
|
+
core.events.configGroupDeleted.connect(grp_deleted)
|
|
256
220
|
core.deleteConfigGroup("Objective")
|
|
257
|
-
|
|
258
|
-
[
|
|
259
|
-
call("Objective"),
|
|
260
|
-
]
|
|
261
|
-
)
|
|
221
|
+
grp_deleted.assert_called_once_with("Objective")
|
|
262
222
|
assert "Objective" not in core.getAvailableConfigGroups()
|
|
263
223
|
|
|
264
|
-
|
|
265
|
-
core.events.configDefined.connect(
|
|
224
|
+
cfg_defined = Mock()
|
|
225
|
+
core.events.configDefined.connect(cfg_defined)
|
|
266
226
|
core.defineConfig("NewGroup", "")
|
|
267
|
-
|
|
268
|
-
[
|
|
269
|
-
call("NewGroup", "NewPreset", "", "", ""),
|
|
270
|
-
]
|
|
271
|
-
)
|
|
227
|
+
cfg_defined.assert_called_once_with("NewGroup", "NewPreset", "", "", "")
|
|
272
228
|
assert "NewGroup" in core.getAvailableConfigGroups()
|
|
273
229
|
assert "NewPreset" in core.getAvailableConfigs("NewGroup")
|
|
274
230
|
|
|
275
|
-
|
|
276
|
-
core.events.configDefined.connect(mock)
|
|
231
|
+
cfg_defined.reset_mock()
|
|
277
232
|
core.defineConfig("NewGroup_1", "New")
|
|
278
|
-
|
|
279
|
-
[
|
|
280
|
-
call("NewGroup_1", "New", "", "", ""),
|
|
281
|
-
]
|
|
282
|
-
)
|
|
233
|
+
cfg_defined.assert_called_once_with("NewGroup_1", "New", "", "", "")
|
|
283
234
|
assert "NewGroup_1" in core.getAvailableConfigGroups()
|
|
284
235
|
assert "New" in core.getAvailableConfigs("NewGroup_1")
|
|
285
236
|
|
|
286
|
-
|
|
287
|
-
core.events.configDefined.connect(mock)
|
|
237
|
+
cfg_defined.reset_mock()
|
|
288
238
|
core.defineConfig("NewGroup_2", "New", "Dichroic", "Label", "Q505LP")
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
call("NewGroup_2", "New", "Dichroic", "Label", "Q505LP"),
|
|
292
|
-
]
|
|
239
|
+
cfg_defined.assert_called_once_with(
|
|
240
|
+
"NewGroup_2", "New", "Dichroic", "Label", "Q505LP"
|
|
293
241
|
)
|
|
294
242
|
assert "NewGroup_2" in core.getAvailableConfigGroups()
|
|
295
243
|
assert "New" in core.getAvailableConfigs("NewGroup_2")
|
|
@@ -297,52 +245,48 @@ def test_groups_and_presets_events(core: CMMCorePlus):
|
|
|
297
245
|
assert ("Dichroic", "Label", "Q505LP") in dpv
|
|
298
246
|
|
|
299
247
|
|
|
300
|
-
def test_set_camera_roi_event(core: CMMCorePlus):
|
|
248
|
+
def test_set_camera_roi_event(core: CMMCorePlus) -> None:
|
|
301
249
|
mock = Mock()
|
|
302
250
|
core.events.roiSet.connect(mock)
|
|
303
251
|
core.setROI(10, 20, 100, 200)
|
|
304
|
-
mock.
|
|
305
|
-
[
|
|
306
|
-
call(core.getCameraDevice(), 10, 20, 100, 200),
|
|
307
|
-
]
|
|
308
|
-
)
|
|
252
|
+
mock.assert_called_once_with(core.getCameraDevice(), 10, 20, 100, 200)
|
|
309
253
|
assert list(core.getROI()) == [10, 20, 100, 200]
|
|
310
254
|
|
|
311
255
|
|
|
312
|
-
def test_pixel_changed_event(core: CMMCorePlus):
|
|
256
|
+
def test_pixel_changed_event(core: CMMCorePlus) -> None:
|
|
313
257
|
mock = Mock()
|
|
314
258
|
core.events.pixelSizeChanged.connect(mock)
|
|
315
259
|
|
|
316
260
|
core.deletePixelSizeConfig("Res10x")
|
|
317
|
-
mock.
|
|
261
|
+
mock.assert_called_once_with(0.0)
|
|
318
262
|
assert "Res10x" not in core.getAvailablePixelSizeConfigs()
|
|
319
263
|
|
|
320
264
|
core.definePixelSizeConfig("test", "Objective", "Label", "Nikon 10X S Fluor")
|
|
321
|
-
mock.
|
|
265
|
+
mock.assert_any_call(0.0)
|
|
322
266
|
assert "test" in core.getAvailablePixelSizeConfigs()
|
|
323
267
|
|
|
324
268
|
core.setPixelSizeUm("test", 6.5)
|
|
325
|
-
mock.
|
|
269
|
+
mock.assert_any_call(6.5)
|
|
326
270
|
assert core.getPixelSizeUmByID("test") == 6.5
|
|
327
271
|
|
|
328
272
|
|
|
329
|
-
def test_set_channelgroup(core: CMMCorePlus):
|
|
273
|
+
def test_set_channelgroup(core: CMMCorePlus) -> None:
|
|
330
274
|
mock = Mock()
|
|
331
275
|
core.events.channelGroupChanged.connect(mock)
|
|
332
276
|
|
|
333
277
|
core.setChannelGroup("Camera")
|
|
334
278
|
assert core.getChannelGroup() == "Camera"
|
|
335
|
-
mock.
|
|
279
|
+
mock.assert_any_call("Camera")
|
|
336
280
|
|
|
337
281
|
|
|
338
|
-
def test_set_focus_device(core: CMMCorePlus):
|
|
282
|
+
def test_set_focus_device(core: CMMCorePlus) -> None:
|
|
339
283
|
mock = Mock()
|
|
340
284
|
core.events.propertyChanged.connect(mock)
|
|
341
285
|
|
|
342
286
|
core.setFocusDevice("")
|
|
343
287
|
assert not core.getFocusDevice()
|
|
344
|
-
mock.
|
|
288
|
+
mock.assert_called_once_with("Core", "Focus", "")
|
|
345
289
|
|
|
346
290
|
core.setFocusDevice("Z")
|
|
347
291
|
assert core.getFocusDevice() == "Z"
|
|
348
|
-
mock.
|
|
292
|
+
mock.assert_any_call("Core", "Focus", "Z")
|
|
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
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_device_signal_view.py
RENAMED
|
File without changes
|
|
File without changes
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/core/events/_prop_event_mixin.py
RENAMED
|
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
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_5d_writer_base.py
RENAMED
|
File without changes
|
|
File without changes
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_img_sequence_writer.py
RENAMED
|
File without changes
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_ome_tiff_writer.py
RENAMED
|
File without changes
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_ome_zarr_writer.py
RENAMED
|
File without changes
|
{pymmcore_plus-0.10.0 → pymmcore_plus-0.10.2}/src/pymmcore_plus/mda/handlers/_tensorstore_handler.py
RENAMED
|
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
|
|
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
|