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"))

用法

由已知標準樣品(如 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.