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.3.tar.gz (11.7 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.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eerfile-0.0.3.tar.gz
  • Upload date:
  • Size: 11.7 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.3.tar.gz
Algorithm Hash digest
SHA256 28a77a57c025a27761e01b49084c1ffd4224233907cd5bdd5685bfea135f3754
MD5 e08ddb6004ae3deaf7d7017bc84756db
BLAKE2b-256 50caad4588087062c4aad1caa50606dc65aea4573a0130a31460fc695769dd00

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerfile-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: eerfile-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 294c5753f772d8a0950c0f587ffaf9c8db9721a0864cbb55bc98a3f6c5409514
MD5 da5bda685111dea9e3e2460dd8a0f86c
BLAKE2b-256 7ef74b7e28dd4edd5cb744238d854e062a630ce33dd51e5abe7f12307bf96560

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerfile-0.0.3-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