A Python package for visualizing and analyzing X-ray Diffraction (XRD) experimental data, providing tools to process, visualize, and extract meaningful insights from XRD patterns and measurements.
Project description
XRD-utils is a Python package for loading, aligning, analyzing, and visualizing X-ray diffraction (XRD) data, including line scans and reciprocal space maps.
Project Links
Installation
Install from PyPI:
pip install XRD-utils
Install from source:
git clone https://github.com/yig319/XRD-utils.git
cd XRD-utils
pip install -e .
Quick Start
import numpy as np
from xrd_learn.xrd_utils import detect_peaks, calculate_fwhm
# Example synthetic profile
x = np.linspace(40, 50, 500)
y = np.exp(-((x - 45.0) ** 2) / 0.02) + 0.05
peak_x, peak_y = detect_peaks(x, y, num_peaks=1, prominence=0.1)
fwhm, amp, left, right = calculate_fwhm(x, y, peak_x[0])
Runnable Demo
Try a full synthetic workflow (peak detection, FWHM, alignment, and plotting):
# from repo root
PYTHONPATH=src python examples/demo_xrd_scan.py
This writes a demo figure to examples/output/demo_xrd_scan.png.
Features
Peak detection and alignment utilities for XRD scans.
FWHM estimation and fringe-based thickness estimation helpers.
Visualization for stacked 1D XRD scans.
Reciprocal space mapping (RSM) plotting tools.
Documentation
Sphinx documentation is provided in the docs directory.
Build docs locally:
pip install -r docs/requirements.txt
pip install -e .
sphinx-build -b html docs docs/_build/html
License
This project is licensed under the MIT License. See LICENSE.txt.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xrd_utils-3.0.tar.gz.
File metadata
- Download URL: xrd_utils-3.0.tar.gz
- Upload date:
- Size: 576.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2645ea57e86b9010912228787af4b3574e090257ce36579e5ad814b04e28570
|
|
| MD5 |
8709cd7123b64ce3f284949c3a8d68d3
|
|
| BLAKE2b-256 |
d2312fae922d9c6af94b6a8451aaf84e38979eba532a9bd1958228df17dd02ff
|
Provenance
The following attestation bundles were made for xrd_utils-3.0.tar.gz:
Publisher:
main.yml on yig319/XRD-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrd_utils-3.0.tar.gz -
Subject digest:
f2645ea57e86b9010912228787af4b3574e090257ce36579e5ad814b04e28570 - Sigstore transparency entry: 1051452791
- Sigstore integration time:
-
Permalink:
yig319/XRD-utils@1f09a0f41748aded6975ae6e1c7d08a6e20c0095 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yig319
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1f09a0f41748aded6975ae6e1c7d08a6e20c0095 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xrd_utils-3.0-py3-none-any.whl.
File metadata
- Download URL: xrd_utils-3.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fff29e85a9f3d29a9bbac5449bfb63e8c4a8588a0b9217dfc0795694f72be98b
|
|
| MD5 |
38efa2f63243acee3421452f41b0bb05
|
|
| BLAKE2b-256 |
3ea1064a048761fd6dc1d93d72993bcf69854b8230dfa3eb0ba7b5e72d04694d
|
Provenance
The following attestation bundles were made for xrd_utils-3.0-py3-none-any.whl:
Publisher:
main.yml on yig319/XRD-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xrd_utils-3.0-py3-none-any.whl -
Subject digest:
fff29e85a9f3d29a9bbac5449bfb63e8c4a8588a0b9217dfc0795694f72be98b - Sigstore transparency entry: 1051452835
- Sigstore integration time:
-
Permalink:
yig319/XRD-utils@1f09a0f41748aded6975ae6e1c7d08a6e20c0095 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yig319
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@1f09a0f41748aded6975ae6e1c7d08a6e20c0095 -
Trigger Event:
push
-
Statement type: