Skip to main content

A Python package for reading IMOD etomo alignment files into pandas DataFrames

Project description

etomofiles

License PyPI Python Version CI codecov

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etomofiles-0.1.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

etomofiles-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file etomofiles-0.1.2.tar.gz.

File metadata

  • Download URL: etomofiles-0.1.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for etomofiles-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2e5778145378a0b748f0c6eff39e751e8e426ce88c5167b16ffcfb9b693f19c7
MD5 b7627ff0752b4d1770ca1b21436abeb1
BLAKE2b-256 d14dbe07d1b7f19bc61818fe9bada35b15935104c1f03a9267997510bb01a0bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for etomofiles-0.1.2.tar.gz:

Publisher: ci.yml on teamtomo/etomofiles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file etomofiles-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: etomofiles-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for etomofiles-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a066b0272b5946a29c4f681b9e90878bf769880a675b69dd71b824d01a19cbf8
MD5 5d2b7c723ec24c8cc499cf2ecc39559d
BLAKE2b-256 b574ccef45630e9eebab4c594caeba2bf9dfafd637028fcd11896bdc0a2f0886

See more details on using hashes here.

Provenance

The following attestation bundles were made for etomofiles-0.1.2-py3-none-any.whl:

Publisher: ci.yml on teamtomo/etomofiles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page