pymmcore_plus.mda.events package#

Module contents#

class MDASignaler[source]#

Bases: object

frameReady#

Declares a signal emitter on a class.

This is class implements the [descriptor protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto) and is designed to be used as a class attribute, with the supported signature types provided in the contructor:

```python from psygnal import Signal

class MyEmitter:

changed = Signal(int)

def receiver(arg: int):

print(“new value:”, arg)

emitter = MyEmitter() emitter.changed.connect(receiver) emitter.changed.emit(1) # prints ‘new value: 1’ ```

!!! note

in the example above, MyEmitter.changed is an instance of Signal, and emitter.changed is an instance of SignalInstance. See the documentation on [SignalInstance][psygnal.SignalInstance] for details on how to connect to and/or emit a signal on an instance of an object that has a Signal.

Parameters
  • *types (Union[Type[Any], Signature]) – A sequence of individual types, or a single [inspect.Signature][] object.

  • description (str) – Optional descriptive text for the signal. (not used internally).

  • name (Optional[str]) – Optional name of the signal. If it is not specified then the name of the class attribute that is bound to the signal will be used. default None

  • check_nargs_on_connect (bool) – Whether to check the number of positional args against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_nargs=True). By default, True.

  • check_types_on_connect (bool) – Whether to check the callback parameter types against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_types=True). By default, False.

sequenceCanceled#

Declares a signal emitter on a class.

This is class implements the [descriptor protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto) and is designed to be used as a class attribute, with the supported signature types provided in the contructor:

```python from psygnal import Signal

class MyEmitter:

changed = Signal(int)

def receiver(arg: int):

print(“new value:”, arg)

emitter = MyEmitter() emitter.changed.connect(receiver) emitter.changed.emit(1) # prints ‘new value: 1’ ```

!!! note

in the example above, MyEmitter.changed is an instance of Signal, and emitter.changed is an instance of SignalInstance. See the documentation on [SignalInstance][psygnal.SignalInstance] for details on how to connect to and/or emit a signal on an instance of an object that has a Signal.

Parameters
  • *types (Union[Type[Any], Signature]) – A sequence of individual types, or a single [inspect.Signature][] object.

  • description (str) – Optional descriptive text for the signal. (not used internally).

  • name (Optional[str]) – Optional name of the signal. If it is not specified then the name of the class attribute that is bound to the signal will be used. default None

  • check_nargs_on_connect (bool) – Whether to check the number of positional args against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_nargs=True). By default, True.

  • check_types_on_connect (bool) – Whether to check the callback parameter types against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_types=True). By default, False.

sequenceFinished#

Declares a signal emitter on a class.

This is class implements the [descriptor protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto) and is designed to be used as a class attribute, with the supported signature types provided in the contructor:

```python from psygnal import Signal

class MyEmitter:

changed = Signal(int)

def receiver(arg: int):

print(“new value:”, arg)

emitter = MyEmitter() emitter.changed.connect(receiver) emitter.changed.emit(1) # prints ‘new value: 1’ ```

!!! note

in the example above, MyEmitter.changed is an instance of Signal, and emitter.changed is an instance of SignalInstance. See the documentation on [SignalInstance][psygnal.SignalInstance] for details on how to connect to and/or emit a signal on an instance of an object that has a Signal.

Parameters
  • *types (Union[Type[Any], Signature]) – A sequence of individual types, or a single [inspect.Signature][] object.

  • description (str) – Optional descriptive text for the signal. (not used internally).

  • name (Optional[str]) – Optional name of the signal. If it is not specified then the name of the class attribute that is bound to the signal will be used. default None

  • check_nargs_on_connect (bool) – Whether to check the number of positional args against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_nargs=True). By default, True.

  • check_types_on_connect (bool) – Whether to check the callback parameter types against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_types=True). By default, False.

sequencePauseToggled#

Declares a signal emitter on a class.

This is class implements the [descriptor protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto) and is designed to be used as a class attribute, with the supported signature types provided in the contructor:

```python from psygnal import Signal

class MyEmitter:

changed = Signal(int)

def receiver(arg: int):

print(“new value:”, arg)

emitter = MyEmitter() emitter.changed.connect(receiver) emitter.changed.emit(1) # prints ‘new value: 1’ ```

!!! note

in the example above, MyEmitter.changed is an instance of Signal, and emitter.changed is an instance of SignalInstance. See the documentation on [SignalInstance][psygnal.SignalInstance] for details on how to connect to and/or emit a signal on an instance of an object that has a Signal.

Parameters
  • *types (Union[Type[Any], Signature]) – A sequence of individual types, or a single [inspect.Signature][] object.

  • description (str) – Optional descriptive text for the signal. (not used internally).

  • name (Optional[str]) – Optional name of the signal. If it is not specified then the name of the class attribute that is bound to the signal will be used. default None

  • check_nargs_on_connect (bool) – Whether to check the number of positional args against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_nargs=True). By default, True.

  • check_types_on_connect (bool) – Whether to check the callback parameter types against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_types=True). By default, False.

sequenceStarted#

Declares a signal emitter on a class.

This is class implements the [descriptor protocol](https://docs.python.org/3/howto/descriptor.html#descriptorhowto) and is designed to be used as a class attribute, with the supported signature types provided in the contructor:

```python from psygnal import Signal

class MyEmitter:

changed = Signal(int)

def receiver(arg: int):

print(“new value:”, arg)

emitter = MyEmitter() emitter.changed.connect(receiver) emitter.changed.emit(1) # prints ‘new value: 1’ ```

!!! note

in the example above, MyEmitter.changed is an instance of Signal, and emitter.changed is an instance of SignalInstance. See the documentation on [SignalInstance][psygnal.SignalInstance] for details on how to connect to and/or emit a signal on an instance of an object that has a Signal.

Parameters
  • *types (Union[Type[Any], Signature]) – A sequence of individual types, or a single [inspect.Signature][] object.

  • description (str) – Optional descriptive text for the signal. (not used internally).

  • name (Optional[str]) – Optional name of the signal. If it is not specified then the name of the class attribute that is bound to the signal will be used. default None

  • check_nargs_on_connect (bool) – Whether to check the number of positional args against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_nargs=True). By default, True.

  • check_types_on_connect (bool) – Whether to check the callback parameter types against signature when connecting a new callback. This can also be provided at connection time using connect(..., check_types=True). By default, False.

class PMDASignaler(*args, **kwargs)[source]#

Bases: Protocol

frameReady: pymmcore_plus.mda.events._protocol.PSignalInstance#
sequenceCanceled: pymmcore_plus.mda.events._protocol.PSignalInstance#
sequenceFinished: pymmcore_plus.mda.events._protocol.PSignalInstance#
sequencePauseToggled: pymmcore_plus.mda.events._protocol.PSignalInstance#
sequenceStarted: pymmcore_plus.mda.events._protocol.PSignalInstance#