sbts-py
Parser for spectral data files exported by Gigahertz-Optik S-BTS2048 and S-BTS256 spectroradiometers (.xls BIFF8 format).
Installation
pip install sbts-py
Usage
from sbts import read
# Single measurement
measurements = read('measurement.xls')
s = measurements[0]
print(s.instrument) # 'S-BTS2048' or 'S-BTS256'
print(s.wavelengths[0]) # 350.0 (nm)
print(len(s.spd)) # 701 (S-BTS2048) or 371 (S-BTS256)
print(s.data.get('CCT')) # 4043.16
print(s.data.get('CRI: Ra')) # 82.45
print(s.data.get('date')) # '23.06.2025'
# Multi-measurement file
measurements = read('multi.xls')
for m in measurements:
print(m.data.get('CCT'), m.data.get('samplenumber'))
# S-BTS256 — diode progression
s = read('S-BTS256.xls')[0]
print(s.diode_time_ms) # [0.0, 0.02, ...] or None
print(s.data.get('Pst')) # flicker Pst
Returned object
read() always returns list[Sbts] — a list of one element for a single-measurement file, N elements for a multi-measurement file.
@dataclass
class Sbts:
wavelengths: list[float] # wavelengths in nm
spd: list[float] # spectral irradiance (W/m²)/nm
data: dict[str, Any] # all scalar key/value pairs from the file
diode_time_ms: list[float] | None
diode_values: list[float] | None
instrument: str | None # 'S-BTS2048' | 'S-BTS256' | None
All missing or unavailable values (-9999.0 convention) are normalized to None.
Compatibility
The sheet name used by the Gigahertz-Optik export software has changed across versions (Sheet3 in older versions, Sheet1 in recent ones). sbts-py automatically tries Sheet3, then Sheet1, then Sheet2.
License
MIT
Metadata
Release files for sbts-py 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sbts_py-1.0.2.tar.gz | 5.0 kB | Without provenance | Details for sbts_py-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sbts_py-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for sbts_py-1.0.2-py3-none-any.whl |
Total release size: 9.6 kB
Release files / sbts_py-1.0.2.tar.gz
| Download URL | sbts_py-1.0.2.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97648e67da8613d830e8060124bf4a50338777b1e5ea0f7d436484d58ba9ef88
|
|
BLAKE2b-256 checksum How to use checksums |
5c5ced89f70b3d51dae7c39a3ecdb549ec8f1f5f62c920e5983bd182b6819085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / sbts_py-1.0.2-py3-none-any.whl
| Download URL | sbts_py-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f8756f99dc839822c0c3cfb96d4c6aba37e80ff5916aed2ffd968d139b9c382
|
|
BLAKE2b-256 checksum How to use checksums |
2322d404dc49878fe61d7a2a549b7a0c66e9628e90e6d7712ee58813886dc82d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for sbts-py 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.