Metadata-Version: 2.4
Name: prettyroot
Version: 1.0.1
Summary: Readable Python helpers for inspecting and plotting ROOT files
License-Expression: BSD-3-Clause
Project-URL: Repository, https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot
Project-URL: Documentation, https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/master/docs/USAGE.md
Keywords: ROOT,uproot,histogram,physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: uproot>=5.7
Requires-Dist: awkward>=2.0
Requires-Dist: matplotlib>=3.6
Requires-Dist: rich>=13
Requires-Dist: PyYAML>=6
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Requires-Dist: build>=1.2; extra == "test"
Requires-Dist: wheel>=0.43; extra == "test"
Requires-Dist: pip>=23; extra == "test"
Requires-Dist: setuptools>=77; extra == "test"
Provides-Extra: fit
Requires-Dist: scipy>=1.10; extra == "fit"
Dynamic: license-file

# prettyroot 1.0.1

prettyroot 用于查看 ROOT 文件、筛选事件、绘制分布并做直方图分析。基础功能基于 Uproot、Awkward Array、NumPy 和 Matplotlib，无需安装 CERN ROOT；拟合和原生 PyROOT 分别提供可选入口，见 [ROOT 兼容性说明](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/ROOT_COMPATIBILITY.md)。

## 安装

需要 Python 3.11 或更高版本。在项目根目录安装：

```bash
python -m pip install .
```

拟合和 Clopper–Pearson 区间另需 `python -m pip install '.[fit]'`。
命令行从 `prettyroot --help` 开始。

pip/PyPI、uv、conda 和 pixi 的完整安装方式见
[安装文档](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/INSTALLATION.md)。
1.0.1 发行包尚未上传到 PyPI 或 Anaconda.org；目前可从源码或本地发行包安装。

许可证：BSD 3-Clause，见 [LICENSE](LICENSE)。

## 快速开始

先生成仓库自带的可复现样例文件和图表：

```bash
python examples/demo.py --output-dir ./prettyroot-demo
```

再打开生成的 ROOT 文件：

```python
from prettyroot.PrettyRoot import PrettyRoot

with PrettyRoot("prettyroot-demo/sample.root", auto_view=False) as root:
    tree = root["Events"]
    print(tree.getEntries("x > 0"))
    tree.scan("event_id:x:label", "x > 0", n=10)
```

## 文档

- [安装、可选依赖与版本验证](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/INSTALLATION.md)
- [构建、软件源发布与 Git tag](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/RELEASING.md)
- [版本记录](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/CHANGELOG.md)
- [使用说明：文件、表达式、扫描、绘图和直方图 API](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/USAGE.md)
- [按需分块读取、惰性别名与资源测量](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/READING.md)
- [集合表达式和 ROOT 条目变量](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/EXPRESSIONS.md)
- [ROOT 风格权重、数组实例与命名直方图](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/ROOT_DRAW.md)
- [流式扫描、直方图累积与 ROOT 导出](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/STREAMING_EXPORT.md)
- [多文件、RNTuple、friends、索引与 entry lists](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/SOURCES.md)
- [直方图运算、统计量、profile、graph 和 ratio](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/HISTOGRAMS.md)
- [拟合、效率和置信区间](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/FITTING_EFFICIENCY.md)
- [命令行、交互导航和可选 PyROOT](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/CLI_NATIVE.md)
- [可复现实验与输出示例](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/EXAMPLES.md)
- [ROOT / PyROOT 兼容性说明](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/ROOT_COMPATIBILITY.md)
- [开发计划与优先级路线图](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/DEVELOPMENT_PLAN.md)
- [已完成问题的修复记录与验证证据](https://gitlab.pandax.sjtu.edu.cn/taoyi/prettyroot/-/blob/v1.0.1/docs/BUGFIX_REPORT.md)
