Skip to main content

An xarray-based toolkit for RHEED image analysis

Project description

xRHEED

📡 A versatile Python toolkit for RHEED image analysis


CI Documentation Status PyPI version License: MIT Linter: ruff Package manager: uv DOI


🔬 What is RHEED?

Reflection High-Energy Electron Diffraction (RHEED) is an experimental technique used to monitor and control the quality of crystal surfaces.
A high-energy electron beam (∼20 keV) strikes the surface at a grazing angle (< 5°), making the method highly surface-sensitive and probing only a few atomic layers.


🎯 Project Goals

xRHEED provides a flexible and extensible Python toolkit for RHEED image analysis:

  • 🖼️ Load and preprocess RHEED images
  • 📈 Generate and analyze intensity profiles
  • ✨ Overlay predicted diffraction spot positions (kinematic theory & Ewald construction)
  • 🔄 Transform RHEED images into kx–ky space
  • 🔍 Search for reconstruction lattice constants and rotations by calculating the matching coefficient between predicted and experimental data

👉 Note: xRHEED is not a GUI application. It is designed as an xarray accessory library, intended for use in interactive environments such as Jupyter notebooks.


Installation

Using PyPI

pip install xrheed

Using pip (editable install for development)

git clone https://github.com/mkopciuszynski/xrheed
cd xrheed
pip install -e .

Using uv (with virtual environment)

  1. Install uv.
  2. Clone the repository:
git clone https://github.com/mkopciuszynski/xrheed
cd xrheed
  1. Create and activate a virtual environment.
  2. Sync dependencies:
uv sync

🚀 Quick Usage

import matplotlib.pyplot as plt
import xrheed

# Load a RHEED image
rheed_image = xrheed.load_data("rheed_image.raw", plugin="dsnp_arpes_raw")

# Show image with auto-adjusted levels
rheed_image.ri.plot_image(auto_levels=2.0)
plt.show()

# Get intensity profile and plot its origin
profile = rheed_image.ri.get_profile(center=(0, -5), width=40, height=4,
                                     show_origin=True)

📖 Citation

If you use xRHEED in your research, please cite it:

Kopciuszynski, M. ORCID (2025). xRHEED: A versatile Python toolkit for RHEED image analysis.
GitHub. https://github.com/mkopciuszynski/xrheed
DOI: 10.5281/zenodo.17099751


📚 👉 See the full documentation for tutorials and advanced examples.

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

xrheed-2.1.0.tar.gz (42.4 MB view details)

Uploaded Source

Built Distribution

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

xrheed-2.1.0-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file xrheed-2.1.0.tar.gz.

File metadata

  • Download URL: xrheed-2.1.0.tar.gz
  • Upload date:
  • Size: 42.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrheed-2.1.0.tar.gz
Algorithm Hash digest
SHA256 bab138afff7ffe10f179614bd906e0347494bf97564839f90562cb889873ff37
MD5 7a44fe428cc56408ecff8df5eab1f212
BLAKE2b-256 659499be4a75b775037466bbed4186bd0e517104ffb522bfda5e47e13cce4f07

See more details on using hashes here.

File details

Details for the file xrheed-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: xrheed-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrheed-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23b7d13838ec9d8b3836ebc6cf1e8a234841caac4a017266f53b3938533443fc
MD5 2e39c3077bb256ce1ae805c0fb08cf9a
BLAKE2b-256 4fb59542e0cbf00b3edcfcd0943511530724e0ae19b7df386e9ab0cb425a5a35

See more details on using hashes here.

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