Metadata-Version: 2.4
Name: cmtqoutilities
Version: 0.6.0
Summary: API for all cmtqo devices
Home-page: https://gitlab.phys.ethz.ch/code/experiment/mm-runexperiment
Author: Sebastian Huber
Author-email: huberse@phys.ethz.ch
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.18.0
Requires-Dist: requests>=2.25.0
Requires-Dist: scipy>=1.5.0
Requires-Dist: pyserial>=3.5
Requires-Dist: zaber.serial>=0.9
Requires-Dist: pymysql>=1.1.1
Requires-Dist: nbconvert>=7.0.0
Requires-Dist: nbformat>=5.0.0
Requires-Dist: jupyter>=1.1.1
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# cmtqoutilities

[![PyPI](https://img.shields.io/pypi/v/cmtqoutilities.svg)](https://pypi.org/project/cmtqoutilities/)

**cmtqoutilities** is a Python toolkit that provides high-level APIs to control and automate a diverse range of laboratory hardware devices used in quantum optics and condensed matter experiments. The package offers abstraction layers for devices such as pressure controllers, serial interfaces, positioning stages, databases, and data acquisition tools.

---

## 🚀 Key Features

- 🧪 **Experiment automation** through a unified `Operator` class
- 📡 **Instrument control** for Zaber actuators, Numato relays, Picoscope oscilloscopes, Atto IDS3010 sensors, and more
- 🧾 **Database integration** for logging and tracking experimental metadata
- 🗃️ **Filesystem and code snapshot utilities** for reproducible research
- ⚙️ **Cross-platform support** for Windows and Unix-like systems

---

## 🧱 Module Overview

### `modOp.py`
Defines the `Operator` class — a central controller for experiments, handling setup configuration, data and code paths, database connections, and version management.

### `database.py`
Handles experimental metadata logging, MySQL interactions, and retrieval of recent or historical experiment data.

### `pressureControl.py`
Provides an interface to communicate with pressure controllers over serial, supporting pressure reading and basic control commands.

### `zaber*.py`
Multiple modules to control Zaber linear actuators (LRQ600, LSQ150, etc.), supporting movement, homing, and axis configuration.

### `numatoLabRL002.py`
Enables control of Numato Lab USB relay modules for hardware switching tasks.

### `picoscope.py`, `ps4000a.py`
Modules for acquiring data from PicoTech oscilloscopes (e.g. PS4000 series), integrating with the experiment automation flow.

### `attoIDS3010.py`
Interface to Atto IDS3010 displacement sensors, providing sub-nanometer position measurement capabilities.

### `operatorManualSetup.py`
Support functions for setting up manual experimental configurations, such as pre-alignment or testing.

---

## 📦 Installation

The modop infrastructure to run experiments is optimally enabled in the following way: Create a virtual environment as
```bash
python -m venv ~/.ve/modop
```
Then activate it and install the `cmtqoutilities` package 
```bash
source ~/.ve/modop/bin/activate
pip install cmtqoutilities
```
or in a windows power shell
```bash
~/.ve/modop/Scripts/Activate.ps1
pip install cmtqoutilities
```
While still in the modop virtual environment install the kernel
```bash
python -m ipykernel install --user --name=modop --display-name "Python (modop)"
```
You can then develop in ipython notebooks and run the experiments with the mopdop infrastructure. 


Requires Python 3.8 or higher. Dependencies include `numpy`, `scipy`, `requests`, `pyserial`, `pymysql`, `nbconvert`, `jupyter`, and hardware-specific libraries.


