Skip to main content

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:

Christoph Gohlke

License:

BSD 3-Clause

Version:

2023.9.28

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

2023.9.28

  • Update structs to SPCM v.9.66 (breaking).

  • Shorten MEASURE_INFO struct to meas_desc_block_length.

2023.8.30

  • Fix linting issues.

  • Add py.typed marker.

  • Drop support for Python 3.8 and numpy < 1.22 (NEP29).

2022.9.28

  • Convert docstrings to Google style with Sphinx directives.

2022.2.2

  • Add type hints.

  • Drop support for Python 3.7 and numpy < 1.19 (NEP29).

2021.11.18

  • Fix reading FLIM files created by Prairie View software (#5).

2021.3.21

Refer to the CHANGES file for older revisions.

References

  1. W Becker. The bh TCSPC Handbook. 9th Edition. Becker & Hickl GmbH 2021. pp 879.

  2. 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')
>>> sdt.header.revision
588
>>> sdt.info.id[1:-1]
'SPC Setup & Data File'
>>> int(sdt.measure_info[0].scan_x[0])
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,)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdtfile-2023.9.28.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

sdtfile-2023.9.28-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file sdtfile-2023.9.28.tar.gz.

File metadata

  • Download URL: sdtfile-2023.9.28.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for sdtfile-2023.9.28.tar.gz
Algorithm Hash digest
SHA256 32c3f7ebeadeee184565bf336c645f107e044d0774bee5e18532716e5d30dd7d
MD5 b3d27ea31417fe2b5152d456826da295
BLAKE2b-256 88fd973c458f20d7300ab31601e1ffc423542b43e815c9f09de0ad77d2cc30cd

See more details on using hashes here.

File details

Details for the file sdtfile-2023.9.28-py3-none-any.whl.

File metadata

  • Download URL: sdtfile-2023.9.28-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for sdtfile-2023.9.28-py3-none-any.whl
Algorithm Hash digest
SHA256 26c1d17bd026248304d02342f763f921bf097c30541f93a015db137994bce43f
MD5 9449fb28309bfcc6cd79f78497f541f7
BLAKE2b-256 0d5b14458ab553855e59c031892474c5d8fba5974351a34fe8416e01771a5452

See more details on using hashes here.

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