Skip to main content

Read electron event representation (EER) files in Python

Project description

eerfile

License PyPI Python Version CI codecov

Read electron event representation (EER) files as NumPy arrays in Python.

Installation

eerfile is available on PyPI and can be installed with pip

pip install eerfile

Usage

import eerfile

# render multi-frame micrograph from file and target dose per frame
# dose per frame is in electrons per square angstrom
image = eerfile.render("FoilHole_19622436.eer", dose_per_output_frame=1.0, total_fluence=50.0)

# or you can read the entire stack of EER frames
eer_frames = eerfile.read("FoilHole_19622436.eer")

Memory-Efficient Rendering

For large movies that may cause memory issues, you can specify a chunk size of the output frames to process frames in smaller batches:

import eerfile

# Memory-efficient rendering with chunking
# Processes frames in chunks to avoid memory overflow
image = eerfile.render(
    "large_movie.eer", 
    dose_per_output_frame=1.0,
    total_fluence=50.0,
    chunk_size=10      # Process 10 output frames at a time
)

Acknowledgements

This package is a very thin convenience layer on top of tifffile which provides the EER frame decoding logic.

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

eerfile-0.0.4.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

eerfile-0.0.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file eerfile-0.0.4.tar.gz.

File metadata

  • Download URL: eerfile-0.0.4.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eerfile-0.0.4.tar.gz
Algorithm Hash digest
SHA256 a2557ce63f08deabd497fa162e36c7ef67cd4286b84186ab97dd69f180e99d56
MD5 071f9a970066ec03eca20e9fa019b6b9
BLAKE2b-256 6dfe698cc2cb409b5da993fd446a429cf131b53f2817344061b8c1ebcc2c9aea

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerfile-0.0.4.tar.gz:

Publisher: ci.yml on teamtomo/eerfile

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

File details

Details for the file eerfile-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: eerfile-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eerfile-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1558fff84310c410fb6722ad393e610dce574ee814d3313cb2ac0d19be5dd2fd
MD5 e82c0eeae0d2cb5b8cec06171a160549
BLAKE2b-256 595a40682383c8f79faac90135f6586f95b49b53ad2f58aeeb3650bcd94f1ddb

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerfile-0.0.4-py3-none-any.whl:

Publisher: ci.yml on teamtomo/eerfile

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