detector_calibrate — DRIVE 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"))

• GPU:无(仅 CPU 参考实现)

用法

由已知标准样品(如 Si)的衍射环标定探测器的中心、距离与倾斜。

d_spacings 是标准间距 [Å] 的列表(不一定按强度顺序),geometry_guess 至少是 pixel 并且

波长,如果已知,cx,cy,距离,倾斜,tilt_dir。步骤:

1、如果没有中心,则从亮像素的重心开始,沿射线拾取最强的环,通过拟合圆来更新中心3次。

2. 如果没有距离,则将径向轮廓的第一个峰值分配给 d 的候选值(最小 2θ 中的四个),并将它们与其他环的预测进行比较。选择匹配观测值数量最多的对。

3. 预测当前几何中“n_azimuth”射线上每个环的位置,在窗口中的强度重心处选取一个点,使用 scipy.optimize.least_squares 来猜测(cx、cy、距离、倾斜的两个分量)和 2θ 残差 [deg]。窗户契约时4次。使用旋转矢量“tilt·(cos φ, sin φ)”的两个分量求解倾斜(避免当斜率为 0 时 φ 变得不确定的奇点)。

返回值(dict):Geometry(cx,cy,distance,pixel,wavelength,tilt,tilt_dir)

rms_two_theta_deg・n_points・n_rings・rings_deg・ok(rms 小于 0.25·像素/距离

和环 >= min_rings)。

引发 ValueError:图像不是 2-D,没有 d,没有像素/波长,未找到“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.