A Python package for reading IMOD etomo alignment files into pandas DataFrames
Project description
etomofiles
A Python package for reading IMOD etomo alignment files into pandas DataFrames.
Overview
etomofiles provides a way to extract metadata from etomo alignment directories and convert them into structured pandas DataFrames.
Installation
pip install etomofiles
Quick Start
import etomofiles
# Read etomo alignment data
df = etomofiles.read("/path/to/etomo/directory")
print(df.head())
DataFrame Columns
The resulting DataFrame contains the following columns:
| Column | Description |
|---|---|
image_path |
Path to specific image in tilt series (e.g., TS_001.st[0]) |
idx_tilt |
Index of the tilt image (0-based) |
tilt_axis_angle |
Tilt axis rotation angle (degrees) |
rawtlt |
Raw tilt angle (degrees) |
tlt |
Corrected tilt angle (degrees) |
xtilt |
Tilt around x-axis |
xf_a11, xf_a12, xf_a21, xf_a22, xf_dx, xf_dy |
xf transformation matrix elements |
excluded |
Boolean indicating if view was excluded |
xf Utilities
Get xf as numpy array:
import etomofiles
# Read alignment data
df = etomofiles.read("TS_001/")
# Get xf as numpy array:
xf_matrices = etomofiles.df_to_xf(df)
# Each matrix represents an affine transformation:
# [[A11, A12, DX],
# [A21, A22, DY]]
# where X' = A11*X + A12*Y + DX
# Y' = A21*X + A22*Y + DY
# Also works directly with files
xf_matrices = etomofiles.df_to_xf("TS_001/TS_001.xf")
# Choose row ordering convention
xf_xy = etomofiles.df_to_xf(df) # default xy
# Each matrix is [[A11, A12, DX], [A21, A22, DY]]
xf_yx = etomofiles.df_to_xf(df, yx=True) # yx
# Each matrix is [[A22, A21, DY], [A12, A11, DX]]
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 etomofiles-0.1.1.tar.gz.
File metadata
- Download URL: etomofiles-0.1.1.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f41827145cd2a256622cf10ade48307a3e7c50a535befe81a49d54a84b1ca76
|
|
| MD5 |
b0c846dca8da68f38c300526c138f0a6
|
|
| BLAKE2b-256 |
48ab66be00df0fab12a0b13868c720bcc934b78a816f4201d335bd524220f8cb
|
Provenance
The following attestation bundles were made for etomofiles-0.1.1.tar.gz:
Publisher:
ci.yml on teamtomo/etomofiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etomofiles-0.1.1.tar.gz -
Subject digest:
8f41827145cd2a256622cf10ade48307a3e7c50a535befe81a49d54a84b1ca76 - Sigstore transparency entry: 629994787
- Sigstore integration time:
-
Permalink:
teamtomo/etomofiles@e1888074c779f9f31a451f2c5fd88a659318fb82 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/teamtomo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e1888074c779f9f31a451f2c5fd88a659318fb82 -
Trigger Event:
push
-
Statement type:
File details
Details for the file etomofiles-0.1.1-py3-none-any.whl.
File metadata
- Download URL: etomofiles-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f692ef3ca4c9be76ef055b9f87bc621cf0224e50fbab1346a9360801265b68a
|
|
| MD5 |
d41a117d9bc8c3fa6ee90acc1201ea55
|
|
| BLAKE2b-256 |
c6f57e403f93faae3c9b64a54c6158292d9e7453c043b177b32ab30b40207e8a
|
Provenance
The following attestation bundles were made for etomofiles-0.1.1-py3-none-any.whl:
Publisher:
ci.yml on teamtomo/etomofiles
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etomofiles-0.1.1-py3-none-any.whl -
Subject digest:
9f692ef3ca4c9be76ef055b9f87bc621cf0224e50fbab1346a9360801265b68a - Sigstore transparency entry: 629994794
- Sigstore integration time:
-
Permalink:
teamtomo/etomofiles@e1888074c779f9f31a451f2c5fd88a659318fb82 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/teamtomo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@e1888074c779f9f31a451f2c5fd88a659318fb82 -
Trigger Event:
push
-
Statement type: