Metadata-Version: 2.4
Name: digipigi
Version: 1.0.0b2
Summary: API to use the digipigi
Home-page: https://gitlab.phys.ethz.ch/cmtqo-projects/delicate/digipigi
Author: Sebastian Huber
Author-email: huberse@phys.ethz.ch
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.18.0
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# README

## Installation

`pip install digipigi`

## How to use and characteristics

The digipigi can be used via the module `digipigi`.

The usage is very simple:
```
import digipigi
help(digipigi.DigiPigi)
dp=digipigi.DigiPigi(HOST='hostname')
att=dp.setAttenuation(0)
```
This sets the digipot to attenuate the singal by a factor `att`.

In order to give a feeling for the performance of the digipigi, we provide here a plot of the attenuation factor as calibrated for a DC input signal:

![DC Calibration](dc.png)

For three wiper positions we also show the time trace of attenuated square wave signal:

![AC Calibration](ac.png)

The irregular square wave in the 10 kHz panels was an acquisition bug in the old calibration script (record longer than the AD2 buffer); it is fixed. These figures are from hat rev A.

## Installation of pip package:

First `pip install build` and `pip install twine`. Then set the environment variables`
```
export TWINE_USERNAME="__token__"
export TWINE_PASSWORD="API_KEY" 
```
Then build the package while you are in the driectory [resources/python/digipigi/](resources/python/digipigi)
```
python -m build
```
Then upload the package to your PyPi accounty by 
```
twine upload dist/* --non-interactive
```

