Spektralwerk SCPI communication library
Project description
spektralwerk_scpi_client
spektralwerk_scpi_client is a Python library for communicating with Spektralwerk NIR spectrometers via their SCPI interface.
The library supports all available configuration settings as well as the retrieval of spectral data.
The API supports two ways of obtaining spectra:
- single spectrum mode: returns a single spectrum upon request. Intended for use cases like exploratory spectroscopy in the lab or requests triggered by the trigger in interface
- streaming streaming mode: returns a continuous stream of spectral information. Intended for process analytics, in-line spectrometry in production and other situations demanding very high sample rates.
Supported Devices
- Spektralwerk Core
- set/get exposure time
- set/get average number
- set/get offset voltage
- set/get light and dark reference spectrum
- get pixel count and wavelengths array of the spectrometer
- get single/averaged raw spectrum and continuous emisison of spectra
- configuration of processing steps
- set/get output format of the Spektralwerk Core
- set/get the number of emitted spectra
- set/get region-of-interest
- set/get binning width
Requirements
- Python3
- hatch for development (e.g.
pipx install hatch) - bump-my-version for semantic verioning
Usage
spektralwerk-scpi-client is available via PyPI. To install spektralwerk-scpi-client use pip:
pip install spektralwerk-scpi-client
Example Usage
An example can be found in the examples directory.
export SCPI_HOST="<hostname or IP>"
export SCPI_PORT="<port number>"
hatch run examples:spw_core_demo
Development
bump-my-version for increasing version of spektralwerk-scpi-client.
The configuration of bump-my-version is located in .bumpversion.toml and pyproject.toml.
To increase the version these commands can be used:
# Create a new release.
hatch run version {major|minor|patch}
License
spektralwerk_scpi_client is distributed under the terms of the MIT license.
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 spektralwerk_scpi_client-0.5.1.tar.gz.
File metadata
- Download URL: spektralwerk_scpi_client-0.5.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20af840ec823edbcb8b27620e7e23c911baf42e554a9653653bc84414773222c
|
|
| MD5 |
96fc4fbbb8327f1e8dc5471455f8e7f7
|
|
| BLAKE2b-256 |
fbe094e1415236388d5aa44d127d35562077a5664924adabcbe3429d5abbb61d
|
Provenance
The following attestation bundles were made for spektralwerk_scpi_client-0.5.1.tar.gz:
Publisher:
pypi-publish.yml on silicann/spektralwerk-scpi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spektralwerk_scpi_client-0.5.1.tar.gz -
Subject digest:
20af840ec823edbcb8b27620e7e23c911baf42e554a9653653bc84414773222c - Sigstore transparency entry: 1459874957
- Sigstore integration time:
-
Permalink:
silicann/spektralwerk-scpi-client@eb2a6156d972e7ed8173be690cf728b659215af0 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/silicann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@eb2a6156d972e7ed8173be690cf728b659215af0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spektralwerk_scpi_client-0.5.1-py3-none-any.whl.
File metadata
- Download URL: spektralwerk_scpi_client-0.5.1-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a80add183daf218ca8da1317c42b630ba06347d4154087c58382a909a63a2462
|
|
| MD5 |
64c1fe24de78508ec321ba6ae1a9cdb8
|
|
| BLAKE2b-256 |
32654a96e7b559ab62197ce953c16a64f3df638384cf5fd5e875be76e3f00b5e
|
Provenance
The following attestation bundles were made for spektralwerk_scpi_client-0.5.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on silicann/spektralwerk-scpi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spektralwerk_scpi_client-0.5.1-py3-none-any.whl -
Subject digest:
a80add183daf218ca8da1317c42b630ba06347d4154087c58382a909a63a2462 - Sigstore transparency entry: 1459875070
- Sigstore integration time:
-
Permalink:
silicann/spektralwerk-scpi-client@eb2a6156d972e7ed8173be690cf728b659215af0 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/silicann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@eb2a6156d972e7ed8173be690cf728b659215af0 -
Trigger Event:
release
-
Statement type: