This Python package allows the configuration and readout of the TeraFlash Pro THz spectrometer. Use at own risk.
Project description
TeraFlash Pro Python Package
This code is developed by the University of Bern and is no official product of Toptica Photonics AG.
This Python Package allows the configuration and readout of the TeraFlash Pro THz spectrometer.
The TCP communication protocol is probably incomplete and features may be missing as it was reverse engineered using
wireshark. The scanning stage is not supported but a list of other features is.
This is a simple library with no persistence settings (the configurations of the previous run will not be stored when the python session is closed). A complete GUI written in Rust is also available here.
Features:
- Select begin time for the time window
- Select range
- Select average
- Start/Stop Laser
- Start/Stop Emitters
- Start/Stop Acquisition
- Set transmission
- Set motion mode
- Set channel
- Get status
- Get data (time domain and frequency domain)
- auto pulse detection function
- Set antenna range
- ...
I. Installation
Download from PyPi:
pip install teraflash-ctrl
II. Taking a measurement
When connected to the device, you can turn on the laser and then the emitter.
After starting the acquisition, new data should be continuously updated and the most recent dataset can be obtained using device.get_data():
from teraflash import TeraFlash
if __name__ == "__main__":
ip = "169.254.84.101"
with TeraFlash(ip) as device:
print(device.get_status())
device.set_laser(True)
device.set_emitter(1, True)
device.set_acq_start()
print(device.get_data())
Always use the context manager to ensure that the connection is properly closed upon exiting!
Consult the example.py for usage.
Disclaimer: This package is provided on a best effort basis with no guarantee as to the functionality and correctness. Use at your own risk. Users are encouraged to contribute by submitting issues and/or pull requests for bug reporting or feature requests.
Copyright (c) 2026 University of Bern, Space Research & Planetary Sciences, Linus Leo Stöckli.
This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc/4.0/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teraflash_ctrl-1.4.3.tar.gz.
File metadata
- Download URL: teraflash_ctrl-1.4.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5d9fe518e15407a950292031404299bfe7ac68b9e59abcfd00c28636ef64a57
|
|
| MD5 |
deabe3173a5b4d1eb3b34a2ba0c6ea2d
|
|
| BLAKE2b-256 |
d2397a2c9f59a235e5d1e03c53abf387900b6b7f4e62408848d83dadaad3da4d
|
Provenance
The following attestation bundles were made for teraflash_ctrl-1.4.3.tar.gz:
Publisher:
publish.yml on unibe-icelab/teraflash-ctrl-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teraflash_ctrl-1.4.3.tar.gz -
Subject digest:
a5d9fe518e15407a950292031404299bfe7ac68b9e59abcfd00c28636ef64a57 - Sigstore transparency entry: 1247113595
- Sigstore integration time:
-
Permalink:
unibe-icelab/teraflash-ctrl-python@048732b4e17c054070f699053c6daa0e227aa79c -
Branch / Tag:
refs/tags/1.4.3 - Owner: https://github.com/unibe-icelab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@048732b4e17c054070f699053c6daa0e227aa79c -
Trigger Event:
release
-
Statement type:
File details
Details for the file teraflash_ctrl-1.4.3-py3-none-any.whl.
File metadata
- Download URL: teraflash_ctrl-1.4.3-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7a35509f61a90f54a56861a6885e819762059841ce5fc38ea73d0d17513aa53
|
|
| MD5 |
e89848074c4665f7496ca0c6fbded9a5
|
|
| BLAKE2b-256 |
5dc38efe73d72243e9ddd4633d5022103305c5451734dc80b7f956b82124df07
|
Provenance
The following attestation bundles were made for teraflash_ctrl-1.4.3-py3-none-any.whl:
Publisher:
publish.yml on unibe-icelab/teraflash-ctrl-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
teraflash_ctrl-1.4.3-py3-none-any.whl -
Subject digest:
a7a35509f61a90f54a56861a6885e819762059841ce5fc38ea73d0d17513aa53 - Sigstore transparency entry: 1247113608
- Sigstore integration time:
-
Permalink:
unibe-icelab/teraflash-ctrl-python@048732b4e17c054070f699053c6daa0e227aa79c -
Branch / Tag:
refs/tags/1.4.3 - Owner: https://github.com/unibe-icelab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@048732b4e17c054070f699053c6daa0e227aa79c -
Trigger Event:
release
-
Statement type: