Skip to main content

Spectroscopy lock application using RedPitaya

Project description

Spectroscopy locking of lasers using RedPitaya (STEMlab 125-14) that just works. Linien aims to follow the UNIX philosophy of doing one thing very well. It is built with Python and Migen and is based on RED PID.

Features

  • All inclusive: Modulation (up to 50 MHz), demodulation, filtering and servo implemented on the FPGA.

  • Client-server architecture: Autonomous operation on RedPitaya. One or multiple GUI clients can connect to the server.

  • Autolock: Click and drag over a line, and linien will automatically approach it and lock to it.

  • Lock detection: linien is capable of detecting loss of lock.

  • Automatic relocking: in that case, it can relock automatically using the autolock.

  • Remote-controllable: The client libraries can be used to control or monitor the spectroscopy lock with python.

  • Combined FMS+MTS: Supports dual-channel spectroscopy that can be used to implement combined FMS+MTS

  • Logging: Use linien-influxdb to log the lock status to influxdb.

  • TTL status: Outputs the lock status via TTL

Getting started

Linien runs on Windows and Linux. It is written for python 3 and can be installed using python’s package manager pip:

pip3 install linien

Run the application by calling

linien

If this doesn’t work, your local bin directory (e.g. ~/.local/bin) is probably missing in your PATH. Alternatively you can open linien using python:

from linien.client.client import run_application
run_application()

Then, you can enter your RedPitaya’s credentials and connect. If you agree, linien’s server component is automatically installed.

Physical setup

Scriptable interface

Linien running on RedPitaya can not only be controlled using the GUI but also by python scripts.

from linien.client.connection import BaseClient, MHz, Vpp
c = BaseClient(host, 18862, False)

# read out the modulation frequency
print(c.parameters.modulation_frequency.value / MHz)

# set modulation amplitude
c.parameters.modulation_amplitude.value = 1 * Vpp
c.connection.root.write_data()

For a full list of parameters that can be controlled have a look at parameters.py.

Development

As linien uses a git submodule, you have to check it out like this:

git clone https://github.com/hermitdemschoenenleben/linien.git --recursive

To simplify development of the server component, its source code is automatically uploaded to the RedPitaya. For that, edit the VERSION file and replace it’s content with dev. Check that no server is running on the RedPitaya and start the client. Your development code should be uploaded to /linien and the linien server is started from that directory.

Fake server for testing the GUI:

python3 server/server.py --fake

Run server locally and control:

python3 server/server.py –remote-rp=root:password@rp-f0xxxx.local

For this, acquisition_process.py has to be started on the RedPitaya.

In order to build the FPGA image, use scripts/build_gateware.sh.

See Also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linien-0.0.12.tar.gz (334.5 kB view details)

Uploaded Source

Built Distribution

linien-0.0.12-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file linien-0.0.12.tar.gz.

File metadata

  • Download URL: linien-0.0.12.tar.gz
  • Upload date:
  • Size: 334.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for linien-0.0.12.tar.gz
Algorithm Hash digest
SHA256 12bf43f0be2c9d9a2490848b4badf9d4c0a200b108e12db73ec89589b4f3e281
MD5 90797795fdb3242bb75449e377575f2d
BLAKE2b-256 a4c87547dd5f8bd7cb01a60a534983983af47abe5cb3669147c8135b8f21447f

See more details on using hashes here.

File details

Details for the file linien-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: linien-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for linien-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 aa63419c4be8518ac7bef06126c4a3f0dd8826b4927537171e7bea225afb91f8
MD5 254e901470f3fa8fdf7ce6ca16dec7e8
BLAKE2b-256 a38b04cfa705642632fd237a146d1a8c388d8759b2bb9468e27a984837afb738

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page