Read Becker & Hickl SDT files
Project description
Sdtfile is a Python library to read SDT files produced by Becker & Hickl SPCM software. SDT files contain time correlated single photon counting instrumentation parameters and measurement data. Currently only the “Setup & Data”, “DLL Data”, and “FCS Data” formats are supported.
Becker & Hickl GmbH is a manufacturer of equipment for photon counting.
- Author:
- License:
BSD-3-Clause
- Version:
2026.1.14
- DOI:
Quickstart
Install the sdtfile package and all dependencies from the Python Package Index:
python -m pip install -U sdtfile
See Examples for using the programming interface.
Source code and support are available on GitHub.
Requirements
This revision was tested with the following requirements and dependencies (other versions may work):
Revisions
2026.1.14
Improve code quality.
2025.12.12
Add new SPC modules and MEASURE_INFO_EXT fields.
Drop support for Python 3.10.
2025.5.10
Support Python 3.14.
2025.3.25
Fix shape of data with routing channels.
Drop support for Python 3.9, support Python 3.13.
2024.12.6
Fix read MeasureInfo fields as scalars (breaking).
Update some structure field names with BH reference (breaking).
Parse some SetupBlock binary structures (#7).
Include more information in str(SdtFile).
Add subtype to FileRevision.
2024.11.24
…
Refer to the CHANGES file for older revisions.
References
W Becker. The bh TCSPC Handbook. 9th Edition. Becker & Hickl GmbH 2021. pp 879.
SPC_data_file_structure.h header file. Part of the Becker & Hickl SPCM software installation.
Examples
Read image and metadata from a “SPC Setup & Data File”:
>>> sdt = SdtFile('image.sdt')
>>> int(sdt.header.revision)
588
>>> sdt.info.id[1:-1]
'SPC Setup & Data File'
>>> int(sdt.measure_info[0].scan_x)
128
>>> len(sdt.data)
1
>>> sdt.data[0].shape
(128, 128, 256)
>>> sdt.times[0].shape
(256,)
Read data and metadata from a “SPC Setup & Data File” with multiple data sets:
>>> sdt = SdtFile('fluorescein.sdt')
>>> len(sdt.data)
4
>>> sdt.data[3].shape
(1, 1024)
>>> sdt.times[3].shape
(1024,)
>>> int(sdt.setup.bh_bin_hdr['soft_rev'])
850
Read image data from a “SPC FCS Data File” as numpy array:
>>> sdt = SdtFile('fcs.sdt')
>>> sdt.info.id[1:-1]
'SPC FCS Data File'
>>> len(sdt.data)
1
>>> sdt.data[0].shape
(512, 512, 256)
>>> sdt.times[0].shape
(256,)
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 sdtfile-2026.1.14.tar.gz.
File metadata
- Download URL: sdtfile-2026.1.14.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecb56326447c7c9c54f08369ee4a8da3544f2b01454b3b1db3a2960caaedf819
|
|
| MD5 |
5cb625d3f527d153a9d2a2ae3a76a981
|
|
| BLAKE2b-256 |
d0e2e840182e12eb7a157f1bd3d2aaa9cec98ab0e6420e0e6182f0a8767cb65a
|
File details
Details for the file sdtfile-2026.1.14-py3-none-any.whl.
File metadata
- Download URL: sdtfile-2026.1.14-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6884a5ca170f61863e7e10338916a0cc75cf13f07dc86399843820b262f32610
|
|
| MD5 |
a35799bf5200dc2f8d4f0a8ae6b50676
|
|
| BLAKE2b-256 |
5b6a0f22b5b2f6b71a8aaf830435c01dda19ed025fef6f6d2e4e248a3fe12f34
|