pxrd op• 数据种类:image2d × signal × table → table
• 调用: import fullseye as fs; fs.ledger.detector_calibrate(image, d_spacings, geometry_guess, n_azimuth=180, fit_tilt=True, min_rings=2)(要直接调用实现,import pxrd; pxrd.detector_calibrate(image, d_spacings, geometry_guess, n_azimuth=180, fit_tilt=True, min_rings=2);从台账取用则 opsdrive.get("detector_calibrate"))
由已知标准样品(如 Si)的衍射环标定探测器的中心、距离与倾斜。
d_spacings 为标准晶面间距 [Å] 的 list(不必按强度排序),geometry_guess 中至少放入 pixel 和
wavelength,若已知则还放入 cx、cy、distance、tilt、tilt_dir。步骤:
1. 若无中心,则从亮像素的重心开始,沿射线拾取最强的环,用圆拟合将中心更新 3 次。
2. 若无距离,则将径向剖面的第一个峰与 d 的候选(从小 2θ 起 4 条)匹配,选择其他环的预测与观测峰一致最多的组合。
3. 用当前几何在 n_azimuth 条射线上预测各环位置,以窗口内强度的重心拾取点, 用 scipy.optimize.least_squares 以 2θ 残差 [deg] 拟合 (cx, cy, distance, tilt の 2 成分)。边缩小窗口边进行 3 次。倾斜用旋转向量的 2 个分量 tilt·(cos φ, sin φ) 求解(避免倾斜为 0 时 φ 不定的奇点)。
返回值(dict): 在几何参数(cx、cy、distance、pixel、wavelength、tilt、tilt_dir)基础上
增加 rms_two_theta_deg、n_points、n_rings、rings_deg、ok(rms 小于 1/4 像素对应的角度 0.25·pixel/distance
且环数 >= min_rings)。
Raises ValueError: 图像不是 2-D、一个 d 都没有、缺少 pixel / wavelength、找不到 min_rings 个环。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• poc_pxrd_phase_peel — py -3.11 examples/poc_pxrd_phase_peel.py
table 作为输入)course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same
pxrd)cif_read · cubic_prototype · powder_reflections · scherrer_size · debye_ring_image · detector_two_theta · azimuthal_integrate · diffraction_peaks
*Provenance: pxrd.py — DRIVE 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.