magscope.python_microscope#
Classes#
Base class for hardware managers backed by python-microscope devices. |
|
Focus motor adapter for a python-microscope stage or stage axis. |
|
Camera adapter for python-microscope devices and device-server URIs. |
|
Concrete alias for users who only need the connection helper mixin. |
Module Contents#
- class magscope.python_microscope.PythonMicroscopeHardwareManagerBase(*, device: Any | None = None, device_factory: collections.abc.Callable[[], Any] | None = None, device_uri: str | None = None, device_getter: collections.abc.Callable[[Any], Any] | None = None)[source]#
Bases:
_PythonMicroscopeDeviceMixin,magscope.hardware.HardwareManagerBase,abc.ABCBase class for hardware managers backed by python-microscope devices.
- class magscope.python_microscope.PythonMicroscopeFocusMotor(*, axis_name: str = 'z', device: Any | None = None, device_factory: collections.abc.Callable[[], Any] | None = None, device_uri: str | None = None, device_getter: collections.abc.Callable[[Any], Any] | None = None, position_scale: float = 1.0)[source]#
Bases:
_PythonMicroscopeDeviceMixin,magscope.hardware.FocusMotorBaseFocus motor adapter for a python-microscope stage or stage axis.
- class magscope.python_microscope.PythonMicroscopeCamera(*, width: int, height: int, dtype: numpy.dtype, bits: int, nm_per_px: float, settings_map: collections.abc.Mapping[str, str] | None = None, readout_transform: tuple[bool, bool, bool] | None = None, device: Any | None = None, device_factory: collections.abc.Callable[[], Any] | None = None, device_uri: str | None = None, device_getter: collections.abc.Callable[[Any], Any] | None = None)[source]#
Bases:
_PythonMicroscopeDeviceMixin,magscope.camera.CameraBaseCamera adapter for python-microscope devices and device-server URIs.
- connect(video_buffer) None[source]#
Attempts to connect to the camera.
But does not start an acquisition. This method should set the value of self.is_connected to True if successful or False if not.
- fetch() None[source]#
Checks if the camera has new images.
If the camera has a new image, then it holds the camera’s buffered image in a queue (self.camera_buffers). And stores the image and timestamp in the video buffer (self._video_buffer).
The timestamp should be the seconds since the unix epoch: (January 1, 1970, 00:00:00 UTC)
- class magscope.python_microscope.PythonMicroscopeHardwareManager(*, device: Any | None = None, device_factory: collections.abc.Callable[[], Any] | None = None, device_uri: str | None = None, device_getter: collections.abc.Callable[[Any], Any] | None = None)[source]#
Bases:
PythonMicroscopeHardwareManagerBaseConcrete alias for users who only need the connection helper mixin.