magscope.processes#
Attributes#
Classes#
Metaclass for defining Abstract Base Classes (ABCs). |
|
Abstract base class for processes in the MagScope |
Module Contents#
- class magscope.processes.InterprocessValues[source]#
- video_process_busy_count: ValueTypeUI8[source]#
- live_profile_enabled: ValueTypeUI8[source]#
- class magscope.processes.SingletonABCMeta[source]#
Bases:
abc.ABCMeta,SingletonMetaMetaclass for defining Abstract Base Classes (ABCs).
Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as ‘virtual subclasses’ – these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won’t show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).
- class magscope.processes.ManagerProcessBase[source]#
Bases:
multiprocessing.Process,abc.ABCAbstract base class for processes in the MagScope
Subclass requirements: * Each subclass should have a unique name. * There should only be one instance of each subclass (singleton). * The class name is used for consistent inter-process identification.
- _acquisition_mode: magscope.utils.AcquisitionMode[source]#
- bead_roi_buffer: magscope.datatypes.BeadRoiBuffer | None = None[source]#
- camera_type: type[magscope.camera.CameraBase] | None = None[source]#
- hardware_types: dict[str, type[magscope.hardware.HardwareManagerBase]][source]#
- live_profile_buffer: magscope.datatypes.LiveProfileBuffer | None = None[source]#
- tracks_buffer: magscope.datatypes.MatrixBuffer | None = None[source]#
- video_buffer: magscope.datatypes.VideoBuffer | None = None[source]#
- _command_registry: magscope.ipc.CommandRegistry | None = None[source]#
- _command_handlers: dict[type[magscope.ipc_commands.Command], str][source]#
- property quitting_event: multiprocessing.synchronize.Event[source]#
Event set when this process has begun quitting.
Attach shared references provided by
MagScope.This centralizes initialization so callers do not need to mutate underscored attributes directly when preparing processes before
start()is invoked.
- run()[source]#
Start the process when
start()is called.Subclasses should create a main loop that calls
receive_ipc()last:while self._running: # do other stuff self.receive_ipc()
- send_ipc(command: magscope.ipc_commands.Command)[source]#
- set_acquisition_mode(mode: magscope.utils.AcquisitionMode)[source]#
- set_settings(settings: magscope.settings.MagScopeSettings)[source]#