Python package for handling TCF data. It works with Tomcube data
Project description
TCFile python package
A basic image processing tool of tomocube data.
Installation
pip install TCFile
Use case
from TCFile import TCFile
tcfile = TCFile('test.TCF','3D') # ready for return 3D RI images
print(f"number of snapshots : {len(tcfile)}")
## Usage 1: handling each snapshots (numpy array)
data = tcfile[0]
print(f"shape of data : {data.shape}")
# or
for data in tcfile:
# do some operations on the data ...
pass
## Usage 2: handling fluorescence array
tcfile_fl = TCFile('test.TCF','3DFL')
fl_data = tcfile_fl[0]
## Usage 2: handling dask array
data = tcfile.asdask() # (T, Z, Y, X) array
Limitation
It does not support TCF writer due to the difficulty of configuring metadata and interoperability with commercial Tomocube software.
TODO
- rigorous tests
- TCFile converter
Any suggestions and comments are welcome!
Test
# install this package in editable mode
git clone https://github.com/ehgus/TCFile.git
cd TCFile
pip install -e .
# execute pytest
pytest
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
tcfile-2024.10.2.tar.gz
(6.7 kB
view details)
Built Distribution
File details
Details for the file tcfile-2024.10.2.tar.gz
.
File metadata
- Download URL: tcfile-2024.10.2.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c2b7d04f78c810e08fa6d9c9de35693c8d248bb56d7b043a293bababd4abcfe |
|
MD5 | c05617a1adc9d4e83720942471737995 |
|
BLAKE2b-256 | 9d9831d7113784e9ba84bc2b0da29bf358f3c27fb19f61a112ad64278f4372c1 |
File details
Details for the file tcfile-2024.10.2-py3-none-any.whl
.
File metadata
- Download URL: tcfile-2024.10.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b3084be8b0cefae58c1e5e8e3effed517bf26e19c5ed384153d6c28b354ade6 |
|
MD5 | 82bd3c384b8d1f1f3e80833362b3924a |
|
BLAKE2b-256 | de8cb2eb32b01601411030f2345d82e034efcd6c27b303584d32694b8d497b99 |