Metadata-Version: 2.4
Name: ldcon
Version: 0.2.2
Summary: Laser operations, physical owners and fleet presentation
Author: FanHarvard contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/FanHarvard/ldcon
Project-URL: Repository, https://github.com/FanHarvard/ldcon
Project-URL: Issues, https://github.com/FanHarvard/ldcon/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Operating System :: POSIX :: Linux
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: experiment-core==0.1.0
Requires-Dist: numpy>=1.24
Requires-Dist: PyYAML<7,>=6
Provides-Extra: agents
Requires-Dist: fanharvard-agentbridge==0.1.0; extra == "agents"
Provides-Extra: instruments
Requires-Dist: pyvisa>=1.15; extra == "instruments"
Requires-Dist: pyvisa-py>=0.8; extra == "instruments"
Requires-Dist: pyusb>=1.2; extra == "instruments"
Requires-Dist: websocket-client<2,>=1.8; extra == "instruments"
Provides-Extra: web
Requires-Dist: fastapi<1,>=0.115; extra == "web"
Requires-Dist: uvicorn<1,>=0.30; extra == "web"
Requires-Dist: httpx<1,>=0.27; extra == "web"
Requires-Dist: websockets<18,>=15; extra == "web"
Provides-Extra: analysis
Requires-Dist: scipy>=1.10; extra == "analysis"
Dynamic: license-file

<img src="https://raw.githubusercontent.com/FanHarvard/ldcon/main/docs/icon.png" alt="LDCon: an agent guiding a laser feedback loop" width="64" height="64">

# LDCon

**Still in active development.**

Laser locking, characterization and a Web dashboard. **ECDL and DFB/DBR control
are implemented**, with digital-servo PI control and TOPTICA DLCpro adapters.

```sh
pip install "ldcon[web,instruments,analysis]"
ldcon-simulate --mode deterministic
ldcon-examples ./my-lab
```

Python 3.10+ on Linux. `experiment-core` installs automatically. Optional agent
messaging: `pip install "ldcon[agents]"` (installs `fanharvard-agentbridge`).
Provider CLIs and their authentication are separate.

Supported agent interfaces: **Claude Code, Codex and OpenCode**, with a DeepSeek
Harness adapter for card tasks.

**Agents** monitor results, diagnose problems and run bounded characterization,
parameter tuning and recovery through registered control cards. **Humans** choose
the experiment, target, hardware configuration and physical safety limits, and
authorize safety-relevant changes. The fast feedback loop runs on the controller;
the agent is not the real-time servo.

**Locking and quality:** wavemeter feedback drives PI control of ECDL piezo or
DFB/DBR current; slower temperature/current corrections and feedforward are
available where configured. Quality is reported using frequency error/stability,
mode hops, position-independent fringe secondary peaks/width and dither response.
Missing data remains unknown; quality labels are distinct from physical safety.

| Configuration | Hardware |
| --- | --- |
| ECDL / digital servo | Wavemeter and data feed, compatible digital servo/DAC, piezo driver, current/TEC controllers and supported AWGs (e.g. Siglent SDG) |
| DFB/DBR | Wavemeter, current/TEC controller (e.g. Thorlabs CLD1015); compatible digital servo/DAC and modulation input for native current PI |
| ECDL / DLCpro | TOPTICA DLCpro, wavemeter feedback; AWG/trigger connections for configured feedforward scans |
| Spectral quality / studies | Fringe image source for secondary-peak analysis; scope/telemetry and AWG where required by the selected measurement |

For digital-servo hardware and integration details, please contact
[kenjishu@fas.harvard.edu](mailto:kenjishu@fas.harvard.edu).

Tests use simulations, fake instruments and loopback services to cover control
contracts, owner exclusivity, uncertain writes, cancellation/recovery, tuning,
sweeps, configuration, quality reporting and Web behavior. They do not certify
a new physical setup. See [test suite](tests/).

[Bundled examples](src/ldcon/resources/examples/) include Sr422, Sr1092 and ThF685
laser definitions, decks and assignments, with output disabled and placeholder
connections. Installation starts no hardware or service and includes no credentials.
[Publishing](docs/publishing.html) · [MIT license](LICENSE)

FanHarvard site configuration and deployment: [ldcon-fanharvard](https://github.com/FanHarvard/ldcon-fanharvard).
