Diffraction Map Processing Pipeline (REyes v3.6.1)
Quick Start
# Install the package
pip install .
# Run automated pipeline
reyes-monitor --microscope Arctica-CETA
# Run automated pipeline with movie processing (requires a pyautoprocess preset)
reyes-monitor --microscope Arctica-CETA --autoprocess --microscope-config Arctica-CETA-mrc-SM
Overview
pyREyes is a Python package to support REyes (Reciprocal Eyes), an end-to-end autonomous electron diffraction data collection and processing pipeline. REyes generates diffraction heatmaps, identifies key targets, and manages navigator files for SerialEM.
📝 Changelog - what is new in 3.6.1 and 3.6.0, and how to upgrade from 3.4.x
Key Features
- Grid squares detection and atlas management
- Manual or automated grid square selection
- Eucentricity correction
- Diffraction pattern quality classification using DQI (Diffraction Quality Index)
- Frame loading for different detectors: stacks are summed, large frames are cleaned of bad lines and binned to 2048x2048, and small frames use dedicated detection parameters
- Diffraction map blocks recorded across midnight are processed as one block
- Navigation file generation with spatial awareness
- Comprehensive visualization suite
- Automated data processing with state machine monitoring
- Optional movie processing and structure solution integration
- Restart-safe movie processing and timeouts for hung processing steps
- Keeps going when SerialEM sets a grid square or crystal aside or aborts a grid, and records the session outcome in
session_status.json - SerialEM script packages for Ceta and DE Apollo cameras (docs/scripts)
Diffraction Quality Analysis
REyes uses advanced quality metrics to assess diffraction patterns:
LQP (Lattice Quality Peaks): A number of peaks in an FFT of the thresholded and binarized diffraction snapshot that correspond to lattice quality.
DQI (Diffraction Quality Index): A quality metric calculated as the ratio of LQP to total diffraction peaks (DQI = LQP / Diffraction Peaks). DQI values above 3.0 indicate higher crystalline quality with better-ordered lattice structures. This index is used to automatically classify and prioritize crystal targets for data collection.
Pipeline Components
Core Modules
- Grid Squares Searcher
- Navigator Eucentricity Corrector
- Diffraction Map Processor
- Navigation File Generator
- Final Targets Processor
- Collection Executor
Pipeline Orchestration:
- Processing Monitor - Automatically runs all steps above and pauses for user input on optional manual steps
Directory Structure
working_directory/
├── dif_maps/ # Diffraction maps and visualizations
│ └── diff_blocks_maps/ # Block-specific maps
├── grid_squares/ # Grid square & eucentricity outputs
├── movies/ # Continuous rotation diffraction movies
├── REyes_logs/ # Processing logs
└── targets/ # Navigation files and diffraction snapshots
Reference
The REyes methodology and its applications to small molecules, materials, and protein crystallography are described in detail in:
Eremin, D.B.; Jha, K.K.; Delgadillo, D.A.; Zhang, H.; Foxman, S.H.; Johnson, S.N.; Vlahakis, N.W.; Cascio, D.; Lavallo, V.; Rodríguez, J.A.; Nelson, H.M. "Spatially-Aware Diffraction Mapping Enables Fully Autonomous MicroED" ChemRxiv 2025, DOI: 10.26434/chemrxiv-2025-4p4c3
Data Availability
Electron diffraction data are publicly available through the Caltech.
Repository: https://miledd.caltech.edu/shared/
ZENODO Dataset: Complete Raw and Processed REyes Dataset: Autonomous MicroED Collection for (S,S)-Salen Ligand - https://doi.org/10.5281/zenodo.16971798
Support
For support and questions, please contact:
- 📫 Dmitry Eremin - eremin@caltech.edu
Developers
Patent Disclosure
Dmitry B. Eremin, Hongyu Zhang, Jose A. Rodríguez, and Hosea M. Nelson have filed a provisional patent application related to the methods implemented in this software:
Patent Application: CIT-9295-P2, filed May 8, 2025
This disclosure is provided in accordance with academic transparency standards. The software remains available for academic and research use under the terms specified in the license.
Copyright © 2025, California Institute of Technology (Caltech). All rights reserved. Use of this software is permitted for academic and non‑commercial research only. Commercial use is prohibited without a license, please contact Caltech Office of Technology Transfer & Corporate Partnerships.
Metadata
Release files for pyREyes 3.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreyes-3.6.1.tar.gz | 39.9 MB | Without provenance | Details for pyreyes-3.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreyes-3.6.1-py3-none-any.whl | Python 3 | none | any | Details for pyreyes-3.6.1-py3-none-any.whl |
Total release size: 40.0 MB
Release files / pyreyes-3.6.1.tar.gz
| Download URL | pyreyes-3.6.1.tar.gz |
|---|---|
| Size | 39.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a17dd97a7be770f9993bfe30b8647a35f9b3e912a0aa67f68372830284d5b16f
|
|
BLAKE2b-256 checksum How to use checksums |
4eccfe43b670f8abe77bdcbbfc3b7c1f59d869d45c1c9e44c499cb843232c33c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Release files / pyreyes-3.6.1-py3-none-any.whl
| Download URL | pyreyes-3.6.1-py3-none-any.whl |
|---|---|
| Size | 167.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
53f0ac14ea87d9fe55c2d78e491cccfe6cbf2f441946be083ac4805cf187f019
|
|
BLAKE2b-256 checksum How to use checksums |
32a9f52e832b6fd26ed85f1e09f662386bd824fa57c446762d24ac6bd2278609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.3
|
Security for pyREyes 3.6.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.