Metadata-Version: 2.5
Name: thzdaq-instruments
Version: 0.0.6b10
Summary: Laboratory instrument drivers, transports and simulators for ThzDAQ
Project-URL: Homepage, https://github.com/yarvod/ThzDAQ
Project-URL: Documentation, https://github.com/yarvod/ThzDAQ/blob/master/docs/daemon.md
Project-URL: Issues, https://github.com/yarvod/ThzDAQ/issues
Project-URL: Releases, https://github.com/yarvod/ThzDAQ/releases
Author: yarvod
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Requires-Dist: pymodbus<3.9,>=3.8
Requires-Dist: pyserial>=3.5
Requires-Dist: requests>=2.31
Provides-Extra: visa
Requires-Dist: pyvisa>=1.13; extra == 'visa'
Description-Content-Type: text/markdown

# thzdaq-instruments

Instrument layer of ThzDAQ without any GUI dependency:

- `capabilities` — small interfaces by instrument ability (`Switchable`, `VoltageSource`,
  `FrequencySource`, `PowerDetector`, ...). Measurements depend on these, not on vendors.
- `transport` — message links (TCP socket, serial), Prologix GPIB addressing, a pool that shares
  one physical connection between instruments and serializes access with a lock.
- `instrument` — `Instrument`, `ScpiInstrument` and `Channel` base classes.
- `registry` — driver catalog: key → class, capabilities are derived from the class.
- `drivers` — Rigol DP832A, R&S HMP2030 / NRX / ZVA67 / FSEK30, Keithley 2200,
  Agilent E8247C, Scontel SIS block, NI YIG (HTTP), Modbus chopper, LakeShore 336,
  SRS SR830, Sumitomo F-70 (RS-232 and REST), Pfeiffer TC 110 and gauges (RS-485),
  Arduino wire grid.
- GPIB through Prologix Ethernet/USB, or any VISA resource with the `visa` extra
  (`pip install thzdaq-instruments[visa]`).
- `sim` — simulators for every capability, used for tests and running without hardware.

```python
from thzdaq_instruments import default_registry
from thzdaq_instruments.drivers import RigolDP832A

registry = default_registry()
supply = registry.open("rigol.dp832a", RigolDP832A.connection("169.254.0.14"))
if_switch = supply.channel(2)          # Switchable + VoltageSource + ...
if_switch.set_output(True)
supply.close()

sim = registry.open("rigol.dp832a", simulate=True)  # same shape, no hardware
```

Units: SI everywhere (Hz, V, A, K, s), power in dBm.

```bash
uv run --package thzdaq-instruments pytest packages/thzdaq-instruments
```
