Metadata-Version: 2.4
Name: constellation-core
Version: 0.0.0.dev0
Summary: Modular instrument control and lab access via Python
Author-email: Grant Giesbrecht <grant.giesbrecht@colorado.edu>
License-Expression: BSD-2-Clause
Project-URL: Homepage, https://github.com/Grant-Giesbrecht/constellation
Project-URL: Issues, https://github.com/Grant-Giesbrecht/constellation/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.0.0
Requires-Dist: pyvisa>=1.0.0
Requires-Dist: pylogfile>=0.3.0
Requires-Dist: h5py>=3.11.0
Requires-Dist: colorama>=0.4.0
Requires-Dist: pyfrost-network>=0.0.0.dev0
Requires-Dist: tabulate>=0.9.0
Requires-Dist: zhinst>=24.0.0
Requires-Dist: jarnsaxa>=0.0.0
Requires-Dist: pyvicp>=1.0.0
Dynamic: license-file

<h1 align="center">
<img src="https://github.com/Grant-Giesbrecht/constellation/blob/main/docs/images/constellation_logo.png?raw=True" width="500">
</h1><br>

Constellation is a package for simplifying instrument control. It is designed to build
off of libraries like [pyvisa](https://github.com/pyvisa/pyvisa) and [pyvisa-py](https://github.com/pyvisa/pyvisa-py)
and provide a complete ecosystem for instrument automation. As a brief example of
what this can look like in its simplest form, here's an example script which 
connects to an instrument, resets it, then adjusts and reads some basic settings:

``` Python
from constellation.all import *

# Create log object
log = plf.LogPile()

# Create NRX Driver
nrx = RohdeSchwarzNRX("TCPIP0::192.168.0.10::INSTR", log)

# Preset device
nrx.preset()

# Get meas frequency
nrx.set_meas_frequency(1e9)
fmeas = nrx.get_meas_frequency()
```

One of the key components of Constellation is a set of instrument drivers, one of which,
the `RohdeSchwarzNRX` class, was seen above. However, Constellation is more than just
a collection of driver classes. Some of its key features include:

- **Instrument API standardization:** Drivers inherit from category classes, guaranteeing
that all instruments of the same category (ie. all oscilloscopes) will share a common
API.
- **Networking:** In addition to directly connecting to and interfacing with your
instruments, you can optionally use Constellation's networking classes to remotely access
your instruments. This works by connecting multiple clients to a single server program
over an AES-encrypted network. Typically one client would interface with the instrument 
drivers, while the other clients can be used to monitor or adjust experiments remotely.
- **Autmoatic Rich Logging:** Because Constellation's core use-case concerns scientific experiments,
robust and thorough logging is crucial. Constellation automates this via the [pylogfile](https://pypi.org/project/pylogfile/)
library and records every command sent to the instruments. Logs can be saved in the binary and open-source HDF format, which can be viewed and analyzed usign the `lumberjack` command line tool.
- **Ease of Creating New Drivers:** The instrument category classes automate much of the 
work involved in creating a driver, meaning you only need to focus on finding the right
SCPI commands to create any new drivers you need.
- **(Work in progress) GUIs:** GUI widgets for specific instrument categories make it easy to control 
or monitor your experiments.

# Installation

Constellation can be installed via pip using 

```
pip install constellation-py
```

# TODO

### Technical detail: Category system and Drivers

- How the categories work, with 0-n
- How they use ABCs to force correct usage
- They inherit RemoteInstrument so without the end user paying attention, they can be used across a network!

Include graphic of cateogry system, including remote access, drivers and GUIs.

### Instrument Control Example

TODO = basic example

## Networking

### Technical Detail: Networking

- Mention TCPIP, AES, passwords, automatically setup database and server.
- Mention PyFrost (WIP)

### Networking Example

TODO = Networking example

### List of included drivers

[Read The Docs](https://constellation-py.readthedocs.io/en/latest/)

[PyPI](https://pypi.org/project/constellation-py/)
