Skip to content

Commit

Permalink
#50 hotfix update API doc front page
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbaker committed Jan 24, 2024
1 parent 1af0930 commit fd02e37
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/spectrumdevice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"AbstractSpectrumDevice",
"AbstractSpectrumChannel",
"settings",
"features",
"Measurement",
"SpectrumAWGCard",
"MockSpectrumAWGCard",
Expand Down
4 changes: 4 additions & 0 deletions src/spectrumdevice/devices/awg/awg_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@


class SpectrumAWGIOLine(AbstractSpectrumIOLine, SpectrumAWGIOLineInterface):
"""Class for controlling Multipurpose IO lines of an AWG (e.g. X0, X1, X2 and X3)"""

def __init__(self, parent_device: AbstractSpectrumCard, **kwargs: Any) -> None:
if parent_device.type != CardType.SPCM_TYPE_AO:
raise SpectrumCardIsNotAnAWG(parent_device.type)
Expand All @@ -55,6 +57,8 @@ def _get_io_line_mode_settings_mask(self, mode: IOLineMode) -> int:


class SpectrumAWGAnalogChannel(AbstractSpectrumAnalogChannel, SpectrumAWGAnalogChannelInterface):
"""Class for controlling analog channels of an AWG."""

def __init__(self, parent_device: SpectrumAWGInterface, **kwargs: Any) -> None:
if parent_device.type != CardType.SPCM_TYPE_AO:
raise SpectrumCardIsNotAnAWG(parent_device.type)
Expand Down
2 changes: 2 additions & 0 deletions src/spectrumdevice/devices/digitiser/digitiser_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@


class SpectrumDigitiserIOLine(AbstractSpectrumIOLine, SpectrumDigitiserIOLineInterface):
"""Class for controlling multipurpose IO lines of a digitiser, e.g. X0, X1, X2 and X3."""

def __init__(self, parent_device: AbstractSpectrumCard, **kwargs: Any) -> None:
if parent_device.type != CardType.SPCM_TYPE_AI:
raise SpectrumCardIsNotADigitiser(parent_device.type)
Expand Down
2 changes: 2 additions & 0 deletions src/spectrumdevice/devices/mocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def wait_for_acquisition_to_complete(self) -> None:


class MockSpectrumAWGCard(MockAbstractSpectrumAWG, MockAbstractSpectrumCard, SpectrumAWGCard):
"""A mock AWG card."""

def __init__(
self,
device_number: int,
Expand Down
10 changes: 10 additions & 0 deletions src/spectrumdevice/features/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Provides Enums and Dataclasses wrapping the register values provided by the Spectrum API, to be used for configuring
hardware and interpreting responses received from hardware."""

# Christian Baker, King's College London
# Copyright (c) 2024 School of Biomedical Engineering & Imaging Sciences, King's College London
# Licensed under the MIT. You may obtain a copy at https://opensource.org/licenses/MIT.

from .pulse_generator.pulse_generator import PulseGenerator

__all__ = ["PulseGenerator"]

0 comments on commit fd02e37

Please sign in to comment.