Metadata-Version: 2.4
Name: zhinst-timing-models
Version: 26.4.0
Summary: Feedback Data Latency model for PQSC, SHF- and HDAWG systems.
Author-email: Zurich Instruments <info@zhinst.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: zhinst
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Requires-Dist: numpy>=1.14
Requires-Dist: pyyaml>=6.0.1
Description-Content-Type: text/markdown

# Feedback Latency Model Parameters

[![PyPI - Version](https://img.shields.io/pypi/v/zhinst-timing-models.svg)](https://pypi.org/project/zhinst-timing-models)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/zhinst-timing-models.svg)](https://pypi.org/project/zhinst-timing-models)

-----

Feedback Data Latency model for PQSC, SHF- and HDAWG systems.

**Table of Contents**

- [Feedback Latency Model Parameters](#feedback-latency-model-parameters)
  - [Installation](#installation)
  - [Usage](#usage)
  - [License](#license)

## Installation

```console
pip install zhinst-timing-models
```

## Usage

```python
from zhinst.timing_models import (
    PQSCMode,
    QAType,
    QCCSFeedbackModel,
    SGType,
    TriggerSource,
    get_feedback_system_description,
)

model = QCCSFeedbackModel(
    description=get_feedback_system_description(
        generator_type=SGType.HDAWG,
        analyzer_type=QAType.SHFQA,
        pqsc_mode=PQSCMode.DECODER,
        trigger_source=TriggerSource.ZSYNC,
        )
    )
awg_clock_cycles = model.get_latency(...)
```

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency management. The `uv.lock` file pins the exact versions of all (direct and transitive) dependencies.

```console
# Install the project with dev dependencies (test + lint)
uv sync --group dev

# Run the test suite
uv run pytest tests

# Run the linters
uv run ruff check .
uv run black --check --diff .
uv run mypy --ignore-missing-imports --explicit-package-bases -p zhinst.timing_models

# Build the wheel/sdist
uv build
```

To update the lock file after changing dependencies in `pyproject.toml`:

```console
uv lock
```

## License

`zhinst-timing-models` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
