Read electron event representation (EER) files as NumPy arrays in Python.
eerfile is available on PyPI and can be installed with pip
pip install eerfileimport 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")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
)This package is a very thin convenience layer on top of tifffile
which provides the EER frame decoding logic.