pymmcore-plus 0.13.2__py3-none-any.whl → 0.13.4__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.
@@ -1675,6 +1675,7 @@ class CMMCorePlus(pymmcore.CMMCore):
1675
1675
 
1676
1676
  **Why Override?** To emit a `startContinuousSequenceAcquisition` event.
1677
1677
  """
1678
+ self.events.continuousSequenceAcquisitionStarting.emit()
1678
1679
  super().startContinuousSequenceAcquisition(intervalMs)
1679
1680
  self.events.continuousSequenceAcquisitionStarted.emit()
1680
1681
 
@@ -1703,12 +1704,16 @@ class CMMCorePlus(pymmcore.CMMCore):
1703
1704
 
1704
1705
  **Why Override?** To emit a `startSequenceAcquisition` event.
1705
1706
  """
1706
- super().startSequenceAcquisition(*args, **kwargs)
1707
1707
  if len(args) == 3:
1708
1708
  numImages, intervalMs, stopOnOverflow = args
1709
1709
  cameraLabel = super().getCameraDevice()
1710
1710
  else:
1711
1711
  cameraLabel, numImages, intervalMs, stopOnOverflow = args
1712
+
1713
+ self.events.sequenceAcquisitionStarting.emit(
1714
+ cameraLabel, numImages, intervalMs, stopOnOverflow
1715
+ )
1716
+ super().startSequenceAcquisition(*args, **kwargs)
1712
1717
  self.events.sequenceAcquisitionStarted.emit(
1713
1718
  cameraLabel, numImages, intervalMs, stopOnOverflow
1714
1719
  )
@@ -133,14 +133,26 @@ class PCoreSignaler(Protocol):
133
133
  > :sparkles: This signal is unique to `pymmcore-plus`.
134
134
  """
135
135
 
136
+ continuousSequenceAcquisitionStarting: PSignal
137
+ """Emits with no arguments *before* continuous sequence acquisition is started.
138
+
139
+ > :sparkles: This signal is unique to `pymmcore-plus`.
140
+ """
136
141
  continuousSequenceAcquisitionStarted: PSignal
137
- """Emits with no arguments when continuous sequence acquisition is started.
142
+ """Emits with no arguments *after* continuous sequence acquisition has started.
143
+
144
+ > :sparkles: This signal is unique to `pymmcore-plus`.
145
+ """
146
+ sequenceAcquisitionStarting: PSignal
147
+ """Emits `(str, int, float, bool)` *before* sequence acquisition is started.
138
148
 
149
+ (cameraLabel, numImages, intervalMs, stopOnOverflow)
139
150
  > :sparkles: This signal is unique to `pymmcore-plus`.
140
151
  """
141
152
  sequenceAcquisitionStarted: PSignal
142
- """Emits `(str, int, float, bool)` when sequence acquisition is started.
153
+ """Emits `(str, int, float, bool)` *after* sequence acquisition has started.
143
154
 
155
+ (cameraLabel, numImages, intervalMs, stopOnOverflow)
144
156
  > :sparkles: This signal is unique to `pymmcore-plus`.
