Metadata-Version: 2.4
Name: py_coreDAQ
Version: 1.0.0
Summary: Python driver for the coreDAQ 4-channel optical power meter.
Author-email: Core Instrumentation <hello@coreinstrumentation.com>
License: MIT
Project-URL: Homepage, https://coreinstrumentation.com
Project-URL: Repository, https://github.com/coreinstrumentation/py_coreDAQ
Project-URL: Bug Tracker, https://github.com/coreinstrumentation/py_coreDAQ/issues
Keywords: optical power meter,photonics,coreDAQ,instrumentation,DAQ
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pyserial>=3.5
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# coreDAQ

`coreDAQ` is a smart photonic data acquisition system for optical power measurement, programmable capture, and Python-driven lab automation.

On initialization, the API configures the instrument to `500 Hz` sample rate and `OS 1`. You can change those global settings later with `set_sample_rate_hz(...)` and `set_oversampling(...)`.

The runtime ships with embedded InGaAs and silicon responsivity curves, defaults to watt readings, and exposes a clean package import:

```python
from py_coreDAQ import coreDAQ
```

## Install

```bash
pip install .
```

For editable local development:

```bash
pip install -e .
```

## Quick Start

```python
from py_coreDAQ import coreDAQ

with coreDAQ("/dev/tty.usbmodemXXXX") as meter:
    print(meter.identify())
    print(meter.frontend(), meter.detector())

    meter.set_wavelength_nm(1550.0)
    meter.set_reading_unit("w")
    power_w = meter.read_channel(0, n_samples=8)
    capture = meter.get_data(frames=1024, unit="w")

    print(power_w)
    print(capture.trace(0)[:5])
```

## Main User APIs

- `read_all()` and `read_channel()` for live powermeter readings
- `read_all_full()` and `read_channel_full()` when you want the full measurement object
- `get_data()` and `get_data_channel()` for DAQ traces, including `trigger=True` external-trigger capture
- `get_ranges()`, `get_range_all()`, `set_range()`, `set_range_power()`, and `set_ranges()`
- `capture_channel_mask()`, `set_capture_channel_mask()`, `capture_channels()`, and `set_capture_channels()` for DAQ masking
- `set_sample_rate_hz()` and `set_oversampling()` for global read settings
- `set_reading_unit("w" | "dbm" | "v" | "mv" | "adc")`
- `autoRange=True` by default on all `read*()` methods, with `autoRange=False` available for fixed-range reads
- `zero_dark()` and `restore_factory_zero()`
- `is_clipped()` and `signal_status()`

## Documentation Map

- [Quickstart](docs/quickstart.md): first read, first capture, and first trigger-based capture
- [Read Power](docs/readings.md): every `read*` method, `n_samples`, `autoRange`, and rich read fields
- [Capture Data](docs/capture.md): `get_data(...)`, `CaptureResult`, and capture status fields
- [Capture with External Trigger](docs/trigger.md): trigger-based capture workflows
- [Ranges and AutoRange](docs/ranges.md): range indices, power-based range selection, and autoRange behavior
- [Units, Sample Rate, and Oversampling](docs/settings.md): units, sample rate, oversampling, and recommended setups
- [Frames, Masking, and Memory Limits](docs/frames.md): capture masks, frame counts, and SDRAM limits
- [Zeroing and Signal Health](docs/zeroing.md): zeroing, clipping, and signal health checks
- [API Reference](docs/api-reference.md): grouped method signatures and examples

## Documentation

The docs site is configured for Read the Docs:

`https://py-coredaq.readthedocs.io/`
