Interface with dotTHz files using Python
This library provides an easy way to interface with dotTHz files in Python.
Install it
pip install pydotthz
or
pip3 install pydotthz
and then use like specified in the following example:
from pathlib import Path
import numpy as np
from pydotthz import DotthzFile, DotthzMetaData
if __name__ == "__main__":
# Sample data
time = np.linspace(0, 1, 100) # your time array
data = np.random.rand(100) # example 3D data array
# save the file
path1 = Path("test1.thz")
with DotthzFile(path1, "w") as file:
file.create_measurement("Measurement 1")
# create meta-data
metadata = DotthzMetaData()
metadata.user = "John Doe"
metadata.version = "1.00"
metadata.instrument = "Toptica TeraFlash Pro"
metadata.mode = "THz-TDS/Transmission"
metadata.add_field("thickness_mm", 0.52)
file["Measurement 1"].set_metadata(metadata)
# for thzVer 1.00, we need to transpose the array!
# important: do not manipulate keys on the `dataset` field, otherwise it won't be written to the file.
file["Measurement 1"]["Sample"] = np.array([time, data]).T
Further examples (e.g. THz image scans) can be found in the examples directory.
Requirements
Requires hdf5 to be installed.
Metadata
Release files for pydotthz 1.1.0
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 |
|---|---|---|---|---|
| pydotthz-1.1.0.tar.gz | 9.7 kB | With provenance | Details for pydotthz-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydotthz-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pydotthz-1.1.0-py3-none-any.whl |
Total release size: 17.5 kB
Release files / pydotthz-1.1.0.tar.gz
| Download URL | pydotthz-1.1.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
667b4f81999204287114ca79b0ca454e44158aed5ca7f916a4a3ca03b1d2e238
|
|
BLAKE2b-256 checksum How to use checksums |
17ee5a4c1bc5dc887491bd6db375ec4283df81fc94ec5cf5f7b76c0a997e117e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logRelease files / pydotthz-1.1.0-py3-none-any.whl
| Download URL | pydotthz-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c558255ff87a8a759c495e05b8255276c64ace338d7e1820a1e20e276a27d1b
|
|
BLAKE2b-256 checksum How to use checksums |
af56cba7952d9e4ababd5244fdad6064e78a2dabec71204e5f2ea48c8e1d30e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logSecurity for pydotthz 1.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pydotthz-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logA 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.