pyref

pyref logo

Fast PRSoXR data reduction for ALS Beamline 11.0.1.2.

Home | Docs | DeepWiki

DOI

Table of Contents

This repository contains the Python package, Rust acceleration layer, and tooling for PRSoXR beamtime ingestion and reduction.

Report an Issue

Quickstart

Install:

pip install pyref

Python >=3.12 is required.

Load a beamtime and inspect reduced data:

from pathlib import Path
from pyref.loader import PrsoxrLoader

loader = PrsoxrLoader(Path("/path/to/beamtime"))

refl = loader.refl
meta = loader.meta

loader.plot_data()

Optional interactive tools:

loader.mask_image()
loader.check_spot()

Development

All development commands use uv for Python and cargo for Rust:

git clone https://github.com/WSU-Carbon-Lab/pyref.git
cd pyref
uv sync
uv run pytest

Build the experiment browser TUI:

cargo browser