nion-software / nionswift-instrumentation-kit

Base classes for Nion Swift STEM microscope instrumentation
GNU General Public License v3.0
1 stars 12 forks source link

Add generalized acquisition device and associated "hardware source" class #119

Open cmeyer opened 2 years ago

cmeyer commented 2 years ago

Notes from my generalized acquisition device plans.

A generalized acquisition device would be a device that could produce one or more streams of data in various arrangements. The idea is to eliminate the need for device implementers to subclass or implement their own HardwareSource (considered to be an internal class).

Examples would be:

The device would include control panels with components specific to the device to control the behavior.

A rough idea (see my local file AcquisitionDevice.py):

class ModeController(typing.Protocol):
    # is_continuous
    # is_interruptable?

    def begin_mode(self) -> None: ...

    def continue_mode(self) -> None: ...

    def end_mode(self) -> None: ...

    def cancel_mode(self) -> None: ...

class AcquisitionDevice(typing.Protocol):
    # device properties

    def close(self) -> None: ...

    def enter_mode(self, mode_name: str, mode_parameters: ModeParameters) -> ModeController: ...

Loose instructions to test a potential implementation

Note: original discussion personal notes on 2022-02-15

cmeyer commented 2 years ago
cmeyer commented 2 years ago

Private discussion:

cmeyer commented 2 years ago

Also: