Skip to main content

Spektralwerk SCPI communication library

Project description

spektralwerk_scpi_client

style and lint Upload to PyPI

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 raw spectrum and averaged raw spectrum

Requirements

  • Python3
  • hatch for development (e.g. pipx install hatch)

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 SPW_HOST="<hostname or IP>"
export SPW_PORT="<port number>"
hatch run examples:spw_core_demo

License

spektralwerk_scpi_client is distributed under the terms of the MIT license.

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

spektralwerk_scpi_client-0.3.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spektralwerk_scpi_client-0.3.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file spektralwerk_scpi_client-0.3.0.tar.gz.

File metadata

File hashes

Hashes for spektralwerk_scpi_client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 141ad4a4004b69d7f80d8de361f1a769a98ae72ef67d50270188c82defea6b59
MD5 da3170312ae4c888dc8eafc738a4ad8d
BLAKE2b-256 88afde2fc4c833e8e0e8a6d8cbceffd61dd344aa2e5c2ce27edf4c1d7ccc8463

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektralwerk_scpi_client-0.3.0.tar.gz:

Publisher: pypi-publish.yml on silicann/spektralwerk-scpi-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spektralwerk_scpi_client-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spektralwerk_scpi_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7b860d96e385e57ae6f9e7e5c7b742391599ff8277b107464af60d52c65ee9cc
MD5 93bf28f8f3a2430cfdd0839aed6ccf62
BLAKE2b-256 26591095b9d6076695e16286a5cb8e3ac04ec4762bfd1dff4ac0a15916a7ddc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for spektralwerk_scpi_client-0.3.0-py3-none-any.whl:

Publisher: pypi-publish.yml on silicann/spektralwerk-scpi-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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