Read Becker & Hickl SDT files
=============================
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 <http://www.becker-hickl.de/>`_ is a manufacturer of
equipment for photon counting.
:Author: `Christoph Gohlke <https://www.cgohlke.com>`_
:License: BSD 3-Clause
:Version: 2024.12.6
:DOI: `10.5281/zenodo.10125608 <https://doi.org/10.5281/zenodo.10125608>`_
Quickstart
----------
Install the sdtfile package and all dependencies from the
`Python Package Index <https://pypi.org/project/sdtfile/>`_::
python -m pip install -U sdtfile
See `Examples`_ for using the programming interface.
Source code and support are available on
`GitHub <https://github.com/cgohlke/sdtfile>`_.
Requirements
------------
This revision was tested with the following requirements and dependencies
(other versions may work):
- `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.8, 3.13.1
- `Numpy <https://pypi.org/project/numpy/>`_ 2.1.3
Revisions
---------
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
- Update MEASURE_INFO_EXT struct to SPCM v.9.9 (breaking).
2024.5.24
- Fix docstring examples not correctly rendered on GitHub.
2024.4.24
- Support NumPy 2.
2023.9.28
- Update structs to SPCM v.9.66 (breaking).
- Shorten MEASURE_INFO struct to meas_desc_block_length.
2023.8.30
- …
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')
>>> 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,)
Raw data
{
"_id": null,
"home_page": "https://www.cgohlke.com",
"name": "sdtfile",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Christoph Gohlke",
"author_email": "cgohlke@cgohlke.com",
"download_url": "https://files.pythonhosted.org/packages/7f/a2/f84cfaa322460422db87fef20063a5b2d5f7e0c5b53d02a4ce0254bf90ba/sdtfile-2024.12.6.tar.gz",
"platform": "any",
"description": "Read Becker & Hickl SDT files\r\n=============================\r\n\r\nSdtfile is a Python library to read SDT files produced by Becker & Hickl\r\nSPCM software. SDT files contain time correlated single photon counting\r\ninstrumentation parameters and measurement data. Currently only the\r\n\"Setup & Data\", \"DLL Data\", and \"FCS Data\" formats are supported.\r\n\r\n`Becker & Hickl GmbH <http://www.becker-hickl.de/>`_ is a manufacturer of\r\nequipment for photon counting.\r\n\r\n:Author: `Christoph Gohlke <https://www.cgohlke.com>`_\r\n:License: BSD 3-Clause\r\n:Version: 2024.12.6\r\n:DOI: `10.5281/zenodo.10125608 <https://doi.org/10.5281/zenodo.10125608>`_\r\n\r\nQuickstart\r\n----------\r\n\r\nInstall the sdtfile package and all dependencies from the\r\n`Python Package Index <https://pypi.org/project/sdtfile/>`_::\r\n\r\n python -m pip install -U sdtfile\r\n\r\nSee `Examples`_ for using the programming interface.\r\n\r\nSource code and support are available on\r\n`GitHub <https://github.com/cgohlke/sdtfile>`_.\r\n\r\nRequirements\r\n------------\r\n\r\nThis revision was tested with the following requirements and dependencies\r\n(other versions may work):\r\n\r\n- `CPython <https://www.python.org>`_ 3.10.11, 3.11.9, 3.12.8, 3.13.1\r\n- `Numpy <https://pypi.org/project/numpy/>`_ 2.1.3\r\n\r\nRevisions\r\n---------\r\n\r\n2024.12.6\r\n\r\n- Fix read MeasureInfo fields as scalars (breaking).\r\n- Update some structure field names with BH reference (breaking).\r\n- Parse some SetupBlock binary structures (#7).\r\n- Include more information in str(SdtFile).\r\n- Add subtype to FileRevision.\r\n\r\n2024.11.24\r\n\r\n- Update MEASURE_INFO_EXT struct to SPCM v.9.9 (breaking).\r\n\r\n2024.5.24\r\n\r\n- Fix docstring examples not correctly rendered on GitHub.\r\n\r\n2024.4.24\r\n\r\n- Support NumPy 2.\r\n\r\n2023.9.28\r\n\r\n- Update structs to SPCM v.9.66 (breaking).\r\n- Shorten MEASURE_INFO struct to meas_desc_block_length.\r\n\r\n2023.8.30\r\n\r\n- \u2026\r\n\r\nRefer to the CHANGES file for older revisions.\r\n\r\nReferences\r\n----------\r\n\r\n1. W Becker. The bh TCSPC Handbook. 9th Edition. Becker & Hickl GmbH 2021.\r\n pp 879.\r\n2. SPC_data_file_structure.h header file. Part of the Becker & Hickl\r\n SPCM software installation.\r\n\r\nExamples\r\n--------\r\n\r\nRead image and metadata from a \"SPC Setup & Data File\":\r\n\r\n>>> sdt = SdtFile('image.sdt')\r\n>>> int(sdt.header.revision)\r\n588\r\n>>> sdt.info.id[1:-1]\r\n'SPC Setup & Data File'\r\n>>> int(sdt.measure_info[0].scan_x)\r\n128\r\n>>> len(sdt.data)\r\n1\r\n>>> sdt.data[0].shape\r\n(128, 128, 256)\r\n>>> sdt.times[0].shape\r\n(256,)\r\n\r\nRead data and metadata from a \"SPC Setup & Data File\" with multiple data sets:\r\n\r\n>>> sdt = SdtFile('fluorescein.sdt')\r\n>>> len(sdt.data)\r\n4\r\n>>> sdt.data[3].shape\r\n(1, 1024)\r\n>>> sdt.times[3].shape\r\n(1024,)\r\n>>> int(sdt.setup.bh_bin_hdr['soft_rev'])\r\n850\r\n\r\nRead image data from a \"SPC FCS Data File\" as numpy array:\r\n\r\n>>> sdt = SdtFile('fcs.sdt')\r\n>>> sdt.info.id[1:-1]\r\n'SPC FCS Data File'\r\n>>> len(sdt.data)\r\n1\r\n>>> sdt.data[0].shape\r\n(512, 512, 256)\r\n>>> sdt.times[0].shape\r\n(256,)\r\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Read Becker & Hickl SDT files",
"version": "2024.12.6",
"project_urls": {
"Bug Tracker": "https://github.com/cgohlke/sdtfile/issues",
"Homepage": "https://www.cgohlke.com",
"Source Code": "https://github.com/cgohlke/sdtfile"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4aeb5df0f6896c8c6c9c24fb54722fc9a0ff6af1777eb35493ca9c980bc510f7",
"md5": "ebf92f6412816f25bc0878d439986e96",
"sha256": "c6712c7b9b183041c5ea8e8dc01da2650c7554d6ca50ae2bf57ca3175537d06d"
},
"downloads": -1,
"filename": "sdtfile-2024.12.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ebf92f6412816f25bc0878d439986e96",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 18466,
"upload_time": "2024-12-06T20:04:53",
"upload_time_iso_8601": "2024-12-06T20:04:53.477518Z",
"url": "https://files.pythonhosted.org/packages/4a/eb/5df0f6896c8c6c9c24fb54722fc9a0ff6af1777eb35493ca9c980bc510f7/sdtfile-2024.12.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7fa2f84cfaa322460422db87fef20063a5b2d5f7e0c5b53d02a4ce0254bf90ba",
"md5": "cdc8e305478ad84d45c2a9354c3773e1",
"sha256": "14478f9866f8546f82f1cdcbcfb9c24c7e7918befd960325b1921511b1f90f2d"
},
"downloads": -1,
"filename": "sdtfile-2024.12.6.tar.gz",
"has_sig": false,
"md5_digest": "cdc8e305478ad84d45c2a9354c3773e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 17920,
"upload_time": "2024-12-06T20:04:55",
"upload_time_iso_8601": "2024-12-06T20:04:55.150895Z",
"url": "https://files.pythonhosted.org/packages/7f/a2/f84cfaa322460422db87fef20063a5b2d5f7e0c5b53d02a4ce0254bf90ba/sdtfile-2024.12.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-06 20:04:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cgohlke",
"github_project": "sdtfile",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "sdtfile"
}