diff --git a/README.md b/README.md index d6a29e4..f70e469 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,12 @@ Raspberry Pi HQ Camera(IMX477)RAW 光谱工具集:录制、回放、寻峰 | `hq_spectrum.py` | 核心库 + 实时播放器:PC1B 解码、CFA 分离、ROI、降维、预览、交互窗口 | | `hq_record.py` | 把相机 RAW 流录成 `recordings/<时间戳>/{frames.bin,frames.jsonl,meta.json}` | | `hq_average.py` | 多帧平均成一条新录制(降噪) | -| `spectro_core.py` | **共享核心**:模块加载、标定解析、几何(裁剪/反斜切)、基线/噪声/寻峰/拟合/双峰分解、CSV/JSON 输出 | -| `spectro_prep.py` | 预处理:定 ROI、测谱线倾角、反斜切,产出 `geometry.json` + 预览图 | +| `spectro_core.py` | **共享核心**:模块加载、标定解析、基线/噪声/寻峰/拟合/双峰分解、CSV/JSON 输出 | | `peak_finder.py` | 寻峰与峰信息导出:峰形图、峰形数据、像素坐标、RAW 像素块;`--pick` 交互选峰 | | `wavelength_calibration.py` | 用汞灯谱线标定 像素→波长,产出 `calibration_exports/` | | `wavelength_player.py` | 带已存标定的回放(波长轴、瀑布图) | | `PEAK_FINDER.md` / `WAVELENGTH_PLAYER.md` | 两个工具的详细说明 | -| `test_peak_finder.py` / `test_wavelength_player.py` | 单元测试(含真实录制的端到端用例) | +| `test_peak_finder.py` / `test_wavelength_calibration.py` / `test_wavelength_player.py` | 单元测试(含真实录制的端到端用例) | | `calibration_exports/` | 汞灯标定的输出目录(**本地生成,不入库**):`calibration.json`、残差、逐像素波长表 | ## 依赖 @@ -47,13 +46,6 @@ python3 wavelength_player.py --input recordings/hq_20261101_114417 \ --calibration calibration_exports/hq_20261101_114417_f0000/calibration.json ``` -预处理(裁剪 + 测倾斜 + 反斜切),其它工具用 `--roi ` 复用: - -```bash -python spectro_prep.py --input recordings/hq_20261101_114417 -python peak_finder.py --input recordings/hq_20261101_114417 --roi geometry/hq_20261101_114417/geometry.json -``` - 寻峰并导出(`--calibration` 只是**应用**已有的标定,不给就只输出像素坐标): ```bash @@ -81,14 +73,14 @@ python wavelength_calibration.py --peaks peak_exports/hq_20261101_114417_f0000/p ## 测试 ```bash -python -m unittest test_peak_finder test_wavelength_player -v +python -m unittest test_peak_finder test_wavelength_calibration test_wavelength_player -v ``` 端到端用例需要录制与标定;录制不在脚本附近时用环境变量指过去,否则自动跳过: ```powershell $env:PEAK_FINDER_TEST_RECORDING = "C:\Users\peng0\Dev\Light\recordings\hq_20261101_114417" -$env:PEAK_FINDER_TEST_CALIBRATION = "wavelength_calibration\calibration.json" +$env:PEAK_FINDER_TEST_CALIBRATION = "calibration_exports\hq_20261101_114417_f0000\calibration.json" ``` ## 仓库里不放什么