Skip to main content

Diffraction Map Processing Pipeline (REyes v3.4.10)

License DOI

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.

📚 Full Documentation

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

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

  1. Grid Squares Searcher
  2. Navigator Eucentricity Corrector
  3. Diffraction Map Processor
  4. Navigation File Generator
  5. Final Targets Processor
  6. 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:

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.4.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyREyes 3.4.10
File Size Uploaded Provenance Actions
pyreyes-3.4.10.tar.gz 39.8 MB Without provenance Details for pyreyes-3.4.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyREyes 3.4.10
File Interpreter ABI Platform Actions
pyreyes-3.4.10-py3-none-any.whl Python 3 none any Details for pyreyes-3.4.10-py3-none-any.whl

Total release size: 39.9 MB

Release files / pyreyes-3.4.10.tar.gz

Download URL pyreyes-3.4.10.tar.gz
Size 39.8 MB
Tags Source
SHA-256 checksum
How to use checksums
9446b0f065fdf235a12c0dfd96b664288c5e05a612930393c12aa685f679052a
BLAKE2b-256 checksum
How to use checksums
0743b2e2a83d8b45dbe111135d687826507c1ba98a603c098ae11289de12d24a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / pyreyes-3.4.10-py3-none-any.whl

Download URL pyreyes-3.4.10-py3-none-any.whl
Size 124.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad104d6bf008482987ece63eb9767f12f40c4da31ae5b5118ae622af19b54ade
BLAKE2b-256 checksum
How to use checksums
28089bfccd689553efad58a2666d7c1380d6a22a55d1df21ccf0b3213f3fb04e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for pyREyes 3.4.10

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page