Skip to main content

Peek into Zeiss CZI files โ€” temporal and Z-stack metadata at a glance

Project description

czipeak ๐Ÿ”ฌ

Peek into Zeiss CZI files โ€” temporal and Z-stack metadata at a glance. Part of the code is built with Claude Sonnet 4.6. Example files are aquired at Caltech Biological Imaging Facility - Beckman Institute.

Install

pip install czipeak

Optional: install aicspylibczi for faster CZI reading (preferred when available):

pip install czipeak[aics]

Command-line

czipeak  path/to/file.czi

# verbose โ€” print every per-frame timestamp (if present in file)
czipeak  path/to/file.czi  --verbose

# export timestamps to CSV (auto-named next to the file)
czipeak  path/to/file.czi  --csv
czipeak  path/to/file.czi  --csv  my_output.csv

Example โ€” 3-tile timelapse, no Z

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  czipeak  โ€”  CZI Metadata Inspector
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  File                         Experiment-49.czi
  Size on disk                 8714.90 MB
  Axes                         STCYX0  shape=(3, 239, 1, ...)

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Temporal Analysis
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Time points (T)              239
  Tiles (scenes)               3
  Total acquisition time       9 h 56 min 42 s
  ฮ”t  (actual mean)            150.43 s  =  2.507 min
  Frame rate                   0.00665 fps

Example โ€” Z-stack

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Z-Stack Info
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Z slices                     7
  dz  (step size)              0.8300 ยตm
  Z start                      -2.4900 ยตm
  Z end                         2.4900 ยตm
  Z range (total)               4.9800 ยตm

Python API

from czipeak import read_czi

meta = read_czi("path/to/file.czi")

# Temporal
print(meta.t_count)           # number of time points
print(meta.dt_actual_s)       # mean ฮ”t in seconds
print(meta.total_duration_s)  # total acquisition time in seconds
print(meta.t_start)           # datetime (UTC)
print(meta.t_stop)            # datetime (UTC)

# Z-stack (None if no Z axis)
print(meta.z_count)           # number of Z slices
print(meta.dz_um)             # step size in ยตm
print(meta.z_start_um)        # first plane in ยตm
print(meta.z_end_um)          # last plane in ยตm
print(meta.z_range_um)        # total Z span in ยตm

# Tiles / scenes
print(meta.s_count)           # number of tiles
for sc in meta.scenes:
    print(sc["name"], sc["center"])

# Channels
for ch in meta.channels:
    print(ch["name"], ch["fluor"], ch["ex_nm"], ch["em_nm"])

# Pixel size
print(meta.dx_um, meta.dy_um)  # XY pixel size in ยตm
print(meta.magnification)       # e.g. "20"

CziMetadata fields

Field Type Description
t_count int Number of time points
dt_actual_s float Mean ฮ”t (s), from stop โˆ’ start รท (Tโˆ’1)
total_duration_s float Total acquisition time (s)
t_start / t_stop datetime UTC start and last-frame times
z_count int or None Number of Z slices
dz_um float or None Z step size (ยตm)
z_start_um float or None First Z plane (ยตm)
z_end_um float or None Last Z plane (ยตm)
z_range_um float or None Total Z span (ยตm)
s_count int or None Number of tiles / scenes
scenes list[dict] Scene name + center position
dx_um / dy_um float or None XY pixel size (ยตm)
magnification str or None Objective magnification
channels list[dict] Name, fluor, ex/em wavelengths

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

czipeak-0.1.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

czipeak-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file czipeak-0.1.0.tar.gz.

File metadata

  • Download URL: czipeak-0.1.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for czipeak-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10f9f0a83b97c426b96f1e312413fa86f7aa3de6a91e7e80b07164933242439f
MD5 bb43b9cfe6ad43bf21d7699c52bcd7c2
BLAKE2b-256 304547c8801ae014d4f9c14c18cf65f3d8b66157b766a161c30ed3800c17cf51

See more details on using hashes here.

File details

Details for the file czipeak-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: czipeak-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for czipeak-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e9ac990477888b87089f650e983e548e5fa7999d52a161966c3eaf83b8d0d5b
MD5 df068028dab3dc12aab103fc71a4b2b6
BLAKE2b-256 21ffcd7c2b9b91733fc2a051e8629147eb269f0fab88a55872a65a7689174229

See more details on using hashes here.

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