Skip to content
Snippets Groups Projects
Commit 849ff557 authored by Tobias Hangleiter's avatar Tobias Hangleiter
Browse files

Type hints and formatting

parent 64d89968
Branches
Tags
2 merge requests!15Move daq/domains.py to qutil,!13Alazar driver (config2)
Pipeline #1029962 waiting for manual action
......@@ -266,17 +266,17 @@ class DAQSettings(dict):
# Override these to constrain parameters to certain sets allowed by hardware. An empty set
# means no restrictions.
ALLOWED_FS: BoundedSet[float] | Interval[float] = BoundedSet(precision=PRECISION)
ALLOWED_DF: BoundedSet[float] | Interval[float] = BoundedSet(precision=PRECISION)
ALLOWED_F_MAX: BoundedSet[float] | Interval[float] = BoundedSet(precision=PRECISION)
ALLOWED_F_MIN: BoundedSet[float] | Interval[float] = BoundedSet(precision=PRECISION)
ALLOWED_NOVERLAP: BoundedSet[int] | Interval[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_PTS: BoundedSet[int] | Interval[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_SEG: BoundedSet[int] | Interval[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_AVG: BoundedSet[int] | Interval[int] = BoundedSet(precision=PRECISION)
ALLOWED_FS: Domain[float] = BoundedSet(precision=PRECISION)
ALLOWED_DF: Domain[float] = BoundedSet(precision=PRECISION)
ALLOWED_F_MAX: Domain[float] = BoundedSet(precision=PRECISION)
ALLOWED_F_MIN: Domain[float] = BoundedSet(precision=PRECISION)
ALLOWED_NOVERLAP: Domain[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_PTS: Domain[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_SEG: Domain[int] = BoundedSet(precision=PRECISION)
ALLOWED_N_AVG: Domain[int] = BoundedSet(precision=PRECISION)
@property
def ALLOWED_NPERSEG(self) -> BoundedSet[int] | Interval[int]:
def ALLOWED_NPERSEG(self) -> Domain[int]:
return self.ALLOWED_N_PTS
def _lower_bound_fs(self) -> float:
......
......@@ -3,8 +3,8 @@ from unittest.mock import MagicMock
import pytest
from python_spectrometer.daq import DAQSettings
from python_spectrometer.daq.settings import ResolutionError
from python_spectrometer.daq.zurich_instruments import (
ZurichInstrumentsMFLIDAQ, ZurichInstrumentsMFLIScope)
from python_spectrometer.daq.zurich_instruments import (ZurichInstrumentsMFLIDAQ,
ZurichInstrumentsMFLIScope)
from qutil import itertools
from zhinst import toolkit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment