A tool to measure pictures with scale_bars
Project description
Spectran
A simple spectrum analyzer. Read a voltage signal and do a spectral analysis.
Usage
Installation and Execution
Install via
pip install spectran
Run via
import spectran
spectran.run()
or in terminal
python -m spectran
Workflow
- First, select driver and device and click connect. This connects the device.
- Then, select all other options like sample_rate, input_channel, etc.
- Finally, start the measurement by clicking on
Start Measurement
.
API Connection
It is possible to remotely control most of Spectran's features via an API. Default Host is 127.0.0.1
on port 8111
.
A detailed example can be found in this example.
First, the connection to the API has to be set up:
api = API_Connection()
Afterwards one can set up devices and measurements:
api.connect_device("DummyDAQ", 'Dev1')
CONFIG = {
"input_channel": "ai0",
"sample_rate": 50_000 * ureg.Hz,
"duration": 0.05 * ureg.second,
"averages": 4,
"signal_range_min": -3 * ureg.volt,
"signal_range_max": 3 * ureg.volt,
"unit": "Volt",
}
api.set_config(CONFIG)
# start the measurement
api.start_measurement()
# this waits for the measurement to finish
api.wait_for_measurement()
# this saves the data to a file
api.save_file(f"data.txt")
Development
Spectran is written to provide extensive possibilities for extension. Just extend the spectran.daq.DAQ
class for a new driver and implement all necessary functions.
Install module into environment
pip install -e .[dev]
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
Built Distribution
File details
Details for the file spectran-0.3.0.tar.gz
.
File metadata
- Download URL: spectran-0.3.0.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7af8e9fe3146bf7591cc43b2d181ed3a1ad4a94532645d8c5f8da2d54fe4b3 |
|
MD5 | 9199b5c353ca7d5d3749846c9660697a |
|
BLAKE2b-256 | cf94add006206b6121a88a0e02780ab937bb3c76486c42d956df5905d06a1885 |
File details
Details for the file spectran-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: spectran-0.3.0-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00d8e0e08c9fd9ab975263ed9fdcd103cb9965a20b06afc148ed1b4bf8da0107 |
|
MD5 | 5249f6ead5cb825eb36fdc851c25818e |
|
BLAKE2b-256 | a1d500b7c3a17dbd458c0c2ad2ab53d7ef0276ed85b0f36fac5a1625a287623d |