145
157
  """
146
158
  sequenceAcquisitionStopped: PSignal
@@ -25,7 +25,9 @@ class CMMCoreSignaler(SignalGroup, _DevicePropertyEventMixin):
25
25
  # added for CMMCorePlus
26
26
  imageSnapped = Signal() # whenever snapImage is called
27
27
  mdaEngineRegistered = Signal(MDAEngine, MDAEngine)
28
+ continuousSequenceAcquisitionStarting = Signal()
28
29
  continuousSequenceAcquisitionStarted = Signal()
30
+ sequenceAcquisitionStarting = Signal(str, int, float, bool)
29
31
  sequenceAcquisitionStarted = Signal(str, int, float, bool)
30
32
  sequenceAcquisitionStopped = Signal(str)
31
33
  autoShutterSet = Signal(bool)
@@ -29,8 +29,10 @@ class QCoreSignaler(QObject):
29
29
  imageSnapped = Signal() # on snapImage()
30
30
  mdaEngineRegistered = Signal(object, object) # new engine, old engine
31
31
  # when continuousSequenceAcquisition is started
32
+ continuousSequenceAcquisitionStarting = Signal()
32
33
  continuousSequenceAcquisitionStarted = Signal()
33
34
  # when SequenceAcquisition is started
35
+ sequenceAcquisitionStarting = Signal(str, int, float, bool)
34
36
  sequenceAcquisitionStarted = Signal(str, int, float, bool)
35
37
  # when (Continuous)SequenceAcquisition is stopped
36
38
  sequenceAcquisitionStopped = Signal(str)
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, Literal, NamedTuple, cast
7
7
 
8
8
  import numpy as np
9
9
  import useq
10
- from useq import HardwareAutofocus, MDAEvent, MDASequence
10
+ from useq import AcquireImage, HardwareAutofocus, MDAEvent, MDASequence
11
11
 
12
12
  from pymmcore_plus._logger import logger
13
13
  from pymmcore_plus._util import retry
@@ -195,6 +195,13 @@ class MDAEngine(PMDAEngine):
195
195
  )
196
196
  return
197
197
 
198
+ # don't try to execute any other action types. Mostly, this is just
199
+ # CustomAction, which is a user-defined action that the engine doesn't know how
200
+ # to handle. But may include other actions in the future, and this ensures
201
+ # backwards compatibility.
202
+ if not isinstance(action, (AcquireImage, type(None))):
203
+ return
204
+
198
205
  # if the autofocus was engaged at the start of the sequence AND autofocus action
199
206
  # did not fail, re-engage it. NOTE: we need to do that AFTER the runner calls
200
207
  # `setup_event`, so we can't do it inside the exec_event autofocus action above.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymmcore-plus
3
- Version: 0.13.2
3
+ Version: 0.13.4
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
@@ -33,7 +33,7 @@ Requires-Dist: rich>=10.2.0
33
33
  Requires-Dist: tensorstore; python_version < '3.13'
34
34
  Requires-Dist: typer>=0.4.2
35
35
  Requires-Dist: typing-extensions
36
- Requires-Dist: useq-schema>=0.6.2
36
+ Requires-Dist: useq-schema>=0.7.0
37
37
  Provides-Extra: cli
38
38
  Requires-Dist: rich>=10.2.0; extra == 'cli'
39
39
  Requires-Dist: typer>=0.4.2; extra == 'cli'
@@ -16,16 +16,16 @@ pymmcore_plus/core/_config_group.py,sha256=R-o4xuPDBPQAC3s-mFsiKwHVKWR38L9qq_aoW
16
16
  pymmcore_plus/core/_constants.py,sha256=6foxGbek3tgnUHYUtQ7NCqwIIqqGYW1W56HjrhZqsA0,12829
17
17
  pymmcore_plus/core/_device.py,sha256=Pz9Ekhss2c9IBA3B7WyMU2cCwc19Dp_dGVhMkzqUaIE,7762
18
18
  pymmcore_plus/core/_metadata.py,sha256=3vb3d36XgNnUY44dpZ4Ccw0tvn4KCinZ8zrnDllmABI,2645
19
- pymmcore_plus/core/_mmcore_plus.py,sha256=8tjNxpSRfDLmYbNllLgJ2RVbKLpeUsOMb0hw-MPR9BI,91621
19
+ pymmcore_plus/core/_mmcore_plus.py,sha256=I5IqUmR-IgdftHO5dkvzA99kAxRZoj-8_tkTaJcfLNQ,91819
20
20
  pymmcore_plus/core/_property.py,sha256=QsQEzqOAedR24zEJ1Ge4kwScfT_7NOApVcgz6QxBJrI,8265
21
21
  pymmcore_plus/core/_sequencing.py,sha256=Vb6hbRsb8RxSPUAlNSVWTM4Yvg7YYf9ZbewK7u_b-QM,16692
22
22
  pymmcore_plus/core/events/__init__.py,sha256=Bb1Ga97GzY2z3fAeJkPs1wxbTXa1o_p6nIKof_UCvZs,1093
23
23
  pymmcore_plus/core/events/_device_signal_view.py,sha256=t-NfBdg3E4rms4vDFxkkR5XtrpLxaBT7mfPwkpIsbVk,1079
24
24
  pymmcore_plus/core/events/_norm_slot.py,sha256=8DCBoLHGh7cbB1OB19IJYwL6sFBFmkD8IakfBOvFbw8,2907
25
25
  pymmcore_plus/core/events/_prop_event_mixin.py,sha256=FvJJnpEKrOR-_Sp3-NNCwFoUUHwmNKiHruo0Y1vybsY,4042
26
- pymmcore_plus/core/events/_protocol.py,sha256=V4st91mw6LoogII2c05vJxD5SIQU24va86J0iqJWqXU,7528
27
- pymmcore_plus/core/events/_psygnal.py,sha256=owaKlW2zpvocXDbAW4kHovBoVv4Fjfn-S5oUJrVWsD4,1646
28
- pymmcore_plus/core/events/_qsignals.py,sha256=gr-GDiSVLhFhSfaoKrdTz2y3I_2IUg62bYDGuGrB3j0,3018
26
+ pymmcore_plus/core/events/_protocol.py,sha256=Zp_8rldyNca3RUOsgnxYj8Bxmo9rLsruTX-ORHBNw9E,8043
27
+ pymmcore_plus/core/events/_psygnal.py,sha256=9xsTY9wysrUlis5_29CesgyEXGDv8kwgZOZjaN_V7bc,1763
28
+ pymmcore_plus/core/events/_qsignals.py,sha256=pN87k6XEIrgtbJTJWjwKWRR3j-RIGGwnaX-9iHPB-q0,3135
29
29
  pymmcore_plus/experimental/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  pymmcore_plus/experimental/unicore/__init__.py,sha256=OcjUZ4tq-NtWDR5R3JFivsRePliQSIQ7Z92k_8Gfz2Q,361
31
31
  pymmcore_plus/experimental/unicore/_device_manager.py,sha256=c5DAMsnK06xOy6G7YjHdUughc7xdFtzeo10woO5G_KE,6418
@@ -36,7 +36,7 @@ pymmcore_plus/experimental/unicore/devices/_device.py,sha256=PfX4BSpVMPXyNCNWkZ0
36
36
  pymmcore_plus/experimental/unicore/devices/_properties.py,sha256=yqVyoXb3VSbHahN2mXOIgeKOS7pUQeiJIZ_Y2d55dTI,15387
37
37
  pymmcore_plus/experimental/unicore/devices/_stage.py,sha256=Ab4uibYq1cjIBtwcthCxH2FudGq9UMjub-qVeRpApQY,7892
38
38
  pymmcore_plus/mda/__init__.py,sha256=7VH-MqOcuK1JNSOG9HhES6Ac-Z-LuT8a0f2xPbGEt7w,344
39
- pymmcore_plus/mda/_engine.py,sha256=m-GsTMCIX2CgyUZb32Cyp52fh3WcUW--evk_yLANu-E,29534
39
+ pymmcore_plus/mda/_engine.py,sha256=QxUXlDNITCVILfZ2GGoIDe8iSOaMXn6mswhvnsmUzm8,29914
40
40
  pymmcore_plus/mda/_protocol.py,sha256=10CDJ9H57oX1z0oqK3eShXyQhufHvvu3_8wdaCYpPIg,3254
41
41
  pymmcore_plus/mda/_runner.py,sha256=NSOhpll6_WxDLO19FTs19dASJcHcOoVOCy7q_QzX_Ms,18523
42
42
  pymmcore_plus/mda/_thread_relay.py,sha256=Ww-9gyvLEzwRhnpL1dpze71wL7IRlhH8K3Q1dmJIxgs,6193
@@ -64,8 +64,8 @@ pymmcore_plus/model/_device.py,sha256=-0s3NkonDoaMrNy_hn5EDz-c4o33ZiJSQkV_kdBteo
64
64
  pymmcore_plus/model/_microscope.py,sha256=69VV6cuevinOK_LhYEkQygHGesvCZefdn9YNt3mV618,11353
65
65
  pymmcore_plus/model/_pixel_size_config.py,sha256=smoOmT54nSkg52RaSQzTFG0YwyMR_SEq_lkS-JyJW9U,3514
66
66
  pymmcore_plus/model/_property.py,sha256=NQzNtnEzSCR9ogwx1cfi8X-qbJ_cBSJKdSBAaoKoPQ0,3720
67
- pymmcore_plus-0.13.2.dist-info/METADATA,sha256=4z6G5lpau1oQJUFSejzKr88yNTWOzStR50mRZvaN6IU,9594
68
- pymmcore_plus-0.13.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
69
- pymmcore_plus-0.13.2.dist-info/entry_points.txt,sha256=NtFyndrQzBpUNJyil-8e5hMGke2utAf7mkGavTLcLOY,51
70
- pymmcore_plus-0.13.2.dist-info/licenses/LICENSE,sha256=OHJjRpOPKKRc7FEnpehNWdR5LRBdBhUtIFG-ZI0dCEA,1522
71
- pymmcore_plus-0.13.2.dist-info/RECORD,,
67
+ pymmcore_plus-0.13.4.dist-info/METADATA,sha256=tmhgzAJdqyf1tO_aUNpfIslpMGlqcp49oZ2-kSX7qNs,9594
68
+ pymmcore_plus-0.13.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
69
+ pymmcore_plus-0.13.4.dist-info/entry_points.txt,sha256=NtFyndrQzBpUNJyil-8e5hMGke2utAf7mkGavTLcLOY,51
70
+ pymmcore_plus-0.13.4.dist-info/licenses/LICENSE,sha256=OHJjRpOPKKRc7FEnpehNWdR5LRBdBhUtIFG-ZI0dCEA,1522
71
+ pymmcore_plus-0.13.4.dist-info/RECORD,,