Documentation

Everything you need to get started with gDAQ

Introduction

Under Construction

Installation

Under Construction

Quick Start

Under Construction

Python Extensions

Creating a Custom Action and Instrument
from pygdaq import instrument, action

@action("Rolling Average")
def rolling_average(last_ten_values: list[float]) -> float:
    average = sum(last_ten_values) / len(last_ten_values)
    return average

@instrument("My Instrument")
class MyInstrument:
    port: int
    connection: SomeInstrumentConn

    def __init__(self, port: int):
        self.port = port

    @instrument.read
    def my_read_method(self) -> float:
        result = self.connection.read(port)
        return result

    @instrument.write
    def my_write_method(self, value: float) -> None:
        self.connection.write(value)

    @instrument.custom("My Custom Method")
    def my_custom_method(self, value: float, other_value: float) -> None:
        self.connection.do_something(value, other_value)

Next Steps

Under Construction