This Python Package allows interfacing with dotThz files.
Project description
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.
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 pydotthz-1.1.0.tar.gz.
File metadata
- Download URL: pydotthz-1.1.0.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
667b4f81999204287114ca79b0ca454e44158aed5ca7f916a4a3ca03b1d2e238
|
|
| MD5 |
ac41692f96d70bdf09512483a060d7f8
|
|
| BLAKE2b-256 |
17ee5a4c1bc5dc887491bd6db375ec4283df81fc94ec5cf5f7b76c0a997e117e
|
Provenance
The following attestation bundles were made for pydotthz-1.1.0.tar.gz:
Publisher:
publish.yml on dotTHzTAG/pydotthz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydotthz-1.1.0.tar.gz -
Subject digest:
667b4f81999204287114ca79b0ca454e44158aed5ca7f916a4a3ca03b1d2e238 - Sigstore transparency entry: 1252515570
- Sigstore integration time:
-
Permalink:
dotTHzTAG/pydotthz@7de241edd4d6e1fd528f0990889b24a69f8e48d1 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/dotTHzTAG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7de241edd4d6e1fd528f0990889b24a69f8e48d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydotthz-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pydotthz-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c558255ff87a8a759c495e05b8255276c64ace338d7e1820a1e20e276a27d1b
|
|
| MD5 |
5b892e61f4b075ad0ddacfd4c1a73fc1
|
|
| BLAKE2b-256 |
af56cba7952d9e4ababd5244fdad6064e78a2dabec71204e5f2ea48c8e1d30e9
|
Provenance
The following attestation bundles were made for pydotthz-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on dotTHzTAG/pydotthz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydotthz-1.1.0-py3-none-any.whl -
Subject digest:
1c558255ff87a8a759c495e05b8255276c64ace338d7e1820a1e20e276a27d1b - Sigstore transparency entry: 1252515578
- Sigstore integration time:
-
Permalink:
dotTHzTAG/pydotthz@7de241edd4d6e1fd528f0990889b24a69f8e48d1 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/dotTHzTAG
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7de241edd4d6e1fd528f0990889b24a69f8e48d1 -
Trigger Event:
release
-
Statement type: