Metadata-Version: 2.4
Name: RHEED-tools
Version: 0.2.2
Summary: Reusable analysis, visualization, and file I/O tools for RHEED data
Project-URL: Repository, https://github.com/yig319/RHEED-tools
Keywords: RHEED,PLD,analysis,visualization,materials
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: sci-viz-utils>=0.1.0
Provides-Extra: data
Requires-Dist: h5py>=3.11; extra == "data"
Requires-Dist: imageio>=2.34; extra == "data"
Provides-Extra: plot
Requires-Dist: matplotlib>=3.8; extra == "plot"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: notebook>=7.0; extra == "dev"
Requires-Dist: ipykernel>=6.0; extra == "dev"
Requires-Dist: imageio>=2.34; extra == "dev"
Requires-Dist: imageio-ffmpeg>=0.5; extra == "dev"
Requires-Dist: h5py>=3.11; extra == "dev"
Requires-Dist: scipy>=1.13; extra == "dev"

# RHEED-tools

Reusable Python utilities for RHEED data analysis, visualization, and file I/O.

This package is the base utility layer separated from the real-time analyzer.
It is meant to stay independent of instrument control, TSST adapters, feedback
policies, and live-loop orchestration.

## Package Layout

```text
src/rheed_tools/
  analysis/        # ROI, spot fitting, diffraction metrics, trace/curve analysis
  datasets/        # HDF5 packing/readers and optional DataFed wrappers
  io/              # IMM/video/image/trace loading and export helpers
  visualization/   # notebook/report plotting helpers from archived packages
  signals.py       # reusable 1D filtering, peak, cycle, and tau-fit utilities
  notebook_utils.py
tests/
docs/
```

## Install For Development

```bash
pip install -e ".[dev]"
```

## Quick Examples

```python
from rheed_tools.analysis.trace_1d import analyze_rheed_signal
from rheed_tools.datasets import RheedParameterDataset
from rheed_tools.io import load_movie_frames

movie = load_movie_frames("example.imm", every_n=120, fps=30.1)
```

See [`USAGE.md`](USAGE.md) for a practical guide to loading frames, analyzing
traces, visualizing ROIs, and the boundary between RHEED-tools and
`sci-viz-utils`.

## Migration Sources

This package consolidates reusable analysis and notebook utilities from:

- `RHEED_RealTimeAnalyzer` analysis/IO modules
- archived `RHEED-Learn` curve fitting, signal processing, and visualization helpers
- archived `RHEED_data_collect` HDF5 packing, dataset access, DataFed wrappers, and figure layout helpers

Runtime feedback/control, TSST adapters, and policy logic stay in the
real-time analyzer package.

## Publishing

The GitHub Actions workflow in `.github/workflows/main.yml` mirrors the release
flow used by the real-time analyzer:

- `#major` bumps `X.0.0`
- `#minor` bumps `x.Y.0`
- `#patch` bumps `x.y.Z`

Configure PyPI Trusted Publishing for:

- Repository: `yig319/RHEED-tools`
- Workflow: `main.yml`
- Environment name: any / unset